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:
2 files changed
+6
-1
No files matched your search
@@ -3,6 +3,8 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.go'
|
||||
- build/makelib/golang.mk
|
||||
- Makefile
|
||||
|
||||
jobs:
|
||||
unittests:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user