Skip to content

Commit c054834

Browse files
richardlaucodebytere
authored andcommittedJun 7, 2020
Revert "src: add test/abort build tasks"
This reverts commit e08ac09. PR-URL: #33196 Refs: #31740 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent b43fc64 commit c054834

File tree

2 files changed

+10
-73
lines changed

2 files changed

+10
-73
lines changed
 

‎Makefile

+6-47
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ v8:
292292
tools/make-v8.sh $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
293293

294294
.PHONY: jstest
295-
jstest: build-addons build-abort-tests build-js-native-api-tests build-node-api-tests ## Runs addon tests and JS tests
295+
jstest: build-addons build-js-native-api-tests build-node-api-tests ## Runs addon tests and JS tests
296296
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \
297297
--skip-tests=$(CI_SKIP_TESTS) \
298298
$(CI_JS_SUITES) \
@@ -316,7 +316,6 @@ test: all ## Runs default tests, linters, and builds docs.
316316
$(MAKE) -s tooltest
317317
$(MAKE) -s test-doc
318318
$(MAKE) -s build-addons
319-
$(MAKE) -s build-abort-tests
320319
$(MAKE) -s build-js-native-api-tests
321320
$(MAKE) -s build-node-api-tests
322321
$(MAKE) -s cctest
@@ -325,7 +324,6 @@ test: all ## Runs default tests, linters, and builds docs.
325324
.PHONY: test-only
326325
test-only: all ## For a quick test, does not run linter or build docs.
327326
$(MAKE) build-addons
328-
$(MAKE) build-abort-tests
329327
$(MAKE) build-js-native-api-tests
330328
$(MAKE) build-node-api-tests
331329
$(MAKE) cctest
@@ -335,7 +333,6 @@ test-only: all ## For a quick test, does not run linter or build docs.
335333
# Used by `make coverage-test`
336334
test-cov: all
337335
$(MAKE) build-addons
338-
$(MAKE) build-abort-tests
339336
$(MAKE) build-js-native-api-tests
340337
$(MAKE) build-node-api-tests
341338
$(MAKE) cctest
@@ -455,31 +452,6 @@ test/node-api/.buildstamp: $(ADDONS_PREREQS) \
455452
# TODO(bnoordhuis) Force rebuild after gyp or node-gyp update.
456453
build-node-api-tests: | $(NODE_EXE) test/node-api/.buildstamp
457454

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-
483455
BENCHMARK_NAPI_BINDING_GYPS := $(wildcard benchmark/napi/*/binding.gyp)
484456

485457
BENCHMARK_NAPI_BINDING_SOURCES := \
@@ -500,14 +472,12 @@ clear-stalled:
500472
echo $${PS_OUT} | xargs kill -9; \
501473
fi
502474

503-
test-build: | all build-addons build-abort-tests build-js-native-api-tests build-node-api-tests
475+
test-build: | all build-addons build-js-native-api-tests build-node-api-tests
504476

505477
test-build-js-native-api: all build-js-native-api-tests
506478

507479
test-build-node-api: all build-node-api-tests
508480

509-
test-build-abort: all build-abort-tests
510-
511481
.PHONY: test-all
512482
test-all: test-build ## Run default tests with both Debug and Release builds.
513483
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=debug,release
@@ -520,7 +490,7 @@ test-all-suites: | clear-stalled test-build bench-addons-build doc-only ## Run a
520490
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) test/*
521491

522492
# CI_* variables should be kept synchronized with the ones in vcbuild.bat
523-
CI_NATIVE_SUITES ?= addons js-native-api node-api abort
493+
CI_NATIVE_SUITES ?= addons js-native-api node-api
524494
CI_JS_SUITES ?= default
525495
ifeq ($(node_use_openssl), false)
526496
CI_DOC := doctool
@@ -532,7 +502,7 @@ endif
532502
# Build and test addons without building anything else
533503
# Related CI job: node-test-commit-arm-fanned
534504
test-ci-native: LOGLEVEL := info
535-
test-ci-native: | test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp test/abort/.buildstamp
505+
test-ci-native: | test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
536506
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
537507
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
538508
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)
@@ -554,7 +524,7 @@ test-ci-js: | clear-stalled
554524
.PHONY: test-ci
555525
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned
556526
test-ci: LOGLEVEL := info
557-
test-ci: | clear-stalled build-addons build-abort-tests build-js-native-api-tests build-node-api-tests doc-only
527+
test-ci: | clear-stalled build-addons build-js-native-api-tests build-node-api-tests doc-only
558528
out/Release/cctest --gtest_output=xml:out/junit/cctest.xml
559529
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
560530
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
@@ -659,17 +629,8 @@ test-node-api-clean:
659629
$(RM) -r test/node-api/*/build
660630
$(RM) test/node-api/.buildstamp
661631

662-
.PHONY: test-abort
663-
test-abort: test-build-abort
664-
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) test-abort
665-
666-
.PHONY: test-abort-clean
667-
test-abort-clean:
668-
$(RM) -r test/abort/*/build
669-
$(RM) test/abort/.buildstamp
670-
671632
.PHONY: test-addons
672-
test-addons: test-build test-js-native-api test-node-api test-abort
633+
test-addons: test-build test-js-native-api test-node-api
673634
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) addons
674635

675636
.PHONY: test-addons-clean
@@ -679,7 +640,6 @@ test-addons-clean:
679640
$(RM) test/addons/.buildstamp test/addons/.docbuildstamp
680641
$(MAKE) test-js-native-api-clean
681642
$(MAKE) test-node-api-clean
682-
$(MAKE) test-abort-clean
683643

684644
test-async-hooks:
685645
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) async-hooks
@@ -688,7 +648,6 @@ test-with-async-hooks:
688648
$(MAKE) build-addons
689649
$(MAKE) build-js-native-api-tests
690650
$(MAKE) build-node-api-tests
691-
$(MAKE) build-abort-tests
692651
$(MAKE) cctest
693652
NODE_TEST_WITH_ASYNC_HOOKS=1 $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \
694653
$(CI_JS_SUITES) \

‎vcbuild.bat

+4-26
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ if /i "%1"=="/?" goto help
1616
cd %~dp0
1717

1818
@rem CI_* variables should be kept synchronized with the ones in Makefile
19-
set CI_NATIVE_SUITES=addons js-native-api node-api abort
19+
set CI_NATIVE_SUITES=addons js-native-api node-api
2020
set CI_JS_SUITES=default
2121
set CI_DOC=doctool
2222
@rem Same as the test-ci target in Makefile
23-
set "common_test_suites=%CI_JS_SUITES% %CI_NATIVE_SUITES% %CI_DOC%&set build_addons=1&set build_js_native_api_tests=1&set build_node_api_tests=1&set build_aborts_tests=1"
23+
set "common_test_suites=%CI_JS_SUITES% %CI_NATIVE_SUITES% %CI_DOC%&set build_addons=1&set build_js_native_api_tests=1&set build_node_api_tests=1"
2424

2525
@rem Process arguments.
2626
set config=Release
@@ -68,7 +68,6 @@ set openssl_no_asm=
6868
set doc=
6969
set extra_msbuild_args=
7070
set exit_code=0
71-
set build_aborts_tests=
7271

7372
:next-arg
7473
if "%1"=="" goto args-done
@@ -97,8 +96,6 @@ if /i "%1"=="test-ci-js" set test_args=%test_args% %test_ci_args% -J -p tap -
9796
if /i "%1"=="build-addons" set build_addons=1&goto arg-ok
9897
if /i "%1"=="build-js-native-api-tests" set build_js_native_api_tests=1&goto arg-ok
9998
if /i "%1"=="build-node-api-tests" set build_node_api_tests=1&goto arg-ok
100-
if /i "%1"=="build-abort-tests" set build_abort_tests=1&goto arg-ok
101-
if /i "%1"=="test-abort" set test_args=%test_args% abort&set build_abort_tests=1&goto arg-ok
10299
if /i "%1"=="test-addons" set test_args=%test_args% addons&set build_addons=1&goto arg-ok
103100
if /i "%1"=="test-js-native-api" set test_args=%test_args% js-native-api&set build_js_native_api_tests=1&goto arg-ok
104101
if /i "%1"=="test-node-api" set test_args=%test_args% node-api&set build_node_api_tests=1&goto arg-ok
@@ -582,10 +579,10 @@ endlocal
582579
goto build-node-api-tests
583580

584581
:build-node-api-tests
585-
if not defined build_node_api_tests goto build-abort-tests
582+
if not defined build_node_api_tests goto run-tests
586583
if not exist "%node_exe%" (
587584
echo Failed to find node.exe
588-
goto build-abort-tests
585+
goto run-tests
589586
)
590587
echo Building node-api
591588
:: clear
@@ -598,25 +595,6 @@ set npm_config_nodedir=%~dp0
598595
"%node_exe%" "%~dp0tools\build-addons.js" "%~dp0deps\npm\node_modules\node-gyp\bin\node-gyp.js" "%~dp0test\node-api"
599596
if errorlevel 1 exit /b 1
600597
endlocal
601-
goto build-abort-tests
602-
603-
:build-abort-tests
604-
if not defined build_abort_tests goto run-tests
605-
if not exist "%node_exe%" (
606-
echo Failed to find node.exe
607-
goto run-tests
608-
)
609-
echo Building abort
610-
:: clear
611-
for /d %%F in (test\abort\??_*) do (
612-
rd /s /q %%F
613-
)
614-
:: building abort
615-
setlocal
616-
set npm_config_nodedir=%~dp0
617-
"%node_exe%" "%~dp0tools\build-addons.js" "%~dp0deps\npm\node_modules\node-gyp\bin\node-gyp.js" "%~dp0test\abort"
618-
if errorlevel 1 exit /b 1
619-
endlocal
620598
goto run-tests
621599

622600
:run-tests

0 commit comments

Comments
 (0)
Please sign in to comment.