Skip to content

Commit

Permalink
Infrastructure: correct dependencies and clean helix agent from stray…
Browse files Browse the repository at this point in the history
… corerun procs (#54094)

* Add dependency on coreclr in monojit/monointerpreter jobs explicitly to solve pipeline issue #53842
* Use Helix Pre/Post hooks to kill linkering corerun instances to work around ARM64 agent issues

Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
  • Loading branch information
hoyosjs and kunalspathak authored Jun 13, 2021
1 parent 4bb1318 commit 86cebb3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
2 changes: 2 additions & 0 deletions eng/pipelines/common/templates/runtimes/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
- '${{ parameters.runtimeFlavor }}_common_test_build_p1_AnyOS_AnyCPU_${{parameters.buildConfig }}'
- ${{ if ne(parameters.stagedBuild, true) }}:
- ${{ if or( eq(parameters.runtimeVariant, 'minijit'), eq(parameters.runtimeVariant, 'monointerpreter')) }}:
# This is needed for creating a CORE_ROOT in the current design.
- ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', '', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
# minijit and mono interpreter runtimevariants do not require any special build of the runtime
- ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, '', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ if not(or(eq(parameters.runtimeVariant, 'minijit'), eq(parameters.runtimeVariant, 'monointerpreter'))) }}:
Expand Down
7 changes: 6 additions & 1 deletion src/coreclr/scripts/superpmi.proj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@
<WorkItemTimeout>5:00</WorkItemTimeout>
</PropertyGroup>

<ItemGroup Condition=" '$(AGENT_OS)' == 'Windows_NT' ">
<HelixPreCommand Include="taskkill.exe /f /im corerun.exe"/>
<HelixPostCommand Include="taskkill.exe /f /im corerun.exe"/>
</ItemGroup>
<!-- We're currently not using .dotnet on the Helix agents -->
<!--
<ItemGroup Condition=" '$(AGENT_OS)' == 'Windows_NT' ">
Expand All @@ -94,11 +98,12 @@
<ItemGroup Condition=" '$(AGENT_OS)' != 'Windows_NT' ">
<HelixPreCommand Include="export PATH=$HELIX_CORRELATION_PAYLOAD/.dotnet:$PATH" Condition=" '$(CollectionType)' == 'crossgen2' "/>
</ItemGroup>
-->

<PropertyGroup>
<HelixPreCommands>@(HelixPreCommand)</HelixPreCommands>
<HelixPostCommands>@(HelixPostCommand)</HelixPostCommands>
</PropertyGroup>
-->

<ItemGroup>
<HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
Expand Down
7 changes: 6 additions & 1 deletion src/libraries/sendtohelixhelp.proj
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
<HelixPreCommand Condition="'$(TargetsWindows)' != 'true' and '$(BrowserHost)' != 'windows'" Include="export MONO_ENV_OPTIONS='$(MonoEnvOptions)'" />
</ItemGroup>

<ItemGroup Condition="'$(TargetsWindows)' == 'true' or '$(BrowserHost)' == 'windows'">
<HelixPreCommand Include="taskkill.exe /f /im corerun.exe"/>
<HelixPostCommand Include="taskkill.exe /f /im corerun.exe"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(BrowserHost)' != 'windows'">
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnBrowser'" Include="export XHARNESS_COMMAND=test" />
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnBrowser'" Include="export XHARNESS_COMMAND=test-browser" />
Expand All @@ -82,7 +87,7 @@
</ItemGroup>

<PropertyGroup Condition="'$(TargetOS)' == 'Browser'">
<!--
<!--
We are hosting the payloads for the WASM/browser on kestrel in the xharness process.
We also run some network tests to this server and so, we are running it on both HTTP and HTTPS.
For the HTTPS endpoint we need development SSL certificate.
Expand Down
18 changes: 12 additions & 6 deletions src/tests/Common/helixpublishwitharcade.proj
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
PALTestsDir=$(_PALTestsDir)
</_PropertiesToPass>


<_PropertiesToPass Condition="'$(TargetOS)' == 'Browser' Or '$(TargetOS)' == 'Android'">
$(_PropertiesToPass);
IncludeDotNetCli=$(IncludeDotNetCli);
DotNetCliRuntime=$(DotNetCliRuntime);
DotNetCliPackageType=$(DotNetCliPackageType);
DotNetCliVersion=$(DotNetCliVersion)
</_PropertiesToPass>
</PropertyGroup>
</PropertyGroup>
<Message Text="DotNetCliVersion: $(DotNetCliVersion)" Importance="High" />
<Message Text="DotNetCliPackageType: $(DotNetCliPackageType)" Importance="High" />
<Message Text="HelixRuntimeRid: $(HelixRuntimeRid)" Importance="High" />
Expand Down Expand Up @@ -95,7 +95,7 @@
<IncludeDotNetCli>true</IncludeDotNetCli>
<DotNetCliPackageType>runtime</DotNetCliPackageType>
<DotNetCliVersion>$(BundledNETCoreAppPackageVersion)</DotNetCliVersion>
<DotNetCliRuntime>$(HelixRuntimeRid)</DotNetCliRuntime>
<DotNetCliRuntime>$(HelixRuntimeRid)</DotNetCliRuntime>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetOS)' == 'Browser' Or '$(TargetOS)' == 'Android'">
Expand Down Expand Up @@ -168,7 +168,7 @@
<!-- Remove the managed pdbs from our payloads.
This is for performance reasons to reduce our helix payload size -->
<ReducedPayloadFiles Include="@(_PayloadFiles)" Condition=" '%(Extension)' != '.pdb' " />

<ReducedPayloadFilesFinal Include="@(ReducedPayloadFiles)" Condition=" '%(Extension)' != '.sh' and '$(TestWrapperTargetsWindows)' == 'true' "/>
<ReducedPayloadFilesFinal Include="@(ReducedPayloadFiles)" Condition=" '%(Extension)' != '.cmd' and '$(TestWrapperTargetsWindows)' != 'true' "/>
</ItemGroup>
Expand Down Expand Up @@ -202,7 +202,7 @@
</Target>

<Target Name="PreparePALTestArchive">
<Exec Condition="'$(PALTestsDir)' != '' and '$(TestWrapperTargetsWindows)' != 'true'"
<Exec Condition="'$(PALTestsDir)' != '' and '$(TestWrapperTargetsWindows)' != 'true'"
WorkingDirectory="$(PALTestsDir)"
Command="tar -czvf $(PayloadsRootDirectory)paltests.tar.gz `ls -A`"/>
</Target>
Expand Down Expand Up @@ -234,7 +234,7 @@
<RunCrossGen2 Condition=" '$(RunCrossGen2)' != 'true' ">false</RunCrossGen2>
<LongRunningGCTests Condition=" '$(LongRunningGCTests)' != 'true' ">false</LongRunningGCTests>
<GcSimulatorTests Condition=" '$(GcSimulatorTests)' != 'true' ">false</GcSimulatorTests>
<TestRunNamePrefix Condition="'$(RuntimeFlavorDisplayName)' != ''">$(RuntimeFlavorDisplayName) </TestRunNamePrefix>
<TestRunNamePrefix Condition="'$(RuntimeFlavorDisplayName)' != ''">$(RuntimeFlavorDisplayName) </TestRunNamePrefix>
<TestRunNamePrefix Condition=" '$(RunCrossGen)' == 'true' ">R2R </TestRunNamePrefix>
<TestRunNamePrefix Condition=" '$(RunCrossGen2)' == 'true' ">R2R-CG2 </TestRunNamePrefix>
<TestRunNamePrefix Condition=" '$(Scenario)' == 'normal' ">$(TestRunNamePrefix)$(TargetOS) $(TargetArchitecture) $(Configuration) @ </TestRunNamePrefix>
Expand All @@ -251,6 +251,7 @@
<!-- WARNING: HelixPreCommand ItemGroup is intentionally minimal and should be kept that way. -->

<ItemGroup Condition=" '$(TestWrapperTargetsWindows)' == 'true' ">
<HelixPreCommand Include="taskkill.exe /f /im corerun.exe"/>
<HelixPreCommand Include="set CORE_ROOT=%HELIX_CORRELATION_PAYLOAD%" />
<!-- Set _NT_SYMBOL_PATH so VM _ASSERTE() asserts can find the symbol files when doing stack walks -->
<HelixPreCommand Include="set _NT_SYMBOL_PATH=%HELIX_CORRELATION_PAYLOAD%\PDB" />
Expand All @@ -268,6 +269,10 @@
<HelixPreCommand Include="type %__TestEnv%" />
</ItemGroup>

<ItemGroup Condition=" '$(TestWrapperTargetsWindows)' == 'true' ">
<HelixPostCommand Include="taskkill.exe /f /im corerun.exe"/>
</ItemGroup>

<ItemGroup Condition=" '$(TestWrapperTargetsWindows)' != 'true' ">
<HelixPreCommand Include="export CORE_ROOT=$HELIX_CORRELATION_PAYLOAD" />
<HelixPreCommand Include="export RunCrossGen2=1" Condition=" '$(RunCrossGen)' == 'true' " />
Expand All @@ -286,6 +291,7 @@

<PropertyGroup>
<HelixPreCommands>@(HelixPreCommand)</HelixPreCommands>
<HelixPostCommands>@(HelixPostCommand)</HelixPostCommands>
</PropertyGroup>

<PropertyGroup Condition=" '$(TestWrapperTargetsWindows)' == 'true' ">
Expand Down

0 comments on commit 86cebb3

Please sign in to comment.