Skip to content

Commit 86cebb3

Browse files
Infrastructure: correct dependencies and clean helix agent from stray 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>
1 parent 4bb1318 commit 86cebb3

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

eng/pipelines/common/templates/runtimes/run-test-job.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ jobs:
6464
- '${{ parameters.runtimeFlavor }}_common_test_build_p1_AnyOS_AnyCPU_${{parameters.buildConfig }}'
6565
- ${{ if ne(parameters.stagedBuild, true) }}:
6666
- ${{ if or( eq(parameters.runtimeVariant, 'minijit'), eq(parameters.runtimeVariant, 'monointerpreter')) }}:
67+
# This is needed for creating a CORE_ROOT in the current design.
68+
- ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', '', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
6769
# minijit and mono interpreter runtimevariants do not require any special build of the runtime
6870
- ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, '', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
6971
- ${{ if not(or(eq(parameters.runtimeVariant, 'minijit'), eq(parameters.runtimeVariant, 'monointerpreter'))) }}:

src/coreclr/scripts/superpmi.proj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585
<WorkItemTimeout>5:00</WorkItemTimeout>
8686
</PropertyGroup>
8787

88+
<ItemGroup Condition=" '$(AGENT_OS)' == 'Windows_NT' ">
89+
<HelixPreCommand Include="taskkill.exe /f /im corerun.exe"/>
90+
<HelixPostCommand Include="taskkill.exe /f /im corerun.exe"/>
91+
</ItemGroup>
8892
<!-- We're currently not using .dotnet on the Helix agents -->
8993
<!--
9094
<ItemGroup Condition=" '$(AGENT_OS)' == 'Windows_NT' ">
@@ -94,11 +98,12 @@
9498
<ItemGroup Condition=" '$(AGENT_OS)' != 'Windows_NT' ">
9599
<HelixPreCommand Include="export PATH=$HELIX_CORRELATION_PAYLOAD/.dotnet:$PATH" Condition=" '$(CollectionType)' == 'crossgen2' "/>
96100
</ItemGroup>
101+
-->
97102

98103
<PropertyGroup>
99104
<HelixPreCommands>@(HelixPreCommand)</HelixPreCommands>
105+
<HelixPostCommands>@(HelixPostCommand)</HelixPostCommands>
100106
</PropertyGroup>
101-
-->
102107

103108
<ItemGroup>
104109
<HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">

src/libraries/sendtohelixhelp.proj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@
6868
<HelixPreCommand Condition="'$(TargetsWindows)' != 'true' and '$(BrowserHost)' != 'windows'" Include="export MONO_ENV_OPTIONS='$(MonoEnvOptions)'" />
6969
</ItemGroup>
7070

71+
<ItemGroup Condition="'$(TargetsWindows)' == 'true' or '$(BrowserHost)' == 'windows'">
72+
<HelixPreCommand Include="taskkill.exe /f /im corerun.exe"/>
73+
<HelixPostCommand Include="taskkill.exe /f /im corerun.exe"/>
74+
</ItemGroup>
75+
7176
<ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(BrowserHost)' != 'windows'">
7277
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnBrowser'" Include="export XHARNESS_COMMAND=test" />
7378
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnBrowser'" Include="export XHARNESS_COMMAND=test-browser" />
@@ -82,7 +87,7 @@
8287
</ItemGroup>
8388

8489
<PropertyGroup Condition="'$(TargetOS)' == 'Browser'">
85-
<!--
90+
<!--
8691
We are hosting the payloads for the WASM/browser on kestrel in the xharness process.
8792
We also run some network tests to this server and so, we are running it on both HTTP and HTTPS.
8893
For the HTTPS endpoint we need development SSL certificate.

src/tests/Common/helixpublishwitharcade.proj

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@
3939
PALTestsDir=$(_PALTestsDir)
4040
</_PropertiesToPass>
4141

42-
42+
4343
<_PropertiesToPass Condition="'$(TargetOS)' == 'Browser' Or '$(TargetOS)' == 'Android'">
4444
$(_PropertiesToPass);
4545
IncludeDotNetCli=$(IncludeDotNetCli);
4646
DotNetCliRuntime=$(DotNetCliRuntime);
4747
DotNetCliPackageType=$(DotNetCliPackageType);
4848
DotNetCliVersion=$(DotNetCliVersion)
4949
</_PropertiesToPass>
50-
</PropertyGroup>
50+
</PropertyGroup>
5151
<Message Text="DotNetCliVersion: $(DotNetCliVersion)" Importance="High" />
5252
<Message Text="DotNetCliPackageType: $(DotNetCliPackageType)" Importance="High" />
5353
<Message Text="HelixRuntimeRid: $(HelixRuntimeRid)" Importance="High" />
@@ -95,7 +95,7 @@
9595
<IncludeDotNetCli>true</IncludeDotNetCli>
9696
<DotNetCliPackageType>runtime</DotNetCliPackageType>
9797
<DotNetCliVersion>$(BundledNETCoreAppPackageVersion)</DotNetCliVersion>
98-
<DotNetCliRuntime>$(HelixRuntimeRid)</DotNetCliRuntime>
98+
<DotNetCliRuntime>$(HelixRuntimeRid)</DotNetCliRuntime>
9999
</PropertyGroup>
100100

101101
<PropertyGroup Condition="'$(TargetOS)' == 'Browser' Or '$(TargetOS)' == 'Android'">
@@ -168,7 +168,7 @@
168168
<!-- Remove the managed pdbs from our payloads.
169169
This is for performance reasons to reduce our helix payload size -->
170170
<ReducedPayloadFiles Include="@(_PayloadFiles)" Condition=" '%(Extension)' != '.pdb' " />
171-
171+
172172
<ReducedPayloadFilesFinal Include="@(ReducedPayloadFiles)" Condition=" '%(Extension)' != '.sh' and '$(TestWrapperTargetsWindows)' == 'true' "/>
173173
<ReducedPayloadFilesFinal Include="@(ReducedPayloadFiles)" Condition=" '%(Extension)' != '.cmd' and '$(TestWrapperTargetsWindows)' != 'true' "/>
174174
</ItemGroup>
@@ -202,7 +202,7 @@
202202
</Target>
203203

204204
<Target Name="PreparePALTestArchive">
205-
<Exec Condition="'$(PALTestsDir)' != '' and '$(TestWrapperTargetsWindows)' != 'true'"
205+
<Exec Condition="'$(PALTestsDir)' != '' and '$(TestWrapperTargetsWindows)' != 'true'"
206206
WorkingDirectory="$(PALTestsDir)"
207207
Command="tar -czvf $(PayloadsRootDirectory)paltests.tar.gz `ls -A`"/>
208208
</Target>
@@ -234,7 +234,7 @@
234234
<RunCrossGen2 Condition=" '$(RunCrossGen2)' != 'true' ">false</RunCrossGen2>
235235
<LongRunningGCTests Condition=" '$(LongRunningGCTests)' != 'true' ">false</LongRunningGCTests>
236236
<GcSimulatorTests Condition=" '$(GcSimulatorTests)' != 'true' ">false</GcSimulatorTests>
237-
<TestRunNamePrefix Condition="'$(RuntimeFlavorDisplayName)' != ''">$(RuntimeFlavorDisplayName) </TestRunNamePrefix>
237+
<TestRunNamePrefix Condition="'$(RuntimeFlavorDisplayName)' != ''">$(RuntimeFlavorDisplayName) </TestRunNamePrefix>
238238
<TestRunNamePrefix Condition=" '$(RunCrossGen)' == 'true' ">R2R </TestRunNamePrefix>
239239
<TestRunNamePrefix Condition=" '$(RunCrossGen2)' == 'true' ">R2R-CG2 </TestRunNamePrefix>
240240
<TestRunNamePrefix Condition=" '$(Scenario)' == 'normal' ">$(TestRunNamePrefix)$(TargetOS) $(TargetArchitecture) $(Configuration) @ </TestRunNamePrefix>
@@ -251,6 +251,7 @@
251251
<!-- WARNING: HelixPreCommand ItemGroup is intentionally minimal and should be kept that way. -->
252252

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

272+
<ItemGroup Condition=" '$(TestWrapperTargetsWindows)' == 'true' ">
273+
<HelixPostCommand Include="taskkill.exe /f /im corerun.exe"/>
274+
</ItemGroup>
275+
271276
<ItemGroup Condition=" '$(TestWrapperTargetsWindows)' != 'true' ">
272277
<HelixPreCommand Include="export CORE_ROOT=$HELIX_CORRELATION_PAYLOAD" />
273278
<HelixPreCommand Include="export RunCrossGen2=1" Condition=" '$(RunCrossGen)' == 'true' " />
@@ -286,6 +291,7 @@
286291

287292
<PropertyGroup>
288293
<HelixPreCommands>@(HelixPreCommand)</HelixPreCommands>
294+
<HelixPostCommands>@(HelixPostCommand)</HelixPostCommands>
289295
</PropertyGroup>
290296

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

0 commit comments

Comments
 (0)