Skip to content

Commit 9b5be44

Browse files
joaocgreisFishrock123
authored andcommitted
build: split CI rules in Makefile
Some CI jobs compile Node and run the tests on different machines. This change enables collaborators to have finer control over what runs on these jobs, such as the exact suites to run. The test-ci rule was split into js and native, to allow for addons to be compiled only on the machines that are going to run them. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> PR-URL: #7317
1 parent 45f83e5 commit 9b5be44

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

Makefile

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,25 @@ test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node
184184
test-all-valgrind: test-build
185185
$(PYTHON) tools/test.py --mode=debug,release --valgrind
186186

187+
CI_NATIVE_SUITES := addons
188+
CI_JS_SUITES := doctool known_issues message parallel pseudo-tty sequential
189+
190+
# Build and test addons without building anything else
191+
test-ci-native: | test/addons/.buildstamp
192+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
193+
--mode=release --flaky-tests=$(FLAKY_TESTS) \
194+
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)
195+
196+
# This target should not use a native compiler at all
197+
test-ci-js:
198+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
199+
--mode=release --flaky-tests=$(FLAKY_TESTS) \
200+
$(TEST_CI_ARGS) $(CI_JS_SUITES)
201+
187202
test-ci: | build-addons
188203
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
189204
--mode=release --flaky-tests=$(FLAKY_TESTS) \
190-
$(TEST_CI_ARGS) addons doctool known_issues message pseudo-tty parallel \
191-
sequential
205+
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES) $(CI_JS_SUITES)
192206

193207
test-release: test-build
194208
$(PYTHON) tools/test.py --mode=release
@@ -299,9 +313,11 @@ docopen: out/doc/api/all.html
299313
docclean:
300314
-rm -rf out/doc
301315

302-
run-ci:
316+
build-ci:
303317
$(PYTHON) ./configure $(CONFIG_FLAGS)
304318
$(MAKE)
319+
320+
run-ci: build-ci
305321
$(MAKE) test-ci
306322

307323
RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
@@ -709,4 +725,4 @@ endif
709725
bench-all bench bench-misc bench-array bench-buffer bench-net \
710726
bench-http bench-fs bench-tls cctest run-ci test-v8 test-v8-intl \
711727
test-v8-benchmarks test-v8-all v8 lint-ci bench-ci jslint-ci doc-only \
712-
$(TARBALL)-headers
728+
$(TARBALL)-headers test-ci test-ci-native test-ci-js build-ci

0 commit comments

Comments
 (0)