From 8d323bb91af91aa5fc3d40cb80ca0e00be179c82 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 9 Feb 2017 10:42:29 -0800 Subject: [PATCH] build: fail on CI if leftover processes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If any tests leave processes running after testing results are complete, fail the test run. PR-URL: https://github.com/nodejs/node/pull/11269 Reviewed-By: James M Snell Reviewed-By: Santiago Gimeno Reviewed-By: Michael Dawson Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Johan Bergström --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index f08214cc9ab53c..1ad56f61042ab4 100644 --- a/Makefile +++ b/Makefile @@ -297,6 +297,11 @@ test-ci-js: | clear-stalled $(PYTHON) tools/test.py $(PARALLEL_ARGS) -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: | clear-stalled build-addons @@ -304,6 +309,11 @@ test-ci: | clear-stalled build-addons $(PYTHON) tools/test.py $(PARALLEL_ARGS) -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