Skip to content
This repository was archived by the owner on Oct 16, 2021. It is now read-only.

Commit 0d33a51

Browse files
orangemochajBarz
authored andcommitted
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 Conflicts: Makefile Reviewed-By: Julien Gilli <[email protected]> PR-URL: nodejs#25653
1 parent 518f342 commit 0d33a51

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
@@ -6,6 +6,7 @@ NINJA ?= ninja
66
DESTDIR ?=
77
SIGN ?=
88
PREFIX ?= /usr/local
9+
FLAKY_TESTS ?= run
910

1011
NODE ?= ./node
1112

@@ -128,7 +129,7 @@ test-all-valgrind: test-build
128129
$(PYTHON) tools/test.py --mode=debug,release --valgrind
129130

130131
test-ci:
131-
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --arch=$(DESTCPU) simple message internet
132+
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --arch=$(DESTCPU) --flaky-tests=$(FLAKY_TESTS) simple message internet
132133

133134
test-release: test-build
134135
$(PYTHON) tools/test.py --mode=release

vcbuild.bat

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ set noperfctr_msi_arg=
3838
set i18n_arg=
3939
set download_arg=
4040
set build_release=
41+
set flaky_tests_arg=
4142

4243
:next-arg
4344
if "%1"=="" goto args-done
@@ -72,6 +73,7 @@ if /i "%1"=="full-icu" set i18n_arg=%1&goto arg-ok
7273
if /i "%1"=="intl-none" set i18n_arg=%1&goto arg-ok
7374
if /i "%1"=="download-all" set download_arg="--download=all"&goto arg-ok
7475
if /i "%1"=="build-release" set build_release=1&goto arg-ok
76+
if /i "%1"=="ignore-flaky" set flaky_tests_arg=--flaky-tests=dontcare&goto arg-ok
7577

7678
echo Warning: ignoring invalid command line option `%1`.
7779

@@ -205,7 +207,7 @@ if "%config%"=="Release" set test_args=--mode=release
205207
set test_args=%test_args% --arch=%target_arch%
206208

207209
if "%test%"=="test" set test_args=%test_args% simple message
208-
if "%test%"=="test-ci" set test_args=%test_args% -p tap --logfile test.tap simple message internet
210+
if "%test%"=="test-ci" set test_args=%test_args% -p tap --logfile test.tap %flaky_tests_arg% simple message internet
209211
if "%test%"=="test-internet" set test_args=%test_args% internet
210212
if "%test%"=="test-pummel" set test_args=%test_args% pummel
211213
if "%test%"=="test-simple" set test_args=%test_args% simple

0 commit comments

Comments
 (0)