Skip to content

Commit fbb109c

Browse files
fanyang-monopremun
andauthored
Use XHarnessAppBundleToTest to create helix work items when runtime tests run on iOSSimulator (dotnet#58870)
2709 runtime tests were enabled to run with iOSSimulator x64. Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
1 parent 91d18ae commit fbb109c

5 files changed

Lines changed: 79 additions & 24 deletions

File tree

eng/pipelines/runtime-staging.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -381,15 +381,12 @@ jobs:
381381
eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
382382
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
383383
eq(variables['isFullMatrix'], true))
384-
# Test execution is temporarily disabled because test apps no longer launch
385-
# and the test suite times out after two hours, even if xharness cannot
386-
# successfully launch any tests. Re-enable once these issues have been fixed.
387-
#
388-
# extra steps, run tests
389-
# extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
390-
# extraStepsParameters:
391-
# creator: dotnet-bot
392-
# testRunNamePrefixSuffix: Mono_$(_BuildConfig)
384+
${{ if eq(variables['isFullMatrix'], true) }}:
385+
# extra steps, run tests
386+
extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
387+
extraStepsParameters:
388+
creator: dotnet-bot
389+
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
393390

394391
#
395392
# Build the whole product using Mono for Android and run runtime tests with Android devices

src/tests/Common/CLRTest.Execute.Bash.targets

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,7 @@ else
416416
HARNESS_RUNNER="xharness"
417417
fi
418418
419-
xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")"
420-
simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app"
421-
open -a "$simulator_app"
422-
helix_runner_uid="%24(id -u)"
423-
424-
sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple just-run %5c
419+
$__Command $HARNESS_RUNNER apple just-run %5c
425420
--app="net.dot.$__Category" %5c
426421
--output-directory="$__OutputDir" %5c
427422
--set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-$(MsBuildProjectName)/$(MsBuildProjectName).dll" %5c

src/tests/Common/helixpublishwitharcade.proj

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,12 @@
237237
<MSBuild Projects="@(_ProjectsToBuild)" Targets="CreateTestEnvFiles" StopOnFirstFailure="true" />
238238
</Target>
239239

240-
<Target Name="ZipPayloadDirectory" AfterTargets="PreparePayloadsDirectories" Condition="'$(TargetOS)' == 'Android'">
240+
<PropertyGroup>
241+
<IsRunningOnMobileTargets>false</IsRunningOnMobileTargets>
242+
<IsRunningOnMobileTargets Condition="'$(TargetOS)' == 'Android' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOSSimulator' ">true</IsRunningOnMobileTargets>
243+
</PropertyGroup>
244+
245+
<Target Name="ZipPayloadDirectory" AfterTargets="PreparePayloadsDirectories" Condition="'$(IsRunningOnMobileTargets)' == 'true'">
241246
<ItemGroup>
242247
<Payloads Include="$([System.IO.Directory]::GetDirectories($(PayloadsRootDirectory)))" Condition="Exists('$(PayloadsRootDirectory)')" />
243248
<Payloads Update="@(Payloads)">
@@ -325,11 +330,6 @@
325330
<HelixPostCommands>@(HelixPostCommand)</HelixPostCommands>
326331
</PropertyGroup>
327332

328-
<PropertyGroup>
329-
<IsRunningOnMobileTargets>false</IsRunningOnMobileTargets>
330-
<IsRunningOnMobileTargets Condition="'$(TargetOS)' == 'Android' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOSSimulator' ">true</IsRunningOnMobileTargets>
331-
</PropertyGroup>
332-
333333
<PropertyGroup Condition=" '$(TestWrapperTargetsWindows)' == 'true' ">
334334
<XUnitRunnerDll Condition=" '$(IsRunningOnMobileTargets)' == 'true' ">$Env:CORE_ROOT\xunit\xunit.console.dll</XUnitRunnerDll>
335335
<XUnitRunnerDll Condition=" '$(IsRunningOnMobileTargets)' != 'true' ">%CORE_ROOT%\xunit\xunit.console.dll</XUnitRunnerDll>
@@ -368,6 +368,14 @@
368368
<CustomCommands>dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs)</CustomCommands>
369369
<CustomCommands Condition=" '%(TestGroup)' != '' ">dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs) -trait TestGroup=%(TestGroup)</CustomCommands>
370370
</XHarnessApkToTest>
371+
372+
<XHarnessAppBundleToTest Include="@(Payloads->Metadata('PayloadZipFile'))" Condition="'$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOSSimulator'">
373+
<TestTarget Condition="'$(TargetArchitecture)' == 'arm64'">ios-simulator-64</TestTarget>
374+
<TestTarget Condition="'$(TargetArchitecture)' == 'x64'">ios-simulator-64</TestTarget>
375+
<TestTimeout Condition=" '$(TimeoutPerTestCollectionInMinutes)' != '' ">$([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes)))</TestTimeout>
376+
<CustomCommands>dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs)</CustomCommands>
377+
<CustomCommands Condition=" '%(TestGroup)' != '' ">dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs) -trait TestGroup=%(TestGroup)</CustomCommands>
378+
</XHarnessAppBundleToTest>
371379

372380
<HelixWorkItem Condition="'$(PALTestsDir)' != '' and '$(TestWrapperTargetsWindows)' != 'true'" Include="PALTests">
373381
<PayloadArchive>$(PayloadsRootDirectory)paltests.tar.gz</PayloadArchive>

src/tests/Common/testgrouping.proj

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@
8989
<XUnitWrapperDll>$(TestBinDir)JIT\Regression\JIT.Regression.XUnitWrapper.dll</XUnitWrapperDll>
9090
</TestGrouping>
9191

92+
<TestGrouping Include="$(TestBinDir)JIT\Regression\JitBlue\GitHub_*\**">
93+
<TestGroup>JIT.Regression.JitBlue</TestGroup>
94+
<XUnitWrapperDll>$(TestBinDir)JIT\Regression\JIT.Regression.XUnitWrapper.dll</XUnitWrapperDll>
95+
</TestGrouping>
96+
97+
<TestGrouping Include="$(TestBinDir)JIT\HardwareIntrinsics\X86\S*\**">
98+
<TestGroup>JIT.HardwareIntrinsics.S</TestGroup>
99+
<XUnitWrapperDll>$(TestBinDir)JIT\HardwareIntrinsics\JIT.HardwareIntrinsics.XUnitWrapper.dll</XUnitWrapperDll>
100+
</TestGrouping>
101+
92102
<TestGrouping Include="$(TestBinDir)Loader\classloader\generics\**">
93103
<TestGroup>Loader.classloader.generics</TestGroup>
94104
<XUnitWrapperDll>$(TestBinDir)Loader\classloader\Loader.classloader.XUnitWrapper.dll</XUnitWrapperDll>
@@ -158,13 +168,15 @@
158168

159169
<XUnitWrapperGrouping Include="$(TestBinDir)JIT\BBT\*.XUnitWrapper.dll;
160170
$(TestBinDir)JIT\CheckProjects\*.XUnitWrapper.dll;
161-
$(TestBinDir)JIT\Intrinsics\*.XUnitWrapper.dll;
162171
$(TestBinDir)JIT\opt\*.XUnitWrapper.dll;
163172
$(TestBinDir)JIT\Performance\*.XUnitWrapper.dll;
164173
$(TestBinDir)JIT\RyuJIT\*.XUnitWrapper.dll;
165-
$(TestBinDir)JIT\SIMD\*.XUnitWrapper.dll;
166174
$(TestBinDir)JIT\superpmi\*.XUnitWrapper.dll">
167-
<PayloadGroup>JIT</PayloadGroup>
175+
<PayloadGroup>JIT.1</PayloadGroup>
176+
</XUnitWrapperGrouping>
177+
<XUnitWrapperGrouping Include="$(TestBinDir)JIT\Intrinsics\*.XUnitWrapper.dll;
178+
$(TestBinDir)JIT\SIMD\*.XUnitWrapper.dll">
179+
<PayloadGroup>JIT.2</PayloadGroup>
168180
</XUnitWrapperGrouping>
169181
</ItemGroup>
170182
</Project>

src/tests/issues.targets

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3191,5 +3191,48 @@
31913191
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/GitHub_25468/GitHub_25468/**">
31923192
<Issue>Could not load file or assembly 'System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.</Issue>
31933193
</ExcludeList>
3194+
3195+
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/DevDiv_461649/DevDiv_461649/*">
3196+
<Issue>needs triage</Issue>
3197+
</ExcludeList>
3198+
<ExcludeList Include = "$(XunitTestBinBase)/Interop/PInvoke/SetLastError/SetLastErrorTest/*">
3199+
<Issue>needs triage</Issue>
3200+
</ExcludeList>
3201+
<ExcludeList Include = "$(XunitTestBinBase)/Interop/UnmanagedCallConv/UnmanagedCallConvTest/*">
3202+
<Issue>needs triage</Issue>
3203+
</ExcludeList>
3204+
<ExcludeList Include = "$(XunitTestBinBase)/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/DelegatePInvoke/DelegatePInvokeTest/*">
3205+
<Issue>needs triage</Issue>
3206+
</ExcludeList>
3207+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/eventsourceerror/eventsourceerror/*">
3208+
<Issue>needs triage</Issue>
3209+
</ExcludeList>
3210+
<ExcludeList Include = "$(XunitTestBinBase)/JIT/IL_Conformance/Old/Conformance_Base/mul_ovf_u2/*">
3211+
<Issue>needs triage</Issue>
3212+
</ExcludeList>
3213+
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b41126/b41126/*">
3214+
<Issue>needs triage</Issue>
3215+
</ExcludeList>
3216+
<ExcludeList Include = "$(XunitTestBinBase)/GC/Scenarios/Dynamo/dynamo/*">
3217+
<Issue>needs triage</Issue>
3218+
</ExcludeList>
3219+
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/TieredCompilation/BasicTest_DefaultMode_R2r/*">
3220+
<Issue>needs triage</Issue>
3221+
</ExcludeList>
3222+
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/TieredCompilation/BasicTest_DefaultMode_R2r/*">
3223+
<Issue>missing assembly</Issue>
3224+
</ExcludeList>
3225+
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOff_R2r/*">
3226+
<Issue>missing assembly</Issue>
3227+
</ExcludeList>
3228+
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOn_R2r/*">
3229+
<Issue>missing assembly</Issue>
3230+
</ExcludeList>
3231+
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/TieredCompilation/BasicTest_QuickJitOff_R2r/*">
3232+
<Issue>missing assembly</Issue>
3233+
</ExcludeList>
3234+
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/TieredCompilation/BasicTest_QuickJitOn_R2r/*">
3235+
<Issue>missing assembly</Issue>
3236+
</ExcludeList>
31943237
</ItemGroup>
31953238
</Project>

0 commit comments

Comments
 (0)