Skip to content

Add test leg to the PR build to run libraries tests on iOS x64 Simulators #37476

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

Merged
merged 94 commits into from
Sep 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
be7b233
Add XHarness Helix SDK support
premun Jun 5, 2020
066bafa
Try to build mono libraries
premun Jun 5, 2020
ebbf08b
Try to build mono libraries
premun Jun 5, 2020
83d7cab
Address some of Santiago's feedback from Jo's PR
premun Jun 5, 2020
1379eef
Merge runtime.yml from master
premun Jun 5, 2020
98377f1
Build iOSx64 libraries
premun Jun 5, 2020
495c602
Try to build mono product
premun Jun 5, 2020
c571262
Try to build mono product
premun Jun 5, 2020
636bc66
Merge master
premun Jun 5, 2020
9d9da07
Do not build AllSubsets
premun Jun 5, 2020
21d5ebc
Remove dead code
premun Jun 5, 2020
df64e06
Revert: Do not built AllSubsets
premun Jun 5, 2020
553147d
Disable test archivation
premun Jun 5, 2020
9e7d3f2
Improvements for local test running
directhex Jun 5, 2020
138706f
Merge branch 'prvysoky/use-helix-sdk' of github.com:premun/runtime in…
directhex Jun 5, 2020
2a2243d
Return dead code
premun Jun 5, 2020
030511c
Reintroduce whitespace errors
directhex Jun 5, 2020
d1a4226
Bump Helix SDK and keep trailing slashes
premun Jun 8, 2020
d3366ae
Revert "Bump Helix SDK and keep trailing slashes"
premun Jun 8, 2020
16168da
Try building 2 app bundles
premun Jun 8, 2020
64da851
Try a cleaner `.app` find in msbuild, from @akoeplinger
directhex Jun 8, 2020
506afd2
Revert "Try a cleaner `.app` find in msbuild, from @akoeplinger"
directhex Jun 8, 2020
6778369
Do not archiveTests on iOS, it causes tests to be included twice
directhex Jun 8, 2020
f3252fd
Revert "Revert "Try a cleaner `.app` find in msbuild, from @akoepling…
directhex Jun 8, 2020
2743b13
Turn on all the tests on iOS
directhex Jun 8, 2020
8a2c248
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
directhex Jun 8, 2020
6f6731e
Remove Android changes, to keep scope of PR smaller
directhex Jun 8, 2020
e6a94dd
Update global.json
directhex Jun 8, 2020
8f07f4c
Update src/libraries/sendtohelix.proj
directhex Jun 8, 2020
3d73fc6
Remove useless archiveTests=false
directhex Jun 8, 2020
0e0403f
Update src/libraries/sendtohelix.proj
directhex Jun 8, 2020
01cc2b1
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
premun Jun 9, 2020
aee9b85
Fix runtime-packs dir
premun Jun 9, 2020
3f2f23c
Revert changes in yml to use new mono build workflow
safern Jun 9, 2020
bcc7dcc
Merge remote-tracking branch 'dotnet/master' into prvysoky/use-helix-sdk
safern Jun 9, 2020
ffb1b02
Add iOS x64 testing to new collapsed build model
safern Jun 9, 2020
1e9eb5d
Just run System.Buffers.Tests to make testing faster
safern Jun 9, 2020
0b6b5a5
Set helixQueuesTemplate in the right place
safern Jun 9, 2020
7c23cd7
Set XHarness version in Version.props
premun Jun 10, 2020
1671125
Roll back to XHarness that supports Xcode 11.4
premun Jun 10, 2020
1f9c3cf
Cleanup
safern Jun 10, 2020
413e135
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
premun Jun 11, 2020
82ff98a
Add XHarness CLI to Version.Details.xml
premun Jun 11, 2020
48d66d0
Bump XHarness and Helix SDK versions
premun Jun 12, 2020
09bd517
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
premun Jun 12, 2020
624a31c
Target iOS 13.5 specifically
premun Jun 12, 2020
95b1c96
Bump XHarness CLI version
premun Jun 12, 2020
e9a3b50
Merge remote-tracking branch 'origin/master' into enable-ios-helix
directhex Jul 14, 2020
bbf9d5d
Minor helix tweak maybe
directhex Jul 14, 2020
73d6395
Ensure xharness is included for iOS
directhex Jul 14, 2020
36607ec
Enable all tests
directhex Jul 14, 2020
24aa660
Remove duplicate
directhex Jul 14, 2020
6bb6a2c
Add exclude list of test suites without 100% pass on iOS
directhex Jul 14, 2020
4f1cd5b
Exclude more tests
directhex Jul 14, 2020
ee0755e
Skip more tests
directhex Jul 14, 2020
16d342c
Merge remote-tracking branch 'origin/master' into enable-ios-helix
directhex Jul 14, 2020
b60a3ab
Exclude more tests
directhex Jul 15, 2020
4b4c195
Kill the simulators better
premun Jul 27, 2020
f8aff2d
Merge branch 'master' into prvysoky/use-helix-sdk
premun Jul 27, 2020
4686a68
Re-use the XCODE_PATH variable, unify variable naming
premun Jul 27, 2020
48ab6f7
Rename XHarnessAppFolderToTest to match new API
premun Jul 28, 2020
3728ff2
Do not kill simulator after the run
premun Jul 28, 2020
15dfc43
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
premun Aug 3, 2020
ac61f7c
Fix counting of Helix work items
premun Aug 3, 2020
e2dd430
Increase timeouts a bit and remove the timeout in seconds
premun Aug 10, 2020
382c0e6
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
premun Aug 10, 2020
232c015
Do not set Helix timeout, XHarness SDK will do it for us
premun Aug 11, 2020
4d28140
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
premun Aug 11, 2020
eaca727
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
premun Aug 13, 2020
53b7920
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
premun Aug 14, 2020
9cbb37b
Bump the Helix SDK
premun Aug 14, 2020
556f566
Bump the Helix SDK
premun Aug 17, 2020
6c0d4ba
Exclude Microsoft.Extensions.Logging.Console.Tests because of failing…
premun Aug 19, 2020
6988ea7
Merge remote-tracking branch 'origin/master' into prvysoky/use-helix-sdk
premun Aug 19, 2020
82138c0
Merge remote-tracking branch 'dotnet/master' into prvysoky/use-helix-sdk
premun Aug 20, 2020
2096169
Bump XHarness CLI and Helix SDK
premun Aug 20, 2020
ae674a2
Merge remote-tracking branch 'dotnet/master' into prvysoky/use-helix-sdk
premun Aug 24, 2020
f64fa45
Merge remote-tracking branch 'origin/master' into enable-ios-helix
directhex Aug 28, 2020
685b923
Re-enable all lanes, so merging is viable
directhex Aug 31, 2020
4757353
Merge remote-tracking branch 'origin/master' into enable-ios-helix
directhex Aug 31, 2020
57a75a0
Merge remote-tracking branch 'origin/master' into enable-ios-helix
directhex Sep 1, 2020
4af87be
Fix Wasm breakage
directhex Sep 1, 2020
3b3792c
Merge remote-tracking branch 'origin/master' into enable-ios-helix
directhex Sep 1, 2020
b8ba96c
Use xcode-select for local runs
premun Sep 3, 2020
146b4b0
Target the most recent iOS version
premun Sep 3, 2020
cc68ec3
Do not kill simulator in local dev env
premun Sep 3, 2020
ca4a175
Fix comments
premun Sep 4, 2020
fff75e7
Merge remote-tracking branch 'dotnet/master' into prvysoky/use-helix-sdk
premun Sep 4, 2020
51f1849
Print the output path instead of listing the files
premun Sep 4, 2020
9360c81
Merge branch 'master' into prvysoky/use-helix-sdk
directhex Sep 4, 2020
a266f68
Merge remote-tracking branch 'dotnet/master' into prvysoky/use-helix-sdk
premun Sep 7, 2020
f097772
Reset timeouts and only change it for iOS/tvOS
premun Sep 7, 2020
8a1ed9c
Merge remote-tracking branch 'dotnet/master' into prvysoky/use-helix-sdk
premun Sep 8, 2020
af9244b
Merge remote-tracking branch 'dotnet/master' into prvysoky/use-helix-sdk
premun Sep 9, 2020
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
12 changes: 2 additions & 10 deletions eng/pipelines/common/xplat-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,8 @@ jobs:
name: NetCoreInternal-Pool
queue: BuildPool.Ubuntu.1604.Amd64

# Public OSX Build Pool
${{ if eq(parameters.osGroup, 'OSX') }}:
vmImage: 'macOS-10.14'

# Public OSX Build Pool
${{ if eq(parameters.osGroup, 'iOS') }}:
vmImage: 'macOS-10.14'

# Public OSX Build Pool
${{ if eq(parameters.osGroup, 'tvOS') }}:
# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.14'

${{ if eq(parameters.osGroup, 'Browser') }}:
Expand Down
4 changes: 4 additions & 0 deletions eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ jobs:
- OSX.1014.Amd64.Open
- OSX.1015.Amd64.Open

# iOS x64/x86
- ${{ if in(parameters.platform, 'iOS_x64', 'iOS_x86') }}:
- OSX.1015.Amd64.Open

# Windows_NT x64
- ${{ if eq(parameters.platform, 'Windows_NT_x64') }}:
# netcoreapp
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ jobs:
- Android_arm
- tvOS_arm64
- iOS_arm
- iOS_x64
- Linux_musl_x64
jobParameters:
testGroup: innerloop
Expand All @@ -313,6 +312,7 @@ jobs:
buildConfig: Release
runtimeFlavor: mono
platforms:
- iOS_x64
- Browser_wasm
variables:
# map dependencies variables to local variables
Expand Down
19 changes: 9 additions & 10 deletions eng/testing/AppleRunnerTemplate.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/usr/bin/env bash

EXECUTION_DIR=$(dirname $0)
TEST_NAME=$1
TARGET_ARCH=$2
TARGET=
SCHEME_SDK=
[[RunCommands]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to get rid of the runcommands templating mechanism as having individual runner scripts for different targets (ios/android/wasm) seems to be sufficient. Doing that in #39923. That will basically undo this change here. Any objections?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I support that change as we should be able to define it via MSBuild.

Copy link
Member

@steveisok steveisok Sep 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections from me.

@directhex - any objections?


# "Release" in SCHEME_SDK is what xcode produces (see "bool Optimized" property in AppleAppBuilderTask)
if [ "$TARGET_ARCH" == "arm" ]; then
TARGET=ios-device
SCHEME_SDK=Release-iphoneos
Expand All @@ -23,8 +21,6 @@ else
exit 1
fi

# "Release" in SCHEME_SDK is what xcode produces (see "bool Optimized" property in AppleAppBuilderTask)

APP_BUNDLE=$EXECUTION_DIR/$TEST_NAME/$SCHEME_SDK/$TEST_NAME.app

# it doesn't support parallel execution yet, so, here is a hand-made semaphore:
Expand All @@ -39,14 +35,17 @@ while true; do
fi
done

XHARNESS_OUT="$EXECUTION_DIR/xharness-output"
XCODE_PATH="`xcode-select -p`/../.."
export XHARNESS_OUT="$EXECUTION_DIR/xharness-output"

dotnet xharness ios test --app="$APP_BUNDLE" \
--targets=$TARGET \
dotnet xharness ios test \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we support filtering tests or any xunit parameters? Like -notrait Category=Outerloop? If so, this is wrong and should use RunScriptCommand in the MSBuild side to set this command.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally yes, but we first need a way to flow arbitrary command line arguments to the iOS/Android test apps and that will need some changes in xharness and the iOS/Android test runners, I don't think we need to block the PR on that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. We just need to be conscious that PR validation is running outerloop tests for iOS as well, which might be causing the slow runs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah no, we added handling for that already with

<WriteLinesToFile File="$(PublishDir)xunit-excludes.txt" Lines="$(_withoutCategories.Replace(';', '%0dcategory='))" />
which is read by the testrunner so Outerloop and failing tests should already be excluded.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sounds good. Maybe we should do it how we do it in other places passing them as an argument but that is in the future, no need to block this PR.

--targets="$TARGET" \
--app="$APP_BUNDLE" \
--xcode="$XCODE_PATH" \
--output-directory=$XHARNESS_OUT

_exitCode=$?

echo "Xharness artifacts: $XHARNESS_OUT"
echo "XHarness artifacts: $XHARNESS_OUT"

exit $_exitCode
17 changes: 16 additions & 1 deletion eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
<RunScriptCommand>$HARNESS_RUNNER wasm test --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js -v --output-directory=$XHARNESS_OUT -- --run WasmTestRunner.dll $(AssemblyName).dll</RunScriptCommand>
</PropertyGroup>

<ItemGroup>
<RunScriptCommands Include="TEST_NAME=$(TestProjectName)" />
<RunScriptCommands Include="TARGET_ARCH=$(TargetArchitecture)" />
</ItemGroup>

<!-- Generate a self-contained app bundle for Android with tests. -->
<UsingTask Condition="'$(TargetOS)' == 'Android'"
TaskName="AndroidAppBuilderTask"
Expand Down Expand Up @@ -72,6 +77,7 @@
<Error Condition="!Exists('$(MicrosoftNetCoreAppRuntimePackRidDir)')" Text="MicrosoftNetCoreAppRuntimePackRidDir=$(MicrosoftNetCoreAppRuntimePackRidDir) doesn't exist" />
<Error Condition="('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm') and '$(DevTeamProvisioning)' == ''"
Text="'DevTeamProvisioning' needs to be set for device builds. Set it to 'UBF8T346G9' if you're part of the Microsoft team account." />
<Error Condition="'$(TestArchiveTestsDir)' == ''" Text="TestArchiveTestsDir property to archive the test folder must be set." />

<WriteLinesToFile File="$(PublishDir)xunit-excludes.txt" Lines="$(_withoutCategories.Replace(';', '%0dcategory='))" />

Expand Down Expand Up @@ -114,7 +120,16 @@
</AppleAppBuilderTask>
<Message Importance="High" Text="Xcode: $(XcodeProjectPath)"/>
<Message Importance="High" Text="App: $(AppBundlePath)"/>
<!-- This app is now can be consumed by xharness CLI to deploy on a device or simulator -->

<ItemGroup>
<_appFiles Include="$(AppBundlePath)/../**/*" />
</ItemGroup>

<Copy SourceFiles="@(_appFiles)"
DestinationFolder="$(TestArchiveTestsDir)/%(RecursiveDir)"
SkipUnchangedFiles="true"
Condition="'$(ArchiveTests)' == 'true' and '$(IgnoreForCI)' != 'true'" />

</Target>

<UsingTask TaskName="WasmAppBuilder"
Expand Down
41 changes: 27 additions & 14 deletions src/libraries/sendtohelixhelp.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<HelixBuild Condition="'$(HelixBuild)' == ''">$(BUILD_BUILDNUMBER)</HelixBuild>
<HelixBuild Condition="'$(HelixBuild)' == ''">default</HelixBuild>

<!-- Normal jobs have a 30 minute (1800 sec.) timeout for arm/arm64, and 15 minute (900 sec.) timeout otherwise.
<!-- Normal jobs have a 30 minute timeout for arm/arm64, and 15 minute timeout otherwise.
Stress modes can take considerably longer, so double those numbers. And GCStress is even slower.
-->
<TimeoutInSeconds Condition="
<_workItemTimeout Condition="
'$(Scenario)' == 'gcstress0x3' or
'$(Scenario)' == 'gcstress0xc' or
'$(Scenario)' == 'heapverify1' or
Expand All @@ -24,13 +24,12 @@
'$(Scenario)' == 'gcstress0xc_zapdisable_heapverify1' or
'$(Scenario)' == 'gcstress0xc_jitstress1' or
'$(Scenario)' == 'gcstress0xc_jitstress2' or
'$(Scenario)' == 'gcstress0xc_jitminopts_heapverify1'">5400</TimeoutInSeconds>
<TimeoutInSeconds Condition="'$(Scenario)' == '' and '$(TimeoutInSeconds)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">1800</TimeoutInSeconds>
<TimeoutInSeconds Condition="'$(Scenario)' != '' and '$(TimeoutInSeconds)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">3600</TimeoutInSeconds>
<TimeoutInSeconds Condition="'$(Scenario)' == '' and '$(TimeoutInSeconds)' == ''">900</TimeoutInSeconds>
<TimeoutInSeconds Condition="'$(Scenario)' != '' and '$(TimeoutInSeconds)' == ''">1800</TimeoutInSeconds>

<_timeoutSpan>$([System.TimeSpan]::FromSeconds($(TimeoutInSeconds)))</_timeoutSpan>
'$(Scenario)' == 'gcstress0xc_jitminopts_heapverify1'">01:30:00</_workItemTimeout>
<_workItemTimeout Condition="'$(_workItemTimeout)' == '' and ('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS')">00:30:00</_workItemTimeout>
<_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">00:45:00</_workItemTimeout>
<_workItemTimeout Condition="'$(Scenario)' != '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">01:00:00</_workItemTimeout>
<_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == ''">00:15:00</_workItemTimeout>
<_workItemTimeout Condition="'$(Scenario)' != '' and '$(_workItemTimeout)' == ''">00:30:00</_workItemTimeout>

<!-- We need to enable xunit reporter so that it parses test results
Package testing doesn't run on xunit. -->
Expand Down Expand Up @@ -73,7 +72,7 @@
<HelixType Condition="'$(TestPackages)' == 'true'">test/functional/packaging/</HelixType>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetOS)' == 'Browser'">
<PropertyGroup Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'">
<IncludeXHarnessCli>true</IncludeXHarnessCli>
</PropertyGroup>

Expand Down Expand Up @@ -162,9 +161,22 @@
<Message Importance="High" Text="Using HelixCommand: $(HelixCommand)" />
<Message Importance="High" Text="Using HelixType: $(HelixType)" />
<Message Importance="High" Text="Using WorkItemArchiveWildCard: $(WorkItemArchiveWildCard)" />
<Message Importance="High" Text="Using Timeout: $(_timeoutSpan)" />
<Message Importance="High" Text="Using Timeout: $(_workItemTimeout)" />

<ItemGroup Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'">
<!-- Find all directories named *.app -->
<XHarnessAppBundleToTest Include="$([System.IO.Directory]::GetDirectories('$(TestArchiveTestsRoot)', '*.app', System.IO.SearchOption.AllDirectories))">
<Targets Condition="'$(TargetArchitecture)' == 'arm'">ios-device</Targets>
<Targets Condition="'$(TargetArchitecture)' == 'arm64'">ios-device</Targets>
<Targets Condition="'$(TargetArchitecture)' == 'x64'">ios-simulator-64</Targets>
<Targets Condition="'$(TargetArchitecture)' == 'x86'">ios-simulator-32</Targets>

<TestTimeout>$(_workItemTimeout)</TestTimeout>
<LaunchTimeout>$(_workItemTimeout)</LaunchTimeout>
</XHarnessAppBundleToTest>
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(TargetOS)' != 'iOS' and '$(TargetOS)' != 'tvOS'">
<HelixCorrelationPayload Include="$(HelixCorrelationPayload)"
Condition="'$(IncludeHelixCorrelationPayload)' == 'true'" />

Expand All @@ -173,12 +185,13 @@
<HelixWorkItem Include="@(_WorkItem -> '%(FileName)')">
<PayloadArchive>%(Identity)</PayloadArchive>
<Command>$(HelixCommand)</Command>
<Timeout>$(_timeoutSpan)</Timeout>
<Timeout>$(_workItemTimeout)</Timeout>
</HelixWorkItem>
</ItemGroup>

<Message Condition="'$(Scenario)' != ''" Importance="High" Text="Done building Helix work items for scenario $(Scenario). Work item count: @(_WorkItem->Count())" />
<Message Condition="'$(Scenario)' == ''" Importance="High" Text="Done building Helix work items. Work item count: @(_WorkItem->Count())" />
<Message Condition="'$(Scenario)' == '' and ('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS')" Importance="High" Text="Done building Helix work items. Work item count: @(XHarnessAppBundleToTest->Count())" />
<Message Condition="'$(Scenario)' == '' and '$(TargetOS)' != 'iOS' and '$(TargetOS)' != 'tvOS'" Importance="High" Text="Done building Helix work items. Work item count: @(_WorkItem->Count())" />

</Target>

Expand Down
Loading