Skip to content

Commit

Permalink
Merge branch 'master' into 5OV_balloon_instances
Browse files Browse the repository at this point in the history
  • Loading branch information
askervin authored Apr 25, 2023
2 parents d3231e9 + 49ad8ca commit b17ed04
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 14 deletions.
28 changes: 26 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ TEST_TAGS := noavx,test
GO_TEST := $(GO_CMD) test $(GO_PARALLEL) -tags $(TEST_TAGS)
GO_VET := $(GO_CMD) vet -tags $(TEST_TAGS)

TEST_SETUP := test-setup.sh
TEST_CLEANUP := test-cleanup.sh

# Disable some golangci_lint checkers for now until we have an more acceptable baseline...
GO_CILINT_CHECKERS := -D unused,staticcheck,errcheck,deadcode,structcheck,gosimple -E revive,gofmt
GO_CILINT_RUNFLAGS := --build-tags $(TEST_TAGS)
Expand Down Expand Up @@ -439,7 +442,28 @@ shellcheck:
# Rules for running unit/module tests.
#

test:
test: test-setup test-run test-cleanup
race-test racetest: test-setup racetest-run test-cleanup

test-setup:
$(Q)for i in $$(find . -name $(TEST_SETUP)); do \
echo "+ Running test setup $$i..."; \
(cd $${i%/*}; \
if [ -x "$(TEST_SETUP)" ]; then \
./$(TEST_SETUP); \
fi); \
done

test-cleanup:
$(Q)for i in $$(find . -name $(TEST_CLEANUP)); do \
echo "- Running test cleanup $$i..."; \
(cd $${i%/*}; \
if [ -x "$(TEST_CLEANUP)" ]; then \
./$(TEST_CLEANUP); \
fi); \
done

test-run:
ifndef WHAT
$(Q)$(GO_TEST) -race -coverprofile=coverage.txt -covermode=atomic \
$(shell $(GO_LIST_MODULES))
Expand All @@ -455,7 +479,7 @@ else
exit $$rc
endif

race-test racetest:
racetest-run:
ifndef WHAT
$(Q)$(GO_TEST) -race -coverprofile=coverage.txt -covermode=atomic \
$(shell $(GO_LIST_MODULES))
Expand Down
1 change: 1 addition & 0 deletions pkg/topology/test-cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rm -fr testdata
Binary file added pkg/topology/test-data.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions pkg/topology/test-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tar -xvzf test-data.tar.gz
3 changes: 0 additions & 3 deletions pkg/topology/testdata/go.mod

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b17ed04

Please sign in to comment.