File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -86,22 +86,21 @@ c8_flags += $(C8_FLAGS)
8686# /
8787test-c8 : $(NODE_MODULES )
8888ifeq ($(FAIL_FAST ) , true)
89- $(QUIET) $( FIND_TESTS_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r test; do \
89+ $(FIND_TESTS_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\ \]' | while read -r test; do \
9090 echo ''; \
9191 echo "Running test: $$test"; \
92- NODE_ENV="$(NODE_ENV_TEST)" \
93- NODE_PATH="$(NODE_PATH_TEST)" \
94- TEST_MODE=coverage \
95- $(C8) $(c8_flags) $(NODE) $$test | $(TAP_REPORTER) || exit 1 ; \
92+ # Run each test under bash with pipefail so we capture the c8 exit status when piping to the TAP reporter.
93+ bash -lc 'set -o pipefail; NODE_ENV="$(NODE_ENV_TEST)" NODE_PATH="$(NODE_PATH_TEST)" TEST_MODE=coverage $(C8) $(c8_flags) $(NODE) "$$test" 2>&1 | $(TAP_REPORTER)'; \
94+ rc=$$?; \
95+ if [ $$rc -ne 0 ]; then echo "TEST_FAILED: $$test (exit $$rc)"; exit $$rc; fi ; \
9696 done
9797else
98- $(QUIET) $( FIND_TESTS_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r test; do \
98+ $(FIND_TESTS_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\ \]' | while read -r test; do \
9999 echo ''; \
100100 echo "Running test: $$test"; \
101- NODE_ENV="$(NODE_ENV_TEST)" \
102- NODE_PATH="$(NODE_PATH_TEST)" \
103- TEST_MODE=coverage \
104- $(C8) $(c8_flags) $(NODE) $$test | $(TAP_REPORTER) || echo 'Tests failed.'; \
101+ bash -lc 'set -o pipefail; NODE_ENV="$(NODE_ENV_TEST)" NODE_PATH="$(NODE_PATH_TEST)" TEST_MODE=coverage $(C8) $(c8_flags) $(NODE) "$$test" 2>&1 | $(TAP_REPORTER)'; \
102+ rc=$$?; \
103+ if [ $$rc -ne 0 ]; then echo "Tests failed: $$test (exit $$rc)"; fi; \
105104 done
106105endif
107106
You can’t perform that action at this time.
0 commit comments