File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ before_install:
4343script :
4444 - make format
4545 - make lint
46- - make
46+ - make BUILDTAGS=kerneldrv
4747 - make vet
4848 - make cyclomatic-check
49- - make test
49+ - make test BUILDTAGS=kerneldrv
5050 - make images
5151 - make images BUILDER=buildah
5252 - make demos
Original file line number Diff line number Diff line change @@ -86,10 +86,10 @@ pipeline {
8686 }
8787 }
8888 }
89- stage(" make test" ) {
89+ stage(" make test BUILDTAGS=kerneldrv " ) {
9090 steps {
9191 dir(path : " $REPO_DIR " ) {
92- sh " make test"
92+ sh " make test BUILDTAGS=kerneldrv "
9393 }
9494 }
9595 }
Original file line number Diff line number Diff line change 22GOFMT := gofmt
33GOCYCLO := gocyclo
44
5+ BUILDTAGS ?= ""
6+
57pkgs = $(shell $(GO ) list ./... | grep -v vendor)
68cmds = $(shell ls cmd)
79
@@ -18,10 +20,10 @@ cyclomatic-check:
1820
1921test :
2022ifndef WHAT
21- @$(GO) test -race -coverprofile=coverage.txt -covermode=atomic $(pkgs)
23+ @$(GO) test -tags $(BUILDTAGS) - race -coverprofile=coverage.txt -covermode=atomic $(pkgs)
2224else
2325 @cd $(WHAT) && \
24- $(GO) test -v -cover -coverprofile cover.out || rc=1; \
26+ $(GO) test -tags $(BUILDTAGS) - v -cover -coverprofile cover.out || rc=1; \
2527 $(GO) tool cover -html=cover.out -o coverage.html; \
2628 rm cover.out; \
2729 echo "Coverage report : file://$$(realpath coverage.html) "; \
3234 @rc=0 ; for f in $$ (find -name \* .go | grep -v \.\/ vendor) ; do golint -set_exit_status $$ f || rc=1 ; done ; exit $$ rc
3335
3436$(cmds ) :
35- cd cmd/$@ ; $(GO ) build
37+ cd cmd/$@ ; $(GO ) build -tags $( BUILDTAGS )
3638
3739build : $(cmds )
3840
You can’t perform that action at this time.
0 commit comments