From 2d5cb3b87048778d9d52fb3b7662ee06de57dd3f 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 b5a4c3a56fc143..53a61c43572699 100644 --- a/Makefile +++ b/Makefile @@ -212,6 +212,11 @@ test-ci-js: $(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: | build-addons @@ -219,6 +224,11 @@ test-ci: | 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