Skip to content

Commit

Permalink
Makefile: Print quiet lines for each package tested
Browse files Browse the repository at this point in the history
This provides a relatively quiet progress indicator while running tests
for a potentially very long time.

Signed-off-by: Joe Stringer <[email protected]>
  • Loading branch information
joestringer committed Jun 10, 2022
1 parent 0b7ef45 commit 13f2caa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ tests-privileged: GO_TAGS_FLAGS+=privileged_tests ## Run integration-tests for C
tests-privileged:
$(MAKE) init-coverage
for pkg in $(patsubst %,github.com/cilium/cilium/%,$(PRIV_TEST_PKGS)); do \
>&2 $(ECHO_TEST) $$pkg; \
PATH=$(PATH):$(ROOT_DIR)/bpf $(GO_TEST) $(TEST_LDFLAGS) $$pkg $(GOTEST_UNIT_BASE) $(GOTEST_COVER_OPTS) -coverpkg $$pkg \
|| exit 1; \
tail -n +2 coverage.out >> coverage-all-tmp.out; \
Expand Down Expand Up @@ -199,6 +200,7 @@ endif
# hence will trigger an error of too many arguments. As a workaround, we
# have to process these packages in different subshells.
for pkg in $(patsubst %,github.com/cilium/cilium/%,$(TESTPKGS)); do \
>&2 $(ECHO_TEST) $$pkg; \
$(GO_TEST) $(TEST_UNITTEST_LDFLAGS) $$pkg $(GOTEST_BASE) $(GOTEST_COVER_OPTS) -coverpkg $$pkg \
|| exit 1; \
tail -n +2 coverage.out >> coverage-all-tmp.out; \
Expand Down
2 changes: 2 additions & 0 deletions Makefile.quiet
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ifeq ($(V),0)
ECHO_GEN=echo " GEN $(RELATIVE_DIR)/"
ECHO_GINKGO=echo " GINKGO $(RELATIVE_DIR)"
ECHO_GO=echo " GO $(RELATIVE_DIR)/$@"
ECHO_TEST=echo " TEST "
SUBMAKEOPTS="-s"
else
# The whitespace at below EOLs is required for verbose case!
Expand All @@ -24,5 +25,6 @@ else
ECHO_GEN=:
ECHO_GINKGO=:
ECHO_GO=:
ECHO_TEST=:
SUBMAKEOPTS=
endif

0 comments on commit 13f2caa

Please sign in to comment.