-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (43 loc) · 1.47 KB
/
Makefile
File metadata and controls
54 lines (43 loc) · 1.47 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
# 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
.PHONY: all
all: build
# This will be overridden during image build.
IMAGE_VERSION ?= 0.0.0
LDFLAGS = "-X main.ManifestSemver=$(IMAGE_VERSION)"
UNIT_TESTED_PACKAGES := \
github.com/dell/csi-unity \
github.com/dell/csi-unity/k8sutils \
github.com/dell/csi-unity/provider \
github.com/dell/csi-unity/service \
github.com/dell/csi-unity/service/csiutils \
github.com/dell/csi-unity/service/logging
build:
git config core.hooksPath hooks
cd core && go generate
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags $(LDFLAGS) -mod=vendor .
unit-test:
go clean -cache
@for pkg in $(UNIT_TESTED_PACKAGES); do \
echo "****** go test -v -short -race -count=1 -cover -coverprofile cover.out $$pkg ******"; \
go test -v -short -race -count=1 -cover -coverprofile cover.out $$pkg; \
done
# Integration tests using Godog. Populate env.sh with the hardware parameters
integration-test:
( cd test/integration-test; sh run.sh )
# BDD tests using Godog. Populate env.sh with the hardware parameters
bdd-test:
( cd test/bdd-test; sh run.sh )
.PHONY: clean
clean:
rm -rf core/core_generated.go vendor csm-temp-repo csm-common.mk
go clean
.PHONY: integ-test
integ-test: build
go test -v ./test/...
check:
sh scripts/check.sh