Skip to content

Commit f047c32

Browse files
committed
Hacking test script
1 parent 12969bb commit f047c32

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/tests/Common/CLRTest.Execute.Batch.targets

+13
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,15 @@ if not defined CLRTestExecutionArguments (set CLRTestExecutionArguments=$(CLRTes
146146
]]></BatchCLRTestArgPrep>
147147

148148
<!-- By default, be prepared to do a full check -->
149+
<BatchLoopPart2 Condition="'$(CLRTestLoop)' == 'true'"><![CDATA[SET /A RetryCount=%RetryCount%-1
150+
IF NOT "%RetryCount%"=="0" (
151+
GOTO :RetryingRerun
152+
) ELSE (
153+
ECHO END EXECUTION - PASSED BUT ALSO FAILED
154+
ECHO FAILED
155+
popd
156+
Exit /b 1
157+
)]]></BatchLoopPart2>
149158
<BatchCLRTestExitCodeCheck><![CDATA[
150159
ECHO Expected: %CLRTestExpectedExitCode%
151160
ECHO Actual: %CLRTestExitCode%
@@ -157,6 +166,7 @@ IF NOT "%CLRTestExitCode%"=="%CLRTestExpectedExitCode%" (
157166
) ELSE (
158167
ECHO END EXECUTION - PASSED
159168
ECHO PASSED
169+
$(BatchLoopPart2)
160170
popd
161171
Exit /b 0
162172
)
@@ -305,6 +315,8 @@ REM Local CoreShim requested - see MSBuild property 'CLRTestScriptLocalCoreShim'
305315
ECHO Copying '%CORE_ROOT%\CoreShim.dll'...
306316
COPY /y %CORE_ROOT%\CoreShim.dll .
307317
]]></BatchCopyCoreShimLocalCmds>
318+
<BatchLoopPart1 Condition="'$(CLRTestLoop)' == 'true'"><![CDATA[SET RetryCount=100
319+
:RetryingRerun]]></BatchLoopPart1>
308320
<BatchCLRTestLaunchCmds Condition="'$(CLRTestKind)' == 'BuildAndRun' And $(TargetOS) != 'android'">
309321
<![CDATA[
310322
$(BatchLinkerTestLaunchCmds)
@@ -323,6 +335,7 @@ if defined RunCrossGen2 (
323335
)
324336
325337
ECHO %LAUNCHER% %ExePath% %CLRTestExecutionArguments%
338+
$(BatchLoopPart1)
326339
%LAUNCHER% %ExePath% %CLRTestExecutionArguments%
327340
set CLRTestExitCode=!ERRORLEVEL!
328341
if defined RunCrossGen2 (

src/tests/readytorun/coreroot_determinism/coreroot_determinism.csproj

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<!-- We skip the ReadyToRun tests when sanitized due to build complexity -->
1111
<DisableProjectBuild Condition="'$(EnableNativeSanitizers)' != ''">true</DisableProjectBuild>
1212
<OldToolsVersion>2.0</OldToolsVersion>
13+
<!-- Rerun the test for 100 times or stop if we get a failure -->
14+
<CLRTestLoop>true</CLRTestLoop>
1315
</PropertyGroup>
1416
<ItemGroup>
1517
<Compile Include="Program.cs" />

0 commit comments

Comments
 (0)