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