Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nycrc
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,5 +2,6 @@
"exclude": [
"**/internal/process/write-coverage.js"
],
"compact": false,
"reporter": ["html", "text"]
}
4 changes: 2 additions & 2 deletions Makefile
Original file line numberDiff line numberDiff line change
Expand Up@@ -235,6 +235,7 @@ v8:
.PHONY: jstest
jstest: build-addons build-addons-napi ## Runs addon tests and JS tests
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \
--skip-tests=$(CI_SKIP_TESTS) \
$(CI_JS_SUITES) \
$(CI_NATIVE_SUITES)

Expand DownExpand Up@@ -265,8 +266,7 @@ test-cov: all
$(MAKE) build-addons
$(MAKE) build-addons-napi
# $(MAKE) cctest
$(MAKE) jstest
$(MAKE) lint
CI_SKIP_TESTS=core_line_numbers.js $(MAKE) jstest

test-parallel: all
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) parallel
Expand Down
9 changes: 9 additions & 0 deletions tools/test.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -1382,6 +1382,9 @@ def BuildOptions():
result.add_option("--flaky-tests",
help="Regard tests marked as flaky (run|skip|dontcare)",
default="run")
result.add_option("--skip-tests",
help="Tests that should not be executed (comma-separated)",
default="")
result.add_option("--warn-unused", help="Report unused rules",
default=False, action="store_true")
result.add_option("-j", help="The number of parallel tasks to run",
Expand DownExpand Up@@ -1424,6 +1427,7 @@ def ProcessOptions(options):
options.arch = options.arch.split(',')
options.mode = options.mode.split(',')
options.run = options.run.split(',')
options.skip_tests = options.skip_tests.split(',')
if options.run == [""]:
options.run = None
elif len(options.run) != 2:
Expand DownExpand Up@@ -1710,6 +1714,11 @@ def Main():

result = None
def DoSkip(case):
# A list of tests that should be skipped can be provided. This is
# useful for tests that fail in some environments, e.g., under coverage.
if options.skip_tests != [""]:
if [ st for st in options.skip_tests if st in case.case.file ]:
return True
if SKIP in case.outcomes or SLOW in case.outcomes:
return True
return FLAKY in case.outcomes and options.flaky_tests == SKIP
Expand Down