-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support downloading and installing simulator images with Xcode 16 (#1277
) (#1279)
- Loading branch information
1 parent
d84e44c
commit 447c6b1
Showing
8 changed files
with
161 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -360,3 +360,5 @@ MigrationBackup/ | |
|
||
# some ide stuff | ||
.idea | ||
|
||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
tests/integration-tests/Apple/Simulator.Scouting.Commands.Tests.proj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<Project Sdk="Microsoft.DotNet.Helix.Sdk"> | ||
|
||
<ItemGroup> | ||
<!-- Adjust to the desired souting queue. --> | ||
<HelixTargetQueue Include="osx.amd64.iphone.scouting.open"/> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<!-- | ||
Change to specify the exact Xcode version for testing. | ||
In the CustomCommands below we can probe installed Xcode versions on Helix with `ls -al /Applications` and then choosing the write path. | ||
--> | ||
<XcodeVersionUnderTest>Xcode_16_beta_6</XcodeVersionUnderTest> | ||
<iOSSimulatorVersionUnderTest>18.0</iOSSimulatorVersionUnderTest> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<TestAppBundleName>System.Numerics.Vectors.Tests</TestAppBundleName> | ||
<XHarnessTestAppBundleUrl>$(AssetsBaseUri)/ios/test-app/ios-simulator-64/$(TestAppBundleName).app.zip</XHarnessTestAppBundleUrl> | ||
<TestAppDestinationDir>$(ArtifactsTmpDir)test-app\ios-simulator-64</TestAppDestinationDir> | ||
</PropertyGroup> | ||
|
||
<Target Name="TestApple" BeforeTargets="CoreTest"> | ||
<DownloadFile SourceUrl="$(XHarnessTestAppBundleUrl)" DestinationFolder="$(TestAppDestinationDir)" SkipUnchangedFiles="True" Retries="5"> | ||
<Output TaskParameter="DownloadedFile" ItemName="ZippedAppBundle" /> | ||
</DownloadFile> | ||
|
||
<Message Text="Downloaded $(TestAppBundleName) from @(ZippedAppBundle). Extracting..." Importance="High" /> | ||
<Exec Command="tar -xzf @(ZippedAppBundle) -C $(TestAppDestinationDir)" /> | ||
<Message Text="Extracted to $(TestAppDestinationDir)" Importance="High" /> | ||
|
||
<ItemGroup> | ||
<XHarnessAppBundleToTest Include="$(TestAppDestinationDir)\$(TestAppBundleName).app"> | ||
<TestTarget>ios-simulator-64_$(iOSSimulatorVersionUnderTest)</TestTarget> | ||
<WorkItemTimeout>00:20:00</WorkItemTimeout> | ||
<TestTimeout>00:07:00</TestTimeout> | ||
<LaunchTimeout>00:03:30</LaunchTimeout> | ||
<CustomCommands> | ||
<![CDATA[ | ||
set -ex | ||
xharness apple simulators install $target --verbosity=Debug --xcode /Applications/$(XcodeVersionUnderTest).app | ||
xharness apple simulators reset-simulator --output-directory="$output_directory" --target=$target --verbosity=Debug --xcode /Applications/$(XcodeVersionUnderTest).app | ||
deviceId=`xharness apple device $target` | ||
xharness apple install -t=$target --device="$deviceId" -o="$output_directory" --app="$app" --timeout=$launch_timeout -v --xcode /Applications/$(XcodeVersionUnderTest).app | ||
set +e | ||
result=0 | ||
xharness apple just-test -t=$target --device="$deviceId" -o="$output_directory" --app="net.dot.$(TestAppBundleName)" --launch-timeout=$launch_timeout --timeout=$timeout -v --xcode /Applications/$(XcodeVersionUnderTest).app | ||
((result|=$?)) | ||
xharness apple uninstall -t=$target --device="$deviceId" -o="$output_directory" --app="net.dot.$(TestAppBundleName)" -v --xcode /Applications/$(XcodeVersionUnderTest).app | ||
((result|=$?)) | ||
exit $result | ||
]]> | ||
</CustomCommands> | ||
</XHarnessAppBundleToTest> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Integration tests | ||
|
||
This folder includes integration tests projects for different support platforms (iOS, Android, WASM). | ||
They are used in end-to-end testing scenarios and are referenced from `azure-pipelines-public.yml` E2E templates. | ||
|
||
In the relevant `*.proj` files one can configure various setting for execution on Helix like: | ||
- configuring the Helix queue (e.g., `osx.13.amd64.iphone.open` via `HelixTargetQueue` item group) | ||
- app bundle to download, send to Helix and test (e.g., `System.Buffers.Tests.app`) | ||
- etc. | ||
|
||
## Testing on scouting queue | ||
|
||
NOTE: This is Apple-specific but can be applied to other platforms as well | ||
|
||
There are two test projects which can be used on scouting queues which are not used by default: | ||
|
||
- Apple/Simulator.Scouting.Tests.proj | ||
- Apple/Simulator.Scouting.Commands.Tests.proj | ||
|
||
When desired, these can be included in the `azure-pipelines-public.yml` so that the CI runs them on a desired scouting queue (check the `HelixTargetQueue` setting) with a particular version of Xcode. |