Skip to content

Commit 914f368

Browse files
TrottMylesBorins
authored andcommitted
build: clear stalled jobs on POSIX CI hosts
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]>
1 parent 6142747 commit 914f368

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Makefile

+12-3
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,15 @@ test/addons/.buildstamp: config.gypi \
186186
# TODO(bnoordhuis) Force rebuild after gyp update.
187187
build-addons: $(NODE_EXE) test/addons/.buildstamp
188188

189+
ifeq ($(OSTYPE),$(filter $(OSTYPE),darwin aix))
190+
XARGS = xargs
191+
else
192+
XARGS = xargs -r
193+
endif
194+
clear-stalled:
195+
ps awwx | grep Release/node | grep -v grep | cat
196+
ps awwx | grep Release/node | grep -v grep | awk '{print $$1}' | $(XARGS) kill
197+
189198
test-gc: all test/gc/node_modules/weak/build/Release/weakref.node
190199
$(PYTHON) tools/test.py --mode=release gc
191200

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

210219
# This target should not use a native compiler at all
211-
test-ci-js:
220+
test-ci-js: | clear-stalled
212221
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
213222
--mode=release --flaky-tests=$(FLAKY_TESTS) \
214223
$(TEST_CI_ARGS) $(CI_JS_SUITES)
@@ -219,7 +228,7 @@ test-ci-js:
219228
fi
220229

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

0 commit comments

Comments
 (0)