Skip to content

Commit 1bd2b5f

Browse files
authored
[Helix] Only run flaky tests on quarantine runs (#18937)
* Only run flaky tests on quaratine run * Only run flaky tests on quarantine run * Rename to QUARANTINE * Rename to QUARANTINE
1 parent 9733704 commit 1bd2b5f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

eng/helix/content/runtests.cmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ if not errorlevel 1 (
4040
set exit_code=0
4141

4242
set NONQUARANTINE_FILTER="Flaky:All!=true&Flaky:Helix:All!=true&Flaky:Helix:Queue:All!=true&Flaky:Helix:Queue:%HELIX%!=true"
43+
set QUARANTINE_FILTER="Flaky:All=true|Flaky:Helix:All=true|Flaky:Helix:Queue:All=true|Flaky:Helix:Queue:%HELIX%=true"
4344
if (%quarantined%==true) (
4445
echo Running all tests.
45-
%DOTNET_ROOT%\dotnet vstest %target% --logger:xunit
46+
%DOTNET_ROOT%\dotnet vstest %target% --logger:xunit --TestCaseFilter:%QUARANTINE_FILTER%
4647
if errorlevel 1 (
4748
echo Failure in flaky test 1>&2
4849
REM DO NOT EXIT and DO NOT SET EXIT_CODE to 1

eng/helix/content/runtests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@ exit_code=0
104104
# only puts the explicit filter traits the user provided in the flaky attribute
105105
# Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
106106
NONQUARANTINE_FILTER="Flaky:All!=true&Flaky:Helix:All!=true&Flaky:Helix:Queue:All!=true&Flaky:Helix:Queue:$helix_queue_name!=true"
107+
QUARANTINE_FILTER="Flaky:All=true|Flaky:Helix:All=true|Flaky:Helix:Queue:All=true|Flaky:Helix:Queue:$helix_queue_name=true"
107108
if [ "$quarantined" == true ]; then
108109
echo "Running all tests including quarantined."
109-
$DOTNET_ROOT/dotnet vstest $test_binary_path --logger:xunit
110+
$DOTNET_ROOT/dotnet vstest $test_binary_path --logger:xunit --TestCaseFilter:"$QUARANTINE_FILTER"
110111
if [ $? != 0 ]; then
111112
echo "Quarantined tests failed!" 1>&2
112113
# DO NOT EXIT

0 commit comments

Comments
 (0)