Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Clean-up sendtohelix and fix prop ordering issue
The ordering issue was discovered in #55074 (comment). Fixing it by not reading from properties which aren't defined in props inside the project file but from within an initial target.
  • Loading branch information
ViktorHofer authored Jul 7, 2021
commit 5ac1415909ed6a83e9249e21558321fedd6e921c
22 changes: 10 additions & 12 deletions src/libraries/sendtohelix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,26 @@
"correlation payload", which is the set of files used by all Helix submissions
(which we compress into a single file).
-->
<Project Sdk="Microsoft.Build.NoTargets">
<Project Sdk="Microsoft.Build.NoTargets" InitialTargets="_SetTestArchiveRuntimeFile">

<PropertyGroup>
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<BuildTargetFramework>$([MSBuild]::ValueOrDefault('$(BuildTargetFramework)', '$(NetCoreAppCurrent)'))</BuildTargetFramework>
<BuildTargetFramework Condition="'$(BuildTargetFramework)' == ''">$(NetCoreAppCurrent)</BuildTargetFramework>
<TargetsWindows Condition="'$(TargetOS)' == 'windows'">true</TargetsWindows>

<!-- The Helix correlation payload file -->
<TestArchiveRuntimeFile Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)'">$(TestArchiveRuntimeRoot)test-runtime-$(NetCoreAppCurrentBuildSettings).zip</TestArchiveRuntimeFile>

<!-- Set the name of the scenario file. Note that this is only used in invocations where $(Scenario) is set
(which is when this project is invoked to call the "CreateOneScenarioTestEnvFile" target). -->
<TestEnvFileName Condition=" '$(TargetsWindows)' == 'true' ">SetStressModes_$(Scenario).cmd</TestEnvFileName>
<TestEnvFileName Condition=" '$(TargetsWindows)' != 'true' ">SetStressModes_$(Scenario).sh</TestEnvFileName>

</PropertyGroup>

<!-- The Helix correlation payload file -->
<Target Name="_SetTestArchiveRuntimeFile"
Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)'">
<PropertyGroup>
<TestArchiveRuntimeFile>$(TestArchiveRuntimeRoot)test-runtime-$(NetCoreAppCurrentBuildSettings).zip</TestArchiveRuntimeFile>
</PropertyGroup>
</Target>

<Target Name="RunInParallelForEachScenario"
AfterTargets="Build">
Expand Down Expand Up @@ -83,12 +87,8 @@
<MSBuild Projects="@(_ProjectsToBuild)" Targets="Test" BuildInParallel="$(_BuildInParallel)" StopOnFirstFailure="false" />
</Target>

<PropertyGroup>
</PropertyGroup>

<Target Name="CreateOneScenarioTestEnvFile">
<!-- This target creates one __TestEnv file for the single $(Scenario). -->

<Error Condition="'$(Scenario)' == ''" Text="No Scenario specified" />

<PropertyGroup>
Expand Down Expand Up @@ -157,7 +157,6 @@
Outputs="$(TestArchiveRuntimeFile)"
Condition="'$(TargetsMobile)' != 'true' and
'$(TestArchiveRuntimeFile)' != ''">

<!-- Compress the test files, testhost, and per-scenario scripts into a single ZIP file for sending to the Helix machines. -->

<Message Importance="High" Text="Compressing runtime directory" />
Expand All @@ -168,7 +167,6 @@
<ZipDirectory SourceDirectory="$(NetCoreAppCurrentTestHostPath)"
DestinationFile="$(TestArchiveRuntimeFile)"
Overwrite="true" />

</Target>

<!--
Expand Down