From c06653efdbee30cc3db5814af78ce2d824da2413 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Tue, 22 Jan 2019 16:26:28 -0500 Subject: [PATCH] test: enable marking of failing coverage tests Enable marking of coverage tests so that we can allow some tests to fail without blocking the generation of coverage data. This will later allow us to fail the coverage job if other kinds of errors occur and to capture which tests we believe are not running properly with coverage enabled. PR-URL: https://github.com/nodejs/node/pull/25671 Reviewed-By: Ben Coe Reviewed-By: Ruben Bridgewater Reviewed-By: Refael Ackermann --- Makefile | 5 +++-- test/root.status | 4 ++++ tools/test.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9fcf7e08701..7ab4a3c70f6 100644 --- a/Makefile +++ b/Makefile @@ -226,7 +226,8 @@ coverage-test: coverage-build $(RM) out/$(BUILDTYPE)/obj.target/node_lib/gen/*.gcda $(RM) out/$(BUILDTYPE)/obj.target/node_lib/src/*.gcda $(RM) out/$(BUILDTYPE)/obj.target/node_lib/src/tracing/*.gcda - -NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage $(MAKE) $(COVTESTS) + -NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage \ + TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS) $(MAKE) coverage-report-js -(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \ --gcov-exclude='.*usr' -v -r Release/obj.target \ @@ -277,7 +278,7 @@ coverage-run-js: $(RM) -r out/$(BUILDTYPE)/.coverage $(MAKE) coverage-build-js -NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage CI_SKIP_TESTS=$(COV_SKIP_TESTS) \ - $(MAKE) jstest + TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) jstest $(MAKE) coverage-report-js .PHONY: test diff --git a/test/root.status b/test/root.status index e5dd389cae0..6d5bc44491c 100644 --- a/test/root.status +++ b/test/root.status @@ -159,3 +159,7 @@ sequential/test-inspector-port-cluster: SLOW sequential/test-net-bytes-per-incoming-chunk-overhead: SLOW sequential/test-pipe: SLOW sequential/test-util-debug: SLOW + +[$type==coverage] +js-native-api/test_function/test: PASS,FAIL,CRASH +js-native-api/test_general/testFinalizer: PASS,FAIL,CRASH diff --git a/tools/test.py b/tools/test.py index 56b1c8d650b..4ac8d0e631c 100755 --- a/tools/test.py +++ b/tools/test.py @@ -1391,7 +1391,7 @@ def BuildOptions(): help='Send SIGABRT instead of SIGTERM to kill processes that time out', default=False, action="store_true", dest="abort_on_timeout") result.add_option("--type", - help="Type of build (simple, fips)", + help="Type of build (simple, fips, coverage)", default=None) return result