Skip to content

Commit ffa1e1f

Browse files
committed
build: 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 PR-URL: nodejs/node-v0.x-archive#25686 Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
1 parent 100dd19 commit ffa1e1f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PYTHON ?= python
55
NINJA ?= ninja
66
DESTDIR ?=
77
SIGN ?=
8+
FLAKY_TESTS ?= run
89

910
NODE ?= ./node
1011

@@ -102,7 +103,7 @@ test-all-valgrind: all
102103
$(PYTHON) tools/test.py --mode=debug,release --valgrind
103104

104105
test-ci:
105-
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --arch=$(DESTCPU) simple message internet
106+
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --arch=$(DESTCPU) --flaky-tests=$(FLAKY_TESTS) simple message internet
106107

107108
test-release: all
108109
$(PYTHON) tools/test.py --mode=release

vcbuild.bat

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ set noetw_msi_arg=
3535
set noperfctr=
3636
set noperfctr_arg=
3737
set noperfctr_msi_arg=
38+
set flaky_tests_arg=
3839

3940
:next-arg
4041
if "%1"=="" goto args-done
@@ -64,6 +65,7 @@ if /i "%1"=="msi" set msi=1&set licensertf=1&goto arg-ok
6465
if /i "%1"=="upload" set upload=1&goto arg-ok
6566
if /i "%1"=="jslint" set jslint=1&goto arg-ok
6667
if /i "%1"=="build-release" set nosnapshot=1&set config=Release&set msi=1&set licensertf=1&goto arg-ok
68+
if /i "%1"=="ignore-flaky" set flaky_tests_arg=--flaky-tests=dontcare&goto arg-ok
6769

6870
echo Warning: ignoring invalid command line option `%1`.
6971

@@ -174,7 +176,7 @@ if "%config%"=="Release" set test_args=--mode=release
174176
set test_args=%test_args% --arch=%target_arch%
175177

176178
if "%test%"=="test" set test_args=%test_args% simple message
177-
if "%test%"=="test-ci" set test_args=%test_args% -p tap --logfile test.tap simple message internet
179+
if "%test%"=="test-ci" set test_args=%test_args% -p tap --logfile test.tap %flaky_tests_arg% simple message internet
178180
if "%test%"=="test-internet" set test_args=%test_args% internet
179181
if "%test%"=="test-pummel" set test_args=%test_args% pummel
180182
if "%test%"=="test-simple" set test_args=%test_args% simple

0 commit comments

Comments
 (0)