test: do not allow go.test parallel dependencies

Dependencies for `make go.test` have to run in order, so call them
explicitly from the target rather than allowing them to be done in
parallel if `make -j` flag is used.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
This commit is contained in:
Blaine Gardner committed 2021-04-16 12:24:39 -06:00
1 parent 432e42e04a
commit a818a01a13
2 files changed
+6 -1

No files matched your search

+2
View File
@@ -3,6 +3,8 @@ on:
pull_request:
paths:
- '**.go'
- build/makelib/golang.mk
- Makefile
jobs:
unittests:
+4 -1
View File
@@ -127,8 +127,11 @@ go.install:
@echo === go install $(PLATFORM)
$(foreach p,$(GO_STATIC_PACKAGES),@CGO_ENABLED=0 $(GO) install -v $(GO_STATIC_FLAGS) $(p)${\n})
# GOJUNIT and go.mod.vendor need to happen in order and NOT in parallel, so call them explicitly
.PHONY: go.test.unit
go.test.unit: $(GOJUNIT) go.mod.vendor
go.test.unit:
@$(MAKE) $(GOJUNIT)
@$(MAKE) go.mod.vendor
@echo === go test unit-tests
@mkdir -p $(GO_TEST_OUTPUT)
CGO_ENABLED=0 $(GOHOST) test -v -cover $(GO_STATIC_FLAGS) $(GO_PACKAGES)