build: fail on CI if leftover processes
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 <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>
This commit is contained in:
parent
8e8fbd80d0
commit
189b49a4d3
10
Makefile
10
Makefile
@ -297,6 +297,11 @@ test-ci-js: | clear-stalled
|
|||||||
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
|
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
|
||||||
--mode=release --flaky-tests=$(FLAKY_TESTS) \
|
--mode=release --flaky-tests=$(FLAKY_TESTS) \
|
||||||
$(TEST_CI_ARGS) $(CI_JS_SUITES)
|
$(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: LOGLEVEL := info
|
||||||
test-ci: | clear-stalled build-addons
|
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 \
|
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
|
||||||
--mode=release --flaky-tests=$(FLAKY_TESTS) \
|
--mode=release --flaky-tests=$(FLAKY_TESTS) \
|
||||||
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES) $(CI_JS_SUITES)
|
$(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
|
test-release: test-build
|
||||||
$(PYTHON) tools/test.py --mode=release
|
$(PYTHON) tools/test.py --mode=release
|
||||||
|
Loading…
x
Reference in New Issue
Block a user