File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ test/%: DIR=$*
2626test/% :
2727 @echo " >>> Running tests for module: $( DIR) "
2828 @# We use '-count=1' to disable test caching.
29- cd $(DIR ) && $(GO ) test -count=1 -timeout $(TIMEOUT ) s $(ARGS ) ./...
29+ ( cd $( DIR) && $( GO) test -count=1 -timeout $( TIMEOUT) s $( ARGS) ./...)
3030.PHONY : $(TEST_TARGETS ) test
3131
3232# Coverage
@@ -39,14 +39,12 @@ $(COVERAGE_REPORT_DIR):
3939clean-report-dir : $(COVERAGE_REPORT_DIR )
4040 test $(COVERAGE_REPORT_DIR ) && rm -f $(COVERAGE_REPORT_DIR ) /*
4141test-coverage : $(COVERAGE_REPORT_DIR ) clean-report-dir # # Test with coverage enabled
42- @set -e; \
4342 for dir in $( ALL_GO_MOD_DIRS) ; do \
4443 echo " >>> Running tests with coverage for module: $$ {dir}" ; \
45- echo " $( GO) test -count=1 -covermode=$( COVERAGE_MODE) -coverprofile=" $(COVERAGE_PROFILE ) " $$ {dir}/..." ; \
4644 DIR_ABS=$$(python -c 'import os, sys; print(os.path.realpath(sys.argv[1] ) )' $${dir}) ; \
4745 REPORT_NAME=$$(basename $${DIR_ABS}) ; \
4846 (cd " $$ {dir}" && \
49- $(GO ) test -count=1 -coverpkg=./... -covermode=$(COVERAGE_MODE ) -coverprofile=" $( COVERAGE_PROFILE) " && \
47+ $(GO ) test -count=1 -coverpkg=./... -covermode=$(COVERAGE_MODE ) -coverprofile=" $( COVERAGE_PROFILE) " ./... && \
5048 cp $(COVERAGE_PROFILE ) " $( COVERAGE_REPORT_DIR_ABS) /$$ {REPORT_NAME}_$( COVERAGE_PROFILE) " && \
5149 $(GO ) tool cover -html=$(COVERAGE_PROFILE ) -o coverage.html); \
5250 done ;
You can’t perform that action at this time.
0 commit comments