Skip to content

Commit 6195b46

Browse files
committed
test: support flaky tests in test-ci
Adding support for specifying flaky test mode to the test runner: - via an environment variable FLAKY_TESTS for Makefile - via an argument ignore-flaky for vcbuild.bat Ported from nodejs/node-v0.x-archive@2d2494c PR-URL: #2424 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: João Reis <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent ff05953 commit 6195b46

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PYTHON ?= python
55
DESTDIR ?=
66
SIGN ?=
77
PREFIX ?= /usr/local
8+
FLAKY_TESTS ?= run
89
STAGINGSERVER ?= node-www
910

1011
OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]')
@@ -140,7 +141,7 @@ test-all-valgrind: test-build
140141
$(PYTHON) tools/test.py --mode=debug,release --valgrind
141142

142143
test-ci: | build-addons
143-
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release \
144+
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --flaky-tests=$(FLAKY_TESTS) \
144145
addons message parallel sequential
145146

146147
test-release: test-build

vcbuild.bat

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ if /i "%1"=="small-icu" set i18n_arg=%1&goto arg-ok
7070
if /i "%1"=="full-icu" set i18n_arg=%1&goto arg-ok
7171
if /i "%1"=="intl-none" set i18n_arg=%1&goto arg-ok
7272
if /i "%1"=="download-all" set download_arg="--download=all"&goto arg-ok
73+
if /i "%1"=="ignore-flaky" set test_args=%test_args% --flaky-tests=dontcare&goto arg-ok
7374

7475
echo Warning: ignoring invalid command line option `%1`.
7576

0 commit comments

Comments
 (0)