Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Stand up iOS arm runtime tests and enable tracing/eventpipe tests #79169

Merged
merged 170 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
0be50e1
Align libraries AppleAppBuilder parameters order
mdh1418 Dec 2, 2022
f09fa05
Align runtime tests AppleAppBuilder parameters order
mdh1418 Dec 2, 2022
53b5060
Populate assemblies in iOS runtime tests similar to libraries tests
mdh1418 Dec 2, 2022
86298c2
[build] Set RunAOTCompilation and MonoForceInterpreter for iOS runtim…
mdh1418 Dec 2, 2022
5135bc4
[build] Enable diagnostics on iOS runtime tests
mdh1418 Dec 2, 2022
ebe00d2
[test] Reenable buffersize runtime test on iOS
mdh1418 Dec 2, 2022
49d4af9
[tests] Reenable diagnostic_tracing tests not involving subprocesses
mdh1418 Dec 2, 2022
46b83a3
[pipelines] Add iOS/tvOS device/simulator arm64 runtime tests job
mdh1418 Dec 16, 2022
353e7b8
[pipelines] Fix iOS/iOSlike jobs
mdh1418 Dec 19, 2022
9bb2fec
[pipelines] Add necessary parameters for iOSlike platforms
mdh1418 Dec 19, 2022
f2f9828
Propagate DevTeamProvisioning on iOS.{
Dec 19, 2022
e9fd019
Added missing paren to copy files.
Jan 5, 2023
8f61558
Added Assembly Search Path to AOT compiler task.
Jan 6, 2023
b4a1215
Added DevTeamProvisioning
Jan 6, 2023
6903ff2
Fixed path for mono includes.
Jan 9, 2023
3ddf12b
Switched to new merged template.
Jan 10, 2023
0f25ad6
Added parameters to just build a subset of tests.
Jan 11, 2023
4d18d41
Fixed testSubsetArgs parameter.
Jan 11, 2023
b9726c8
Exclude tests.
Jan 13, 2023
6c6a7e6
Fix problem in issues.targets.
Jan 13, 2023
ae68656
Removed redundant app dir.
Jan 17, 2023
b82e38b
Revert changes to AppleApp.targets.
Jan 17, 2023
55cc52c
More test exclusions.
Jan 18, 2023
55f7208
Exclude llvm tests on iOS.
Jan 18, 2023
02bfbb3
Exclude llvm tests on iOS.
Jan 18, 2023
a44366c
Added missing quote.
Jan 19, 2023
603883a
Updated issues.targets
Jan 19, 2023
d14c197
Added missing ios RID.
Jan 22, 2023
0e51295
Added device queues.
Jan 26, 2023
455e375
Align libraries AppleAppBuilder parameters order
mdh1418 Dec 2, 2022
d5411e3
[build] Enable diagnostics on iOS runtime tests
mdh1418 Dec 2, 2022
0de94ea
[test] Reenable buffersize runtime test on iOS
mdh1418 Dec 2, 2022
e7415c6
[tests] Reenable diagnostic_tracing tests not involving subprocesses
mdh1418 Dec 2, 2022
e6e035e
[pipelines] Add iOS/tvOS device/simulator arm64 runtime tests job
mdh1418 Dec 16, 2022
2ec8736
[pipelines] Add necessary parameters for iOSlike platforms
mdh1418 Dec 19, 2022
59e830f
Propagate DevTeamProvisioning on iOS.{
Dec 19, 2022
9ba7955
Added Assembly Search Path to AOT compiler task.
Jan 6, 2023
554d871
Added DevTeamProvisioning
Jan 6, 2023
3ea1514
Fixed path for mono includes.
Jan 9, 2023
c8705ad
Exclude tests.
Jan 13, 2023
d13378e
Fix problem in issues.targets.
Jan 13, 2023
fcf09b9
Removed redundant app dir.
Jan 17, 2023
1912382
Revert changes to AppleApp.targets.
Jan 17, 2023
cc1885f
More test exclusions.
Jan 18, 2023
cec9b68
Updated bash scripts for ios.
Jan 29, 2023
e7e030e
Removed extra quote.
Jan 31, 2023
2e52b71
Fix typos.
Jan 31, 2023
c175dbf
Quote fix.
Feb 2, 2023
6a4659e
Added more missing quotes and )'s.
Feb 2, 2023
a9b7834
Updated app bundles to use device.
Feb 3, 2023
222394f
Added missing and
Feb 4, 2023
31aa717
Updated .NET CLI properties.
Feb 6, 2023
a1c98e5
Fixed typo in TargetOS.
Feb 6, 2023
8762c73
Get rid of spurious text.
Feb 6, 2023
5e9c5e5
Updated MobileAppHandler to use devices.
Feb 7, 2023
69c63b3
Changed to adhoc signing.
Feb 8, 2023
175903c
Put DebTeamProvisioning back to -
Feb 8, 2023
81af244
Added bash code to move signing file.
Feb 9, 2023
b6d4e1a
Updated signing command.
Feb 9, 2023
efed819
Use back ticks instead of
Feb 10, 2023
c27d2c4
Try hardcoding signing loop.
Feb 10, 2023
41446ae
Fixed extra line in bash command.
Feb 10, 2023
ec24c10
Fixed suffix on test target.
Feb 11, 2023
9b5e072
Simplified test.
Feb 11, 2023
31f330d
Try to add test assembly.
Feb 17, 2023
e093ec0
Updated wild card for assemblies.
Feb 17, 2023
471025c
Include more assemblies.
Feb 17, 2023
07cb559
runningmono.cs
Feb 18, 2023
cf7634c
Run more tests. Exclude all llvmfullaot tests.
Feb 20, 2023
4f5e4ae
Removed extra paren.
Feb 20, 2023
b068443
Enable Trimming.
Feb 21, 2023
73e83a8
Adjust timeouts.
Feb 21, 2023
83cc716
Run only jit tests, adjust time out.
Feb 21, 2023
e54686c
Handle TestUtilities linking correctly.
Feb 21, 2023
5b1df05
more test exclusions.
Feb 21, 2023
521e344
Fix syntax error.
Feb 21, 2023
a8f01cf
Added missing /
Feb 21, 2023
2cf4a1b
Fixed typo.
Feb 21, 2023
2501432
Don't generate CMake projects.
Feb 22, 2023
d5f0de5
Try base services.
Feb 22, 2023
7a86d5d
Disable a lot of tests for build time issue.
Feb 23, 2023
21ca133
Got rid of test subset hack.
Feb 24, 2023
2658cfd
Use variables template.
Feb 24, 2023
ee8b3ad
Remove debug log
kotlarmilos Mar 10, 2023
2a8467f
Add dedup feature to improve build time
kotlarmilos Mar 13, 2023
d975129
Update build arguments
kotlarmilos Mar 16, 2023
cab1403
Don't run Build Tests step when runtimeFlavor is mono
kotlarmilos Mar 16, 2023
c2f884a
TESTING ONLY - Disable all CI jobs and enable ioslike only
kotlarmilos Mar 16, 2023
54891e3
TESTING ONLY - Disable all CI jobs and enable ioslike only
kotlarmilos Mar 16, 2023
bdbc415
TESTING ONLY - Disable all CI jobs and enable ioslike only
kotlarmilos Mar 16, 2023
7d22e67
TESTING ONLY - Disable all CI jobs and enable ioslike only
kotlarmilos Mar 16, 2023
14dd0b1
Revert changes in runtime.yml
kotlarmilos Mar 16, 2023
3343975
TESTING ONLY - Disable all CI jobs and enable ioslike only
kotlarmilos Mar 16, 2023
11943e4
TESTING ONLY - Disable all CI jobs and enable ioslike only
kotlarmilos Mar 16, 2023
bcf5076
TESTING ONLY - Disable all CI jobs and enable ioslike only
kotlarmilos Mar 16, 2023
7df230c
TESTING ONLY - Disable all CI jobs and enable ioslike only
kotlarmilos Mar 16, 2023
98a1100
Merge branch 'main' into ios_investigate_eventpipe_failures
kotlarmilos Mar 16, 2023
b199d75
TESTING ONLY - Add AllSubsets_Mono_RuntimeTests to runtime.yml
kotlarmilos Mar 16, 2023
26ad203
Merge branch 'ios_investigate_eventpipe_failures' of github.com:mdh14…
kotlarmilos Mar 16, 2023
61b70fb
TESTING ONLY - Disable staging and dev-innerloop jobs
kotlarmilos Mar 16, 2023
97dfdb0
TESTING ONLY - Disable staging and dev-innerloop jobs
kotlarmilos Mar 16, 2023
29c6245
Update extra step for iOS job
kotlarmilos Mar 16, 2023
a40e26d
Update extra step for iOS job
kotlarmilos Mar 16, 2023
a67893f
Update extra step for iOS job
kotlarmilos Mar 16, 2023
5521700
Include baseservices on iOS
kotlarmilos Mar 17, 2023
8a25067
Enable Build Tests step on iOS
kotlarmilos Mar 17, 2023
f59c5fa
Add /p:MonoAot=true to Build Tests step
kotlarmilos Mar 17, 2023
9be6567
Exclude XUnitLogCheckerDirectory from HelixCorrelationPayload
kotlarmilos Mar 17, 2023
d26699c
Exclude XUnitLogCheckerDirectory from HelixCorrelationPayload
kotlarmilos Mar 17, 2023
7be72ba
Merge branch 'dotnet:main' into ios_investigate_eventpipe_failures
kotlarmilos Mar 17, 2023
76b4f79
Exclude XUnitLogCheckerDirectory from HelixCorrelationPayload
kotlarmilos Mar 17, 2023
ac87d84
Use TargetsiOS property
kotlarmilos Mar 17, 2023
f12c6a3
Add logs in helixpublishwitharcade.proj
kotlarmilos Mar 20, 2023
c1c6988
Add logs in helixpublishwitharcade.proj
kotlarmilos Mar 20, 2023
5b65baf
Include baseservices/varargs tests
kotlarmilos Mar 20, 2023
6b5a93d
Include tracing/eventpipe tests on iOS
kotlarmilos Mar 20, 2023
a25269f
Include tracing tests on iOS
kotlarmilos Mar 20, 2023
c01a0d2
Include baseservices tests on iOS
kotlarmilos Mar 21, 2023
5ba4ef5
Include JIT tests on iOS
kotlarmilos Mar 21, 2023
89cc3c3
Remove /p:MonoAot=true flag
kotlarmilos Mar 21, 2023
bdf958d
Exclude more tests
kotlarmilos Mar 21, 2023
65f89cd
Add baseservices to test the flow
kotlarmilos Mar 22, 2023
fc5b7d1
Add tracing/eventpipe to test the flow
kotlarmilos Mar 23, 2023
0231720
Add tracing/eventpipe to test the flow
kotlarmilos Mar 23, 2023
1882048
Add new TestGroupToBuild for iOS
kotlarmilos Mar 25, 2023
7279190
Enable baseservices runtime tests
kotlarmilos Mar 27, 2023
f76468f
Try new testing group
kotlarmilos Mar 28, 2023
1645d93
Remove duplicate assemblies
kotlarmilos Mar 28, 2023
8bcc033
Remove duplicates before native linking
kotlarmilos Mar 30, 2023
d0b8287
Disable dedup for testing purposes
kotlarmilos Mar 30, 2023
eab8877
Remove testdir- from env variables
kotlarmilos Mar 31, 2023
90e4351
Include tracing/eventpipe tests
kotlarmilos Mar 31, 2023
679b472
Force interpreter
kotlarmilos Mar 31, 2023
5bb1129
Exclude failing tests
kotlarmilos Mar 31, 2023
f3c3511
Exclude failing tests
kotlarmilos Mar 31, 2023
047578e
Exclude failing tests
kotlarmilos Mar 31, 2023
42e02df
Remove hardcoded test directory
kotlarmilos Apr 1, 2023
d314035
Revert temporary changes
kotlarmilos Apr 3, 2023
3c8a548
Fix formatting
kotlarmilos Apr 3, 2023
5b8df78
Revert temporary changes
kotlarmilos Apr 3, 2023
db221e4
Fix formatting
kotlarmilos Apr 3, 2023
533699b
Enable bundle signing only when using a device
kotlarmilos Apr 3, 2023
478ae8f
Enable tvOS runtime tests
kotlarmilos Apr 3, 2023
8f08497
Add AppleTestTarget to helixpublishwitharcade.proj
kotlarmilos Apr 4, 2023
4b14618
Fix typo in signing script
kotlarmilos Apr 4, 2023
c318a7a
Exclude failing tests on iossimulator
kotlarmilos Apr 4, 2023
72aa2ba
Update simulator test queues
kotlarmilos Apr 4, 2023
401517c
add missing RIDs for tvOS/tvOSSimulator
kotlarmilos Apr 5, 2023
c717bf6
Add missing RIDs
kotlarmilos Apr 5, 2023
d3c2e15
Add tvOS identifiers to CLRTest.Execute.Bash.targets
kotlarmilos Apr 5, 2023
898d9e4
Add tvos targets to MobileAppHandler.cs
kotlarmilos Apr 6, 2023
7ea8c3e
Fix use of unassigned local variable
kotlarmilos Apr 6, 2023
1260591
Exclude tvos tests which report Operation is not supported on this pl…
kotlarmilos Apr 6, 2023
5d177c2
Extend EnsureCleanEnvoronment with IsTvOS check
kotlarmilos Apr 6, 2023
66e20d0
Fix failed to connect to eventpipe
kotlarmilos Apr 6, 2023
ac762dd
Exclude /tracing/processinfo tests on tvOS and bump helix queue version
kotlarmilos Apr 7, 2023
842570c
Fix invalid helix queues
kotlarmilos Apr 7, 2023
de7b969
Revert helix queue for ioslike-simulators
kotlarmilos Apr 7, 2023
f964fab
Disable failing tests on iossimulator
kotlarmilos Apr 7, 2023
5aa60ab
Disable failing tests on iossimulator
kotlarmilos Apr 7, 2023
bf3b86c
Resolve PR comments
kotlarmilos Apr 11, 2023
f877739
Merge branch 'dotnet:main' into ios_investigate_eventpipe_failures
kotlarmilos Apr 11, 2023
e071b0d
Match tvos system name for processinfo tests
kotlarmilos Apr 11, 2023
f715619
Revert path change
kotlarmilos Apr 11, 2023
20ff0f2
Bump to new OSX 13 AppleTV queue
kotlarmilos Apr 11, 2023
cbccac5
Resolve PR comments
kotlarmilos Apr 13, 2023
3645fee
Resolve PR comments
kotlarmilos Apr 14, 2023
f220b4e
Test iossimulator_arm64 on rolling builds
kotlarmilos Apr 17, 2023
ec4988b
Revert test iossimulator_arm64 on rolling builds
kotlarmilos Apr 18, 2023
d6fd78a
Remove isRollingBuild condition
kotlarmilos Apr 18, 2023
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
22 changes: 19 additions & 3 deletions eng/pipelines/coreclr/templates/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ jobs:
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
helixQueues:

# iOS/tvOS simulator x64/x86
- ${{ if in(parameters.platform, 'iossimulator_x64', 'tvossimulator_x64') }}:
- OSX.1015.Amd64.Open
# iOS Simulator/Mac Catalyst arm64
- ${{ if in(parameters.platform, 'maccatalyst_arm64', 'iossimulator_arm64') }}:
- OSX.1200.Arm64.Open

# iOS/tvOS Simulator x64 & MacCatalyst x64
- ${{ if in(parameters.platform, 'iossimulator_x64', 'tvossimulator_x64', 'maccatalyst_x64') }}:
- OSX.1200.Amd64.Open

# Android arm64
- ${{ if in(parameters.platform, 'android_arm64') }}:
Expand All @@ -48,6 +52,18 @@ jobs:
- ${{ if eq(parameters.platform, 'browser_wasm') }}:
- (Ubuntu.1804.Amd64)[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-webassembly

# iOS devices
- ${{ if in(parameters.platform, 'ios_arm64') }}:
# split traffic for runtime-extra-platforms (which mostly runs on rolling builds)
- ${{ if ne(parameters.jobParameters.isExtraPlatforms, true) }}:
- OSX.1015.Amd64.Iphone.Open
- ${{ if eq(parameters.jobParameters.isExtraPlatforms, true) }}:
- OSX.1200.Amd64.Iphone.Open

# tvOS devices
- ${{ if in(parameters.platform, 'tvos_arm64') }}:
- OSX.13.Amd64.AppleTV.Open

# Linux arm
- ${{ if eq(parameters.platform, 'linux_arm') }}:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
Expand Down
42 changes: 42 additions & 0 deletions eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,45 @@ jobs:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true

#
# Build the whole product using Mono for iOS/tvOS and run runtime tests with iOS/tvOS devices
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
platforms:
- ios_arm64
- tvos_arm64
variables:
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: pr/dotnet/runtime/$(Build.SourceBranch)
- ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: ci/dotnet/runtime/$(Build.SourceBranch)
- name: timeoutPerTestInMinutes
value: 60
- name: timeoutPerTestCollectionInMinutes
value: 180
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_RuntimeTests
buildArgs: -s mono+libs -c $(_BuildConfig)
timeoutInMinutes: 240
# extra steps, run tests
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
parameters:
testGroup: innerloop
extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
extraStepsParameters:
creator: dotnet-bot
# FIXME: Currently, tracing/eventpipe tests are only enabled on iOS platforms. It should be expanded to include all runtime tests. Tracking issue: https://github.com/dotnet/runtime/issues/84254
testBuildArgs: tree tracing/eventpipe
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,46 @@ jobs:
creator: dotnet-bot
interpreter: true
testRunNamePrefixSuffix: Mono_$(_BuildConfig)

#
# Build the whole product using Mono for iOSSimulator/tvOSSimulator and run runtime tests with iOS/tvOS simulators
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
platforms:
- iossimulator_x64
- tvossimulator_x64
- iossimulator_arm64
variables:
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: pr/dotnet/runtime/$(Build.SourceBranch)
- ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: ci/dotnet/runtime/$(Build.SourceBranch)
- name: timeoutPerTestInMinutes
value: 60
- name: timeoutPerTestCollectionInMinutes
value: 180
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_RuntimeTests
buildArgs: -s mono+libs -c $(_BuildConfig)
timeoutInMinutes: 240
# extra steps, run tests
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
parameters:
testGroup: innerloop
extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
extraStepsParameters:
creator: dotnet-bot
# FIXME: Currently, tracing/eventpipe tests are only enabled on iOS platforms. It should be expanded to include all runtime tests. Tracking issue: https://github.com/dotnet/runtime/issues/84254
testBuildArgs: tree tracing/eventpipe
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
6 changes: 1 addition & 5 deletions eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ jobs:

# tvOS devices
- ${{ if in(parameters.platform, 'tvos_arm64') }}:
# if necessary, you can split traffic between queues this way for PR's and rolling builds
- ${{ if ne(parameters.jobParameters.isExtraPlatforms, true) }}:
- OSX.13.Amd64.AppleTV.Open
- ${{ if eq(parameters.jobParameters.isExtraPlatforms, true) }}:
- OSX.13.Amd64.AppleTV.Open
- OSX.13.Amd64.AppleTV.Open

# windows x64
- ${{ if eq(parameters.platform, 'windows_x64') }}:
Expand Down
8 changes: 6 additions & 2 deletions src/tests/Common/CLRTest.Execute.Bash.targets
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ WARNING: When setting properties based on their current state (for example:
<PropertyGroup>
<IncompatibleTestBashScriptExitCode>0</IncompatibleTestBashScriptExitCode>
<CoreRunArgs>@(RuntimeHostConfigurationOption -> '-p &quot;%(Identity)=%(Value)&quot;', ' ')</CoreRunArgs>
<IosTestTarget Condition="'$(TargetOS)' == 'iossimulator'">ios-simulator-64</IosTestTarget>
kotlarmilos marked this conversation as resolved.
Show resolved Hide resolved
<IosTestTarget Condition="'$(TargetOS)' == 'ios'">ios-device</IosTestTarget>
<IosTestTarget Condition="'$(TargetOS)' == 'tvossimulator'">tvos-simulator</IosTestTarget>
<IosTestTarget Condition="'$(TargetOS)' == 'tvos'">tvos-device</IosTestTarget>

<BashCLRTestEnvironmentCompatibilityCheck Condition="'$(GCStressIncompatible)' == 'true'"><![CDATA[
$(BashCLRTestEnvironmentCompatibilityCheck)
Expand Down Expand Up @@ -413,7 +417,7 @@ CLRTestExitCode=$?
CLRTestExpectedExitCode=0
]]>
</BashCLRTestLaunchCmds>
<BashCLRTestLaunchCmds Condition="'$(CLRTestKind)' == 'BuildAndRun' And '$(TargetOS)' == 'iossimulator'">
<BashCLRTestLaunchCmds Condition="'$(CLRTestKind)' == 'BuildAndRun' And ('$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator')">
<![CDATA[
__Command=""
if [ ! -z ${__TestDotNetCmd+x} ] %3B then
Expand All @@ -436,7 +440,7 @@ $__Command $HARNESS_RUNNER apple just-run %5c
--set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-$(MsBuildProjectName)/$(MsBuildProjectName).dll" %5c
--set-env="MONO_APPLE_APP_ASSEMBLY_LOAD_PREFIX=testdir-$(MsBuildProjectName)" %5c
--expected-exit-code=100 %5c
--targets ios-simulator-64 %5c
--targets $(IosTestTarget) %5c
-v
CLRTestExitCode=$?

Expand Down
29 changes: 23 additions & 6 deletions src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ public class MobileAppHandler
// 91 - ADB_FAILURE
private static readonly int[] _knownExitCodes = new int[] { 78, 81, 82, 83, 84, 86, 88, 89, 90, 91 };

public int InstallMobileApp(string platform, string category, string testBinaryBase, string reportBase)
public int InstallMobileApp(string platform, string category, string testBinaryBase, string reportBase, string targetOS)
{
return HandleMobileApp("install", platform, category, testBinaryBase, reportBase);
return HandleMobileApp("install", platform, category, testBinaryBase, reportBase, targetOS);
}

public int UninstallMobileApp(string platform, string category, string testBinaryBase, string reportBase)
public int UninstallMobileApp(string platform, string category, string testBinaryBase, string reportBase, string targetOS)
{
return HandleMobileApp("uninstall", platform, category, testBinaryBase, reportBase);
return HandleMobileApp("uninstall", platform, category, testBinaryBase, reportBase, targetOS);
}

private static int HandleMobileApp(string action, string platform, string category, string testBinaryBase, string reportBase)
private static int HandleMobileApp(string action, string platform, string category, string testBinaryBase, string reportBase, string targetOS)
{
int exitCode = -100;

Expand Down Expand Up @@ -82,7 +82,24 @@ private static int HandleMobileApp(string action, string platform, string catego
}
else // platform is apple
{
cmdStr += $" --output-directory={reportBase}/{action} --target=ios-simulator-64"; //To Do: target should be either emulator or device
string targetString = "";

switch (targetOS) {
case "ios":
targetString = "ios-device";
break;
case "iossimulator":
targetString = "ios-simulator-64";
break;
case "tvos":
targetString = "tvos-device";
break;
case "tvossimulator":
targetString = "tvos-simulator";
break;
}

cmdStr += $" --output-directory={reportBase}/{action} --target={targetString}";

if (action == "install")
{
Expand Down
37 changes: 27 additions & 10 deletions src/tests/Common/helixpublishwitharcade.proj
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
SuperPmiCollect=$(_SuperPmiCollect)
</_PropertiesToPass>

<_PropertiesToPass Condition="'$(TargetOS)' == 'browser' Or '$(TargetsAndroid)' == 'true'">
<_PropertiesToPass Condition="'$(TargetOS)' == 'browser' Or '$(TargetsAndroid)' == 'true' Or '$(TargetsiOS)' == 'true' Or '$(TargetsiOSSimulator)' == 'true' Or '$(TargetstvOS)' == 'true' Or '$(TargetstvOSSimulator)' == 'true'">
$(_PropertiesToPass);
IncludeDotNetCli=$(IncludeDotNetCli);
DotNetCliRuntime=$(DotNetCliRuntime);
Expand Down Expand Up @@ -161,6 +161,9 @@
<HelixRuntimeRid Condition="'$(TargetOSSpec)' == 'browser'">browser-wasm</HelixRuntimeRid>
<HelixRuntimeRid Condition="'$(TargetOSSpec)' == 'android'">android-$(TargetArchitecture)</HelixRuntimeRid>
<HelixRuntimeRid Condition="'$(TargetOSSpec)' == 'iossimulator'">iossimulator-$(TargetArchitecture)</HelixRuntimeRid>
<HelixRuntimeRid Condition="'$(TargetOSSpec)' == 'ios'">ios-$(TargetArchitecture)</HelixRuntimeRid>
<HelixRuntimeRid Condition="'$(TargetOSSpec)' == 'tvossimulator'">tvossimulator-$(TargetArchitecture)</HelixRuntimeRid>
<HelixRuntimeRid Condition="'$(TargetOSSpec)' == 'tvos'">tvos-$(TargetArchitecture)</HelixRuntimeRid>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -507,6 +510,7 @@
Condition="'$(TargetsAppleMobile)' == 'true'"
Outputs="%(_MergedWrapperMarker.FileName)"
DependsOnTargets="DiscoverMergedTestWrappers;GetTestExclusionList">

<PropertyGroup>
<_MergedWrapperDirectory>%(_MergedWrapperMarker.RootDir)%(Directory)</_MergedWrapperDirectory>
<_MergedWrapperName>%(_MergedWrapperMarker.FileName)</_MergedWrapperName>
Expand Down Expand Up @@ -593,7 +597,7 @@
<TimeoutPerTestInMilliseconds Condition=" '$(TimeoutPerTestInMinutes)' != '' ">$([System.TimeSpan]::FromMinutes($(TimeoutPerTestInMinutes)).TotalMilliseconds)</TimeoutPerTestInMilliseconds>
<WaitForWorkItemCompletion>true</WaitForWorkItemCompletion>
<_XUnitParallelMode>collections</_XUnitParallelMode>
<_XUnitParallelMode Condition=" '$(TargetsAndroid)' == 'true' or '$(TargetsiOSSimulator)' == 'true'">none</_XUnitParallelMode>
<_XUnitParallelMode Condition=" '$(TargetsAndroid)' == 'true' or '$(TargetsiOSSimulator)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOSSimulator)' == 'true' or '$(TargetstvOS)' == 'true'">none</_XUnitParallelMode>
<_XUnitParallelMode Condition=" '$(LongRunningGCTests)' == 'true' ">none</_XUnitParallelMode>
<_XUnitParallelMode Condition=" '$(GcSimulatorTests)' == 'true' ">none</_XUnitParallelMode>
<XUnitRunnerArgs>-parallel $(_XUnitParallelMode) -nocolor -noshadow -xml testResults.xml</XUnitRunnerArgs>
Expand Down Expand Up @@ -730,8 +734,8 @@
<ItemGroup Condition=" '$(UsesHelixSdk)' == 'true' ">
<HelixCorrelationPayload Include="$(CoreRootDirectory)" />

<!-- Browser-Wasm follows a very different workflow, which is currently out of scope of the Log Checker. -->
<HelixCorrelationPayload Include="$(XUnitLogCheckerDirectory)" Condition="'$(TargetsBrowser)' != 'true'" />
<!-- Browser-Wasm and iOS platforms follow a very different workflow, which is currently out of scope of the Log Checker. It's not useful on any platform that uses xharness. -->
<HelixCorrelationPayload Include="$(XUnitLogCheckerDirectory)" Condition="'$(TargetsBrowser)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetsiOSSimulator)' != 'true' and '$(TargetstvOS)' != 'true' and '$(TargetstvOSSimulator)' != 'true'" />
<HelixCorrelationPayload Condition="'$(TestWrapperTargetsWindows)' == 'true'" Include="dotnet-sos">
<Destination>sos</Destination>
<Uri>https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/flat2/dotnet-sos/$(DotnetSosVersion)/dotnet-sos.$(DotnetSosVersion).nupkg</Uri>
Expand Down Expand Up @@ -831,6 +835,21 @@
</ItemGroup>
</Target>

<PropertyGroup>
<SigningCommand Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'">
<![CDATA[
for APP_FILE in `find . -name *.app`; do cp embedded.mobileprovision $APP_FILE; sign $APP_FILE; done; ]]>
</SigningCommand>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetsAppleMobile)' == 'true'">
<AppleTestTarget Condition="'$(TargetOS)' == 'iossimulator'">ios-simulator-64</AppleTestTarget>
<AppleTestTarget Condition="'$(TargetOS)' == 'tvossimulator'">tvos-simulator</AppleTestTarget>
<AppleTestTarget Condition="'$(TargetOS)' == 'ios'">ios-device</AppleTestTarget>
<AppleTestTarget Condition="'$(TargetOS)' == 'tvos'">tvos-device</AppleTestTarget>
<AppleTestTarget Condition="'$(TargetOS)' == 'maccatalyst'">maccatalyst</AppleTestTarget>
</PropertyGroup>

<ItemGroup>
<HelixWorkItem Include="@(LegacyPayloads->Metadata('PayloadGroup'))" Condition="'$(TargetHasHelixXHarnessSdkSupport)' != 'true'">
<PayloadDirectory>%(PayloadDirectory)</PayloadDirectory>
Expand All @@ -854,17 +873,15 @@
</XHarnessApkToTest>

<XHarnessAppBundleToTest Include="@(LegacyPayloads->Metadata('PayloadZipFile'))" Condition="'$(TargetsAppleMobile)' == 'true'">
<TestTarget Condition="'$(TargetArchitecture)' == 'arm64'">ios-simulator-64</TestTarget>
<TestTarget Condition="'$(TargetArchitecture)' == 'x64'">ios-simulator-64</TestTarget>
<TestTarget>$(AppleTestTarget)</TestTarget>
<TestTimeout Condition=" '$(TimeoutPerTestCollectionInMinutes)' != '' ">$([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes)))</TestTimeout>
<CustomCommands>dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs)</CustomCommands>
<CustomCommands Condition=" '%(TestGroup)' != '' ">dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs) -trait TestGroup=%(TestGroup)</CustomCommands>
<CustomCommands> $(SigningCommand) dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs)</CustomCommands>
<CustomCommands Condition=" '%(TestGroup)' != '' ">$(SigningCommand) dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs) -trait TestGroup=%(TestGroup)</CustomCommands>
</XHarnessAppBundleToTest>

<XHarnessAppBundleToTest Include="@(MergedPayloads->Metadata('PayloadGroup'))" Condition="'$(TargetsAppleMobile)' == 'true'">
<Arguments>--set-env=TestExclusionListPath=TestExclusionList.txt</Arguments>
<TestTarget Condition="'$(TargetArchitecture)' == 'arm64'">ios-simulator-64</TestTarget>
<TestTarget Condition="'$(TargetArchitecture)' == 'x64'">ios-simulator-64</TestTarget>
<TestTarget>$(AppleTestTarget)</TestTarget>
<TestTimeout Condition=" '$(TimeoutPerTestCollectionInMinutes)' != '' ">$([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes)))</TestTimeout>
</XHarnessAppBundleToTest>

Expand Down
9 changes: 9 additions & 0 deletions src/tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
<RunWithAndroid>false</RunWithAndroid>
<RunWithAndroid Condition="'$(TargetOS)' == 'android'">true</RunWithAndroid>

<RunWithiOS>false</RunWithiOS>
<RunWithiOS Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator'">true</RunWithiOS>

<MonoAot>false</MonoAot>
<MonoAot Condition="'$(__MonoAot)' == '1'">true</MonoAot>
<RuntimeVariant Condition="'$(__MonoAot)' == '1'">llvmaot</RuntimeVariant>
Expand Down Expand Up @@ -202,6 +205,12 @@
<ImportProjectExtensionTargets>false</ImportProjectExtensionTargets>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetOS)' == 'ios' Or '$(TargetOS)' == 'tvos'">
<EnableAggressiveTrimming>true</EnableAggressiveTrimming>
<PublishTrimmed>true</PublishTrimmed>
<SkipTestUtilitiesReference>true</SkipTestUtilitiesReference>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)testing\tests.props" Condition="'$(IsTestsCommonProject)' != 'true'" />
<Import Project="$(BaseOutputPath)\packages\Common\test_dependencies\test_dependencies\test_dependencies.*.props" Condition="'$(IsTestsCommonProject)' != 'true'" />
</Project>
Loading