forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Run TimeZoneInfo tests in parallel. (dotnet#4161)
Create RunAllTests variable Creates a new RunAllTests variable that defaults to false. This variable is used as a condition to trigger running our extended regression test suite. This variable is set to true in the following ways: The master pipeline sets the value to true so all commits to master run the full suite. The value is set to true for a PR build if: The branch name contains mono- The branch is not a fork This allows our Mono bump branches PRs (which take the form of mono-2019-12) to run the full suite, as there is a much higher chance of breakage for these commits. If you are queuing a new run from the UI, clicking the Variables option will allow you to set it to true for that run. (The variable shows up with the default value so you don't have to remember its name.) Put extended suites behind RunAllTests variable The following test suites are behind this new variable: Integrated Regression - MacOS Integrated Regression - Windows TimeZoneInfo - MacOS The effective changes are: Previously the integrated regression suite also ran for non-fork PR builds. Previously the TZI suite ran on all PR builds. We have determined that these suites are unlikely to break for normal day-to-day changes, so by default they will now only run on master commits and Mono bump PRs. As stated above, if you feel your change may be risky you can manually kick off a full test in the Pipelines UI. Updates the regression test stage introduced in commit 47e00d7 to only run when the mac_build stage completes successfully, as it depends on artifacts produced by that stage. Parallelize TimeZoneInfo tests The TimeZoneInfo test suite has been split across 3 build nodes to reduce each run below the target of 1 hour. (Previously this step took over 2 hours.)
- Loading branch information
Showing
3 changed files
with
96 additions
and
56 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
49 changes: 49 additions & 0 deletions
49
build-tools/automation/yaml-templates/run-timezoneinfo-tests.yaml
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,49 @@ | ||
# Runs TimeZoneInfo tests against an emulator running on macOS | ||
|
||
parameters: | ||
node_id: 0 | ||
|
||
jobs: | ||
- job: mac_timezoneinfo_tests_${{ parameters.node_id }} | ||
displayName: TimeZone - Mac-${{ parameters.node_id }} | ||
pool: $(HostedMac) | ||
timeoutInMinutes: 90 | ||
cancelTimeoutInMinutes: 5 | ||
workspace: | ||
clean: all | ||
steps: | ||
- template: setup-test-environment.yaml | ||
|
||
- task: DownloadPipelineArtifact@1 | ||
inputs: | ||
artifactName: $(TestAssembliesArtifactName) | ||
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) | ||
|
||
- task: MSBuild@1 | ||
displayName: start emulator | ||
inputs: | ||
solution: src/Mono.Android/Test/Mono.Android-Tests.csproj | ||
configuration: $(XA.Build.Configuration) | ||
msbuildArguments: > | ||
/t:AcquireAndroidTarget /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/start-emulator.binlog | ||
- template: run-nunit-tests.yaml | ||
parameters: | ||
testRunTitle: TimeZoneInfoTests On Device - macOS | ||
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/MSBuildDeviceIntegration.dll | ||
nunitConsoleExtraArgs: --where "test == Xamarin.Android.Build.Tests.DeploymentTest.CheckTimeZoneInfoIsCorrectNode${{ parameters.node_id }}" | ||
testResultsFile: TestResult-TimeZoneInfoTests-Node${{ parameters.node_id }}-$(XA.Build.Configuration).xml | ||
|
||
- task: MSBuild@1 | ||
displayName: shut down emulator | ||
inputs: | ||
solution: src/Mono.Android/Test/Mono.Android-Tests.csproj | ||
configuration: $(XA.Build.Configuration) | ||
msbuildArguments: > | ||
/t:AcquireAndroidTarget,ReleaseAndroidTarget | ||
/bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog | ||
condition: always() | ||
|
||
- template: upload-results.yaml | ||
parameters: | ||
artifactName: Test Results - TimeZoneInfo With Emulator - macOS - ${{ parameters.node_id }} |
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