292
292
tools/make-v8.sh $(V8_ARCH ) .$(BUILDTYPE_LOWER ) $(V8_BUILD_OPTIONS )
293
293
294
294
.PHONY : jstest
295
- jstest : build-addons build-js-native-api-tests build-node-api-tests # # Runs addon tests and JS tests
295
+ jstest : build-addons build-abort-tests build- js-native-api-tests build-node-api-tests # # Runs addon tests and JS tests
296
296
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) \
297
297
--skip-tests=$(CI_SKIP_TESTS ) \
298
298
$(CI_JS_SUITES ) \
@@ -316,6 +316,7 @@ test: all ## Runs default tests, linters, and builds docs.
316
316
$(MAKE ) -s tooltest
317
317
$(MAKE ) -s test-doc
318
318
$(MAKE ) -s build-addons
319
+ $(MAKE ) -s build-abort-tests
319
320
$(MAKE ) -s build-js-native-api-tests
320
321
$(MAKE ) -s build-node-api-tests
321
322
$(MAKE ) -s cctest
@@ -324,6 +325,7 @@ test: all ## Runs default tests, linters, and builds docs.
324
325
.PHONY : test-only
325
326
test-only : all # # For a quick test, does not run linter or build docs.
326
327
$(MAKE ) build-addons
328
+ $(MAKE ) build-abort-tests
327
329
$(MAKE ) build-js-native-api-tests
328
330
$(MAKE ) build-node-api-tests
329
331
$(MAKE ) cctest
@@ -333,6 +335,7 @@ test-only: all ## For a quick test, does not run linter or build docs.
333
335
# Used by `make coverage-test`
334
336
test-cov : all
335
337
$(MAKE ) build-addons
338
+ $(MAKE ) build-abort-tests
336
339
$(MAKE ) build-js-native-api-tests
337
340
$(MAKE ) build-node-api-tests
338
341
$(MAKE ) cctest
@@ -452,6 +455,31 @@ test/node-api/.buildstamp: $(ADDONS_PREREQS) \
452
455
# TODO(bnoordhuis) Force rebuild after gyp or node-gyp update.
453
456
build-node-api-tests : | $(NODE_EXE ) test/node-api/.buildstamp
454
457
458
+ ABORT_BINDING_GYPS := \
459
+ $(filter-out test/abort/??_* /binding.gyp, \
460
+ $(wildcard test/abort/* /binding.gyp) )
461
+
462
+ ABORT_BINDING_SOURCES := \
463
+ $(filter-out test/abort/??_* /* .c, $(wildcard test/abort/* /* .c) ) \
464
+ $(filter-out test/abort/??_* /* .cc, $(wildcard test/abort/* /* .cc) ) \
465
+ $(filter-out test/abort/??_* /* .h, $(wildcard test/abort/* /* .h) )
466
+
467
+ # Implicitly depends on $(NODE_EXE), see the build-node-api-tests rule for rationale.
468
+ test/abort/.buildstamp : $(ADDONS_PREREQS ) \
469
+ $(ABORT_BINDING_GYPS ) $(ABORT_BINDING_SOURCES ) \
470
+ src/node_api.h src/node_api_types.h src/js_native_api.h \
471
+ src/js_native_api_types.h src/js_native_api_v8.h src/js_native_api_v8_internals.h
472
+ @$(call run_build_addons,"$$PWD/test/abort",$@ )
473
+
474
+ .PHONY : build-abort-tests
475
+ # .buildstamp needs $(NODE_EXE) but cannot depend on it
476
+ # directly because it calls make recursively. The parent make cannot know
477
+ # if the subprocess touched anything so it pessimistically assumes that
478
+ # .buildstamp is out of date and need a rebuild.
479
+ # Just goes to show that recursive make really is harmful...
480
+ # TODO(bnoordhuis) Force rebuild after gyp or node-gyp update.
481
+ build-abort-tests : | $(NODE_EXE ) test/abort/.buildstamp
482
+
455
483
BENCHMARK_NAPI_BINDING_GYPS := $(wildcard benchmark/napi/* /binding.gyp)
456
484
457
485
BENCHMARK_NAPI_BINDING_SOURCES := \
@@ -472,12 +500,14 @@ clear-stalled:
472
500
echo $$ {PS_OUT} | xargs kill -9; \
473
501
fi
474
502
475
- test-build : | all build-addons build-js-native-api-tests build-node-api-tests
503
+ test-build : | all build-addons build-abort-tests build- js-native-api-tests build-node-api-tests
476
504
477
505
test-build-js-native-api : all build-js-native-api-tests
478
506
479
507
test-build-node-api : all build-node-api-tests
480
508
509
+ test-build-abort : all build-abort-tests
510
+
481
511
.PHONY : test-all
482
512
test-all : test-build # # Run default tests with both Debug and Release builds.
483
513
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=debug,release
@@ -490,7 +520,7 @@ test-all-suites: | clear-stalled test-build bench-addons-build doc-only ## Run a
490
520
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) test/*
491
521
492
522
# CI_* variables should be kept synchronized with the ones in vcbuild.bat
493
- CI_NATIVE_SUITES ?= addons js-native-api node-api
523
+ CI_NATIVE_SUITES ?= addons js-native-api node-api abort
494
524
CI_JS_SUITES ?= default
495
525
ifeq ($(node_use_openssl ) , false)
496
526
CI_DOC := doctool
@@ -502,7 +532,7 @@ endif
502
532
# Build and test addons without building anything else
503
533
# Related CI job: node-test-commit-arm-fanned
504
534
test-ci-native : LOGLEVEL := info
505
- test-ci-native : | test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
535
+ test-ci-native : | test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp test/abort/.buildstamp
506
536
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) -p tap --logfile test.tap \
507
537
--mode=$(BUILDTYPE_LOWER ) --flaky-tests=$(FLAKY_TESTS ) \
508
538
$(TEST_CI_ARGS ) $(CI_NATIVE_SUITES )
@@ -524,7 +554,7 @@ test-ci-js: | clear-stalled
524
554
.PHONY : test-ci
525
555
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned
526
556
test-ci : LOGLEVEL := info
527
- test-ci : | clear-stalled build-addons build-js-native-api-tests build-node-api-tests doc-only
557
+ test-ci : | clear-stalled build-addons build-abort-tests build- js-native-api-tests build-node-api-tests doc-only
528
558
out/Release/cctest --gtest_output=xml:out/junit/cctest.xml
529
559
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) -p tap --logfile test.tap \
530
560
--mode=$(BUILDTYPE_LOWER ) --flaky-tests=$(FLAKY_TESTS ) \
@@ -628,8 +658,17 @@ test-node-api-clean:
628
658
$(RM ) -r test/node-api/* /build
629
659
$(RM ) test/node-api/.buildstamp
630
660
661
+ .PHONY : test-abort
662
+ test-abort : test-build-abort
663
+ $(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) test-abort
664
+
665
+ .PHONY : test-abort-clean
666
+ test-abort-clean :
667
+ $(RM ) -r test/abort/* /build
668
+ $(RM ) test/abort/.buildstamp
669
+
631
670
.PHONY : test-addons
632
- test-addons : test-build test-js-native-api test-node-api
671
+ test-addons : test-build test-js-native-api test-node-api test-abort
633
672
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) addons
634
673
635
674
.PHONY : test-addons-clean
@@ -639,6 +678,7 @@ test-addons-clean:
639
678
$(RM ) test/addons/.buildstamp test/addons/.docbuildstamp
640
679
$(MAKE ) test-js-native-api-clean
641
680
$(MAKE ) test-node-api-clean
681
+ $(MAKE ) test-abort-clean
642
682
643
683
test-async-hooks :
644
684
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) async-hooks
@@ -647,6 +687,7 @@ test-with-async-hooks:
647
687
$(MAKE ) build-addons
648
688
$(MAKE ) build-js-native-api-tests
649
689
$(MAKE ) build-node-api-tests
690
+ $(MAKE ) build-abort-tests
650
691
$(MAKE ) cctest
651
692
NODE_TEST_WITH_ASYNC_HOOKS=1 $(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) \
652
693
$(CI_JS_SUITES ) \
0 commit comments