Skip to content

Commit

Permalink
build: clear stalled jobs on POSIX CI hosts
Browse files Browse the repository at this point in the history
Sometimes, after a cluster or debug test fails, a fixture hangs around
and holds onto a needed port, causing subsequent CI runs to fail. This
adds a command I've been running manually when this occurs. The command
will clear the stalled jobs before a CI run.

PR-URL: #11246
Backport-PR-URL: #13754
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Josh Gavant <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Jul 11, 2017
1 parent 6142747 commit 914f368
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ test/addons/.buildstamp: config.gypi \
# TODO(bnoordhuis) Force rebuild after gyp update.
build-addons: $(NODE_EXE) test/addons/.buildstamp

ifeq ($(OSTYPE),$(filter $(OSTYPE),darwin aix))
XARGS = xargs
else
XARGS = xargs -r
endif
clear-stalled:
ps awwx | grep Release/node | grep -v grep | cat
ps awwx | grep Release/node | grep -v grep | awk '{print $$1}' | $(XARGS) kill

test-gc: all test/gc/node_modules/weak/build/Release/weakref.node
$(PYTHON) tools/test.py --mode=release gc

Expand All @@ -208,7 +217,7 @@ test-ci-native: | test/addons/.buildstamp
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)

# This target should not use a native compiler at all
test-ci-js:
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)
Expand All @@ -219,7 +228,7 @@ test-ci-js:
fi

test-ci: LOGLEVEL := info
test-ci: | build-addons
test-ci: | clear-stalled build-addons
out/Release/cctest --gtest_output=tap:cctest.tap
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=release --flaky-tests=$(FLAKY_TESTS) \
Expand Down Expand Up @@ -803,5 +812,5 @@ endif
bench-buffer bench-net bench-http bench-fs bench-tls cctest run-ci \
test-v8 test-v8-intl test-v8-benchmarks test-v8-all v8 lint-ci \
bench-ci jslint-ci doc-only $(TARBALL)-headers test-ci test-ci-native \
test-ci-js build-ci test-hash-seed
test-ci-js build-ci test-hash-seed clear-stalled

0 comments on commit 914f368

Please sign in to comment.