File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 31
31
run : |
32
32
set -e
33
33
34
- make unit-tests
34
+ make VERBOSE=true unit-tests
35
35
36
36
# Remove mock files from coverage analysis
37
37
sed -n -i '/\/mock\//!p' coverprofile.out
Original file line number Diff line number Diff line change @@ -12,17 +12,22 @@ LDFLAGS:=-w -s
12
12
LDFLAGS+ =-X "$(GO_MODULE ) /internal/cli/cmd.version=$(GIT_TAG ) "
13
13
LDFLAGS+ =-X "$(GO_MODULE ) /internal/cli/cmd.gitCommit=$(GIT_COMMIT ) "
14
14
15
+ # No verbose unit tests by default
16
+ ifeq ($(VERBOSE ) ,true)
17
+ VERBOSE_TEST?=-v
18
+ endif
19
+
15
20
elemental :
16
21
go build -ldflags ' $(LDFLAGS)' -o $@ ./cmd/...
17
22
18
23
.PHONY : unit-tests
19
24
unit-tests :
20
- go run $(GINKGO ) --label-filter ' !rootlesskit' --race --cover --coverpkg=github.com/suse/elemental/... --github-output -p -r ${PKG}
25
+ go run $(GINKGO ) --label-filter ' !rootlesskit' --race --cover --coverpkg=github.com/suse/elemental/... --github-output -p -r $( VERBOSE_TEST ) $ {PKG}
21
26
ifeq (, $(shell which rootlesskit 2>/dev/null) )
22
27
@echo "No rootlesskit utility found, not executing tests requiring it"
23
28
else
24
29
@mv coverprofile.out coverprofile.out.bk
25
- rootlesskit go run $(GINKGO) --label-filter 'rootlesskit' --race --cover --coverpkg=github.com/suse/elemental/... --github-output -p -r ${PKG}
30
+ rootlesskit go run $(GINKGO) --label-filter 'rootlesskit' --race --cover --coverpkg=github.com/suse/elemental/... --github-output -p -r $(VERBOSE_TEST) $ {PKG}
26
31
@grep -v "mode: atomic" coverprofile.out >> coverprofile.out.bk
27
32
@mv coverprofile.out.bk coverprofile.out
28
33
endif
You can’t perform that action at this time.
0 commit comments