Skip to content

Commit

Permalink
build: fail on CI if leftover processes
Browse files Browse the repository at this point in the history
If any tests leave processes running after testing results are complete,
fail the test run.

PR-URL: #11269
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
  • Loading branch information
Trott authored and jasnell committed Mar 7, 2017
1 parent e2af074 commit df5f7d4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Expand Up @@ -199,12 +199,22 @@ test-ci-js:
$(PYTHON) tools/test.py -p tap --logfile test.tap \
--mode=release --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES)
# Clean up any leftover processes
PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
if [ "$${PS_OUT}" ]; then \
echo $${PS_OUT} | $(XARGS) kill; exit 1; \
fi

test-ci: LOGLEVEL := info
test-ci: | build-addons
out/Release/cctest --gtest_output=tap:cctest.tap
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES) $(CI_JS_SUITES)
# Clean up any leftover processes
PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
if [ "$${PS_OUT}" ]; then \
echo $${PS_OUT} | $(XARGS) kill; exit 1; \
fi

test-release: test-build
$(PYTHON) tools/test.py --mode=release
Expand Down

0 comments on commit df5f7d4

Please sign in to comment.