Skip to content

Commit 1547d77

Browse files
authored
Exit with error code when tests are failing (#669)
1 parent 2e47e40 commit 1547d77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,14 @@ clean-test-results:
242242
unit-test: clean-test-results
243243
@printf $(COLOR) "Run unit tests..."
244244
$(foreach UNIT_TEST_DIR,$(UNIT_TEST_DIRS), @go test -timeout $(TEST_TIMEOUT) -race $(UNIT_TEST_DIR) $(TEST_TAG) | tee -a test.log$(NEWLINE))
245+
@grep -qzwv "^--- FAIL" test.log
245246

246247
integration-test: clean-test-results
247248
@printf $(COLOR) "Run integration tests..."
248249
$(foreach INTEG_TEST_DIR,$(INTEG_TEST_DIRS), @go test -timeout $(TEST_TIMEOUT) -race $(INTEG_TEST_DIR) $(TEST_TAG) | tee -a test.log$(NEWLINE))
249250
# Need to run xdc tests with race detector off because of ringpop bug causing data race issue.
250251
@go test -timeout $(TEST_TIMEOUT) $(INTEG_TEST_XDC_ROOT) $(TEST_TAG) | tee -a test.log
252+
@grep -qzwv "^--- FAIL" test.log
251253

252254
test: unit-test integration-test
253255

0 commit comments

Comments
 (0)