Skip to content

Commit

Permalink
Move setting variables to HelixPreCommands (dotnet#96713)
Browse files Browse the repository at this point in the history
Move setting `__TestArchitecture` variable to HelixPreCommands

In particular, restore the RunTests.cmd script as being architecture-independent.
  • Loading branch information
BruceForstall authored and tmds committed Jan 23, 2024
1 parent 1e44faf commit 9c9e564
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 0 additions & 3 deletions eng/testing/tests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@
<ItemGroup Condition="'$(IsXUnitLogCheckerSupported)' == 'true' and
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(NETCoreAppCurrentVersion)'))">
<SetScriptCommands Condition="'$(TargetOS)' == 'windows'" Include="set __TestArchitecture=$(TargetArchitecture)" />
<SetScriptCommands Condition="'$(TargetOS)' == 'windows'" Include="set __IsXUnitLogCheckerSupported=1" />

<SetScriptCommands Condition="'$(TargetOS)' != 'windows'" Include="export __TestArchitecture=$(TargetArchitecture)" />
<SetScriptCommands Condition="'$(TargetOS)' != 'windows'" Include="export __IsXUnitLogCheckerSupported=1" />
</ItemGroup>

Expand Down
8 changes: 8 additions & 0 deletions src/libraries/sendtohelixhelp.proj
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@
setting up the per-scenario environment.
-->

<ItemGroup Condition=" '$(TargetOS)' == 'windows' ">
<HelixPreCommand Include="set __TestArchitecture=$(TargetArchitecture)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetOS)' != 'windows' ">
<HelixPreCommand Include="export __TestArchitecture=$(TargetArchitecture)" />
</ItemGroup>

<ItemGroup Condition=" '$(TestEnvFileName)' != '' and '$(TargetOS)' == 'windows' ">
<HelixPreCommand Include="set __TestEnv=%HELIX_CORRELATION_PAYLOAD%\$(TestEnvFileName)" />
<HelixPreCommand Include="type %__TestEnv%" />
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Common/helixpublishwitharcade.proj
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@
<HelixPreCommand Include="export __TestCollectionTimeoutMins=$(TimeoutPerTestCollectionInMinutes)" Condition=" '$(TimeoutPerTestCollectionInMinutes)' != '' " />
<HelixPreCommand Include="export __CollectDumps=1" />
<HelixPreCommand Include="export __CrashDumpFolder=$HELIX_DUMP_FOLDER" />
<HelixPreCommand Include="set __TestArchitecture=$(TargetArchitecture)" />
<HelixPreCommand Include="export __TestArchitecture=$(TargetArchitecture)" />
<HelixPreCommand Include="cat $__TestEnv" />

<HelixPostCommand Include="find $HELIX_WORKITEM_PAYLOAD -name '*testResults.xml' -exec cp {} $HELIX_DUMP_FOLDER\; " />
Expand Down

0 comments on commit 9c9e564

Please sign in to comment.