Skip to content

Commit ee10bae

Browse files
authored
fix crossgen2determinism test (dotnet#102742)
Race condition between tests
1 parent e730d83 commit ee10bae

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/tests/readytorun/determinism/crossgen2determinism.csproj

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
1+
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current" InitialTargets="PrepareDLLs">
22
<PropertyGroup>
33
<!-- Needed for CLRTestTargetUnsupported, GCStressIncompatible, CrossGenTest -->
44
<RequiresProcessIsolation>true</RequiresProcessIsolation>
@@ -14,20 +14,26 @@
1414
<ItemGroup>
1515
<Compile Include="Program.cs" />
1616
</ItemGroup>
17+
18+
<Target Name="PrepareDLLs">
19+
<MSBuild Projects="..\crossgen2\crossgen2smoke.csproj" Properties="OutputPath=$(OutputPath)\crossgen2smoke" />
20+
<Delete Files="$(OutputPath)\crossgen2smoke\crossgen2smoke.sh" />
21+
</Target>
22+
1723
<PropertyGroup>
1824
<CLRTestBatchPreCommands><![CDATA[
1925
$(CLRTestBatchPreCommands)
2026
set CoreRT_DeterminismSeed=1
21-
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:..\..\crossgen2\crossgen2smoke\helperdll.dll -r:..\..\crossgen2\crossgen2smoke\helperildll.dll -o:crossgen2smoke1.ildll ..\..\crossgen2\crossgen2smoke\crossgen2smoke.dll
27+
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:.\crossgen2smoke\helperdll.dll -r:.\crossgen2smoke\helperildll.dll -o:crossgen2smoke1.ildll .\crossgen2smoke\crossgen2smoke.dll
2228
set CoreRT_DeterminismSeed=2
23-
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:..\..\crossgen2\crossgen2smoke\helperdll.dll -r:..\..\crossgen2\crossgen2smoke\helperildll.dll -o:crossgen2smoke2.ildll ..\..\crossgen2\crossgen2smoke\crossgen2smoke.dll
29+
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:.\crossgen2smoke\helperdll.dll -r:.\crossgen2smoke\helperildll.dll -o:crossgen2smoke2.ildll .\crossgen2smoke\crossgen2smoke.dll
2430
]]></CLRTestBatchPreCommands>
2531
<CLRTestBashPreCommands><![CDATA[
2632
$(CLRTestBashPreCommands)
2733
export CoreRT_DeterminismSeed=1
28-
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:../../crossgen2/crossgen2smoke/helperdll.dll -r:../../crossgen2/crossgen2smoke/helperildll.dll -o:crossgen2smoke1.ildll ../../crossgen2/crossgen2smoke/crossgen2smoke.dll
34+
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:./crossgen2smoke/helperdll.dll -r:./crossgen2smoke/helperildll.dll -o:crossgen2smoke1.ildll ./crossgen2smoke/crossgen2smoke.dll
2935
export CoreRT_DeterminismSeed=2
30-
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:../../crossgen2/crossgen2smoke/helperdll.dll -r:../../crossgen2/crossgen2smoke/helperildll.dll -o:crossgen2smoke2.ildll ../../crossgen2/crossgen2smoke/crossgen2smoke.dll
36+
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:./crossgen2smoke/helperdll.dll -r:./crossgen2smoke/helperildll.dll -o:crossgen2smoke2.ildll ./crossgen2smoke/crossgen2smoke.dll
3137
]]></CLRTestBashPreCommands>
3238
</PropertyGroup>
3339
</Project>

0 commit comments

Comments
 (0)