-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (51 loc) · 1.8 KB
/
Makefile
File metadata and controls
63 lines (51 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright © 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Dell Technologies, Dell and other trademarks are trademarks of Dell Inc.
# or its subsidiaries. Other trademarks may be trademarks of their respective
# owners.
include images.mk
# This will be overridden during image build.
IMAGE_VERSION ?= 0.0.0
LDFLAGS = "-X main.ManifestSemver=$(IMAGE_VERSION)"
# default target
all: help
# Help target, prints usefule information
help:
@echo
@echo "The following targets are commonly used:"
@echo
@echo "build - Builds the code locally"
@echo "clean - Cleans the local build"
@echo "integration-test - Runs the integration tests. Requires access to an array"
@echo "unit-test - Runs the unit tests"
@echo "vendor - Downloads a vendor list (local copy) of repositories required to compile the repo."
@echo
@make -s overrides-help
# Clean the build
clean:
rm -f core/core_generated.go go-code-tester
rm -f semver.mk
rm -rf csm-common.mk
rm -rf vendor
go clean
format:
@gofmt -w -s .
# Build the driver locally
build: generate vendor
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -mod=vendor -ldflags $(LDFLAGS) -o csi-isilon
# Windows or Linux; requires no hardware
unit-test: go-code-tester
GITHUB_OUTPUT=/dev/null \
./go-code-tester 90 "." "" "true" "" "" "./service/mock|./common/constants|./test/integration|./core|./provider"
coverage:
cd service; go tool cover -html=c.out -o coverage.html
# Linux only; populate env.sh with the hardware parameters
integration-test:
( cd test/integration; sh run.sh )
gosec:
gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...
go-code-tester:
git clone --depth 1 git@github.com:dell/actions.git temp-repo
cp temp-repo/go-code-tester/entrypoint.sh ./go-code-tester
chmod +x go-code-tester
rm -rf temp-repo