From 83e45ab40b88f1d12abaf56aa70c36fbfaf278b6 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Thu, 11 May 2023 18:03:34 -0400 Subject: [PATCH 01/14] [CI] Allow emulator tests to run in the megapipeline. --- .../automation/yaml-templates/run-msbuild-tests.yaml | 3 +++ .../yaml-templates/run-sliced-nunit-tests.yaml | 7 ++++++- .../yaml-templates/setup-test-environment.yaml | 5 +++++ .../yaml-templates/stage-msbuild-emulator-tests.yaml | 11 +++++++++++ .../yaml-templates/stage-msbuild-tests.yaml | 3 +++ .../Tests/Xamarin.ProjectTools/XABuildPaths.cs | 7 ++++--- 6 files changed, 32 insertions(+), 4 deletions(-) diff --git a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml index 5597b53de0b..873d74831ee 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml @@ -7,6 +7,7 @@ parameters: xaSourcePath: $(System.DefaultWorkingDirectory) repositoryAlias: 'self' commit: '' + prepareSteps: [] jobs: - job: ${{ parameters.jobName }} @@ -37,6 +38,7 @@ jobs: xaSourcePath: ${{ parameters.xaSourcePath }} repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} + prepareSteps: ${{ parameters.prepareSteps }} - task: DownloadPipelineArtifact@2 inputs: @@ -53,5 +55,6 @@ jobs: - template: upload-results.yaml parameters: artifactName: Test Results - MSBuild - ${{ parameters.testOS }}-$(System.JobPositionInPhase) + xaSourcePath: ${{ parameters.xaSourcePath }} - template: fail-on-issue.yaml diff --git a/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml b/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml index 60624f5da0d..5361da17819 100644 --- a/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml +++ b/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml @@ -2,6 +2,7 @@ parameters: testAssembly: # NUnit test assembly to run testFilter: # Filter used to select tests (NUnit test selection language, not dotnet test filter language) testRunTitle: # Title of the test run + xaSourcePath: $(System.DefaultWorkingDirectory) retryFailedTests: true # Retry failed tests once steps: @@ -22,6 +23,7 @@ steps: testRunTitle: ${{ parameters.testRunTitle }}-$(System.JobPositionInPhase) testAssembly: ${{ parameters.testAssembly }} dotNetTestExtraArgs: --settings "${{ parameters.testAssembly }}.runsettings" + xaSourcePath: ${{ parameters.xaSourcePath }} - ${{ if eq(parameters.retryFailedTests, 'true') }}: # We need a custom dotnet test invocation here that does not trigger a task failure on failed tests @@ -34,13 +36,15 @@ steps: -- NUnit.NumberOfTestWorkers=$(NUnit.NumberOfTestWorkers) displayName: Run tests ignoreLASTEXITCODE: true - + workingDirectory: ${{ parameters.xaSourcePath }} + - pwsh: | dotnet-test-slicer ` retry ` --trx="$(Agent.TempDirectory)" ` --outfile="${{ parameters.testAssembly }}.runsettings" displayName: Look for failed tests + workingDirectory: ${{ parameters.xaSourcePath }} # dotnet-test-slicer removed the failed tests from our results file, so it's safe to publish it now - task: PublishTestResults@2 @@ -54,3 +58,4 @@ steps: testRunTitle: ${{ parameters.testRunTitle }}-$(System.JobPositionInPhase) (Auto-Retry) testAssembly: ${{ parameters.testAssembly }} dotNetTestExtraArgs: --settings "${{ parameters.testAssembly }}.runsettings" + xaSourcePath: ${{ parameters.xaSourcePath }} diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml index 234a225945a..25b6f8cc5f3 100644 --- a/build-tools/automation/yaml-templates/setup-test-environment.yaml +++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml @@ -13,9 +13,14 @@ parameters: repositoryAlias: 'self' commit: '' xaprepareScenario: AndroidTestDependencies # Use 'EmulatorTestDependencies' for agents that need the emulator installed + prepareSteps: [] steps: +- ${{ each step in parameters.prepareSteps }}: + - ${{ each pair in step }}: + ${{ pair.key }}: ${{ pair.value }} + - template: sdk-unified/steps/checkout/v1.yml@yaml-templates parameters: resource: ${{ parameters.repositoryAlias }} diff --git a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml index 5d7daf5f370..d18f9898630 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml @@ -11,6 +11,7 @@ parameters: repositoryAlias: 'self' commit: '' usesCleanImages: true + prepareSteps: [] stages: - stage: ${{ parameters.stageName }} @@ -41,6 +42,7 @@ stages: repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} xaprepareScenario: EmulatorTestDependencies + prepareSteps: ${{ parameters.prepareSteps }} - task: DownloadPipelineArtifact@2 inputs: @@ -48,6 +50,8 @@ stages: downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) - template: start-stop-emulator.yaml + parameters: + xaSourcePath: ${{ parameters.xaSourcePath }} - template: run-sliced-nunit-tests.yaml parameters: @@ -59,10 +63,12 @@ stages: - template: start-stop-emulator.yaml parameters: command: stop + xaSourcePath: ${{ parameters.xaSourcePath }} - template: upload-results.yaml parameters: artifactName: Test Results - MSBuild With Emulator - macOS-$(System.JobPositionInPhase) + xaSourcePath: ${{ parameters.xaSourcePath }} - template: fail-on-issue.yaml @@ -95,6 +101,7 @@ stages: repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} xaprepareScenario: EmulatorTestDependencies + prepareSteps: ${{ parameters.prepareSteps }} - task: DownloadPipelineArtifact@2 inputs: @@ -108,12 +115,14 @@ stages: avdApiLevel: $(avdApiLevel) avdAbi: $(avdAbi) avdType: $(avdType) + xaSourcePath: ${{ parameters.xaSourcePath }} - template: run-sliced-nunit-tests.yaml parameters: testRunTitle: WearOS On Device - macOS testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll testFilter: cat = WearOS + xaSourcePath: ${{ parameters.xaSourcePath }} - ${{ if ne(parameters.usesCleanImages, true) }}: - template: start-stop-emulator.yaml @@ -124,10 +133,12 @@ stages: avdApiLevel: $(avdApiLevel) avdAbi: $(avdAbi) avdType: $(avdType) + xaSourcePath: ${{ parameters.xaSourcePath }} - template: upload-results.yaml parameters: configuration: $(XA.Build.Configuration) artifactName: Test Results - Emulator $(avdApiLevel)-$(avdAbi)-$(avdType) - macOS + xaSourcePath: ${{ parameters.xaSourcePath }} - template: fail-on-issue.yaml diff --git a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml index 24f71d052f3..549a8b4e6fe 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml @@ -8,6 +8,7 @@ parameters: xaSourcePath: $(System.DefaultWorkingDirectory) repositoryAlias: 'self' commit: '' + prepareSteps: [] stages: - stage: ${{ parameters.stageName }} @@ -25,6 +26,7 @@ stages: xaSourcePath: ${{ parameters.xaSourcePath }} repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} + prepareSteps: ${{ parameters.prepareSteps }} - template: run-msbuild-tests.yaml parameters: @@ -36,3 +38,4 @@ stages: xaSourcePath: ${{ parameters.xaSourcePath }} repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} + prepareSteps: ${{ parameters.prepareSteps }} diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs index e2ebdf721ae..8aa2c469f6b 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs @@ -11,7 +11,8 @@ public class XABuildPaths public static string Configuration = Environment.GetEnvironmentVariable ("CONFIGURATION") ?? "Release"; #endif - public static string TopDirectory = GetTopDirRecursive (Path.GetFullPath ( + // if in the megapipeline, we do know the root, else find it based on the assembly + public static string TopDirectory = GetTopDirRecursive (Environment.GetEnvironmentVariable ("MEGAPIPELINE_ANDROID_DIR") ?? Path.GetFullPath ( Path.GetDirectoryName (new Uri (typeof (XamarinProject).Assembly.CodeBase).LocalPath))); public static readonly string PrefixDirectory = Path.Combine (TopDirectory, "bin", Configuration); @@ -39,8 +40,8 @@ static string GetTestDirectoryRoot () if (Directory.Exists (_testOutputDirectory)) return _testOutputDirectory; - // Set when running on Azure Pipelines https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables - var rootDir = Environment.GetEnvironmentVariable ("BUILD_STAGINGDIRECTORY"); + // Set when running on Azure Pipelines https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables or when part of the megapipeline + var rootDir = Environment.GetEnvironmentVariable ("MEGAPIPELINE_ANDROID_DIR") ?? Environment.GetEnvironmentVariable ("BUILD_STAGINGDIRECTORY"); if (!Directory.Exists (rootDir)) { _testOutputDirectory = TestAssemblyOutputDirectory; } else { From 5c256ee1fa5f7658a0ba4d2dc77520b61ee9742a Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 15 May 2023 07:55:54 -0400 Subject: [PATCH 02/14] Apply suggestions from code review Co-authored-by: Peter Collins --- .../automation/yaml-templates/setup-test-environment.yaml | 5 +---- .../Tests/Xamarin.ProjectTools/XABuildPaths.cs | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml index 25b6f8cc5f3..f836f6ee54f 100644 --- a/build-tools/automation/yaml-templates/setup-test-environment.yaml +++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml @@ -17,10 +17,7 @@ parameters: steps: -- ${{ each step in parameters.prepareSteps }}: - - ${{ each pair in step }}: - ${{ pair.key }}: ${{ pair.value }} - +- ${{ parameters.prepareSteps }} - template: sdk-unified/steps/checkout/v1.yml@yaml-templates parameters: resource: ${{ parameters.repositoryAlias }} diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs index 8aa2c469f6b..b91f9559582 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs @@ -40,8 +40,8 @@ static string GetTestDirectoryRoot () if (Directory.Exists (_testOutputDirectory)) return _testOutputDirectory; - // Set when running on Azure Pipelines https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables or when part of the megapipeline - var rootDir = Environment.GetEnvironmentVariable ("MEGAPIPELINE_ANDROID_DIR") ?? Environment.GetEnvironmentVariable ("BUILD_STAGINGDIRECTORY"); + // Set when running on Azure Pipelines https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables + var rootDir = Environment.GetEnvironmentVariable ("BUILD_STAGINGDIRECTORY"); if (!Directory.Exists (rootDir)) { _testOutputDirectory = TestAssemblyOutputDirectory; } else { From 9eb4ba3fab4fd7e5d3a04ea55fa9b6c10a8fdcf3 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 15 May 2023 15:53:40 -0400 Subject: [PATCH 03/14] Move variable to the template. --- build-tools/automation/azure-pipelines.yaml | 2 -- build-tools/automation/yaml-templates/variables.yaml | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index fd7880a304b..4bb2eed9144 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -56,8 +56,6 @@ variables: value: '& TestCategory != DotNetIgnore & TestCategory != HybridAOT & TestCategory != MkBundle & TestCategory != MonoSymbolicate & TestCategory != StaticProject & TestCategory != SystemApplication' - name: ExcludedNUnitCategories value: '& cat != DotNetIgnore & cat != HybridAOT & cat != MkBundle & cat != MonoSymbolicate & cat != StaticProject & cat != SystemApplication' -- name: DefaultTestSdkPlatforms # Comma-separated SDK Platform(s) to install on test agents (no spaces) - value: 33,UpsideDownCake - ${{ if eq(variables['Build.DefinitionName'], 'Xamarin.Android-Private') }}: - group: AzureDevOps-Artifact-Feeds-Pats - group: DotNet-MSRC-Storage diff --git a/build-tools/automation/yaml-templates/variables.yaml b/build-tools/automation/yaml-templates/variables.yaml index d3d40f8f1eb..0fb76919c4f 100644 --- a/build-tools/automation/yaml-templates/variables.yaml +++ b/build-tools/automation/yaml-templates/variables.yaml @@ -43,3 +43,5 @@ variables: # Workaround: https://github.com/dotnet/linker/issues/3012 - name: DOTNET_gcServer value: 0 +- name: DefaultTestSdkPlatforms # Comma-separated SDK Platform(s) to install on test agents (no spaces) + value: 33,UpsideDownCake From 1ce4ab7cc32f8cadbe67416b0fed187ac288bcb0 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 15 May 2023 15:54:01 -0400 Subject: [PATCH 04/14] Do use the correct root path. --- build-tools/automation/yaml-templates/run-msbuild-tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml index 873d74831ee..e3cb0b0d108 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml @@ -43,11 +43,11 @@ jobs: - task: DownloadPipelineArtifact@2 inputs: artifactName: $(TestAssembliesArtifactName) - downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) + downloadPath: ${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration) - template: run-sliced-nunit-tests.yaml parameters: - testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll + testAssembly: ${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll testFilter: ${{ parameters.testFilter }} $(ExcludedNUnitCategories) testRunTitle: Xamarin.Android.Build.Tests - ${{ parameters.testOS }} retryFailedTests: false From 136dac759549354d65661059e7dfb26b318b3c8b Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 15 May 2023 18:30:45 -0400 Subject: [PATCH 05/14] Add debug. --- .../automation/yaml-templates/run-sliced-nunit-tests.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml b/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml index 5361da17819..2567c4eefac 100644 --- a/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml +++ b/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml @@ -16,6 +16,11 @@ steps: --outfile="${{ parameters.testAssembly }}.runsettings" displayName: Slice unit tests +- pwsh: | + Get-ChildItem -Path . -Recurse | Out-String -Width 160 + displayName: Debug + workingDirectory: ${{ parameters.xaSourcePath }} + - ${{ if eq(parameters.retryFailedTests, 'false') }}: # If we aren't using auto-retry logic, then this is just a simple template call - template: run-nunit-tests.yaml From fb862447e86c74c0dce65e52fc1e876cefe404bd Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 16 May 2023 10:24:38 -0400 Subject: [PATCH 06/14] Revert "Add debug." This reverts commit 136dac759549354d65661059e7dfb26b318b3c8b. --- .../automation/yaml-templates/run-sliced-nunit-tests.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml b/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml index 2567c4eefac..5361da17819 100644 --- a/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml +++ b/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml @@ -16,11 +16,6 @@ steps: --outfile="${{ parameters.testAssembly }}.runsettings" displayName: Slice unit tests -- pwsh: | - Get-ChildItem -Path . -Recurse | Out-String -Width 160 - displayName: Debug - workingDirectory: ${{ parameters.xaSourcePath }} - - ${{ if eq(parameters.retryFailedTests, 'false') }}: # If we aren't using auto-retry logic, then this is just a simple template call - template: run-nunit-tests.yaml From 7f5fef5f2146efa518c4e5c5d0bd86ba91d4d53d Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 16 May 2023 10:24:59 -0400 Subject: [PATCH 07/14] Pass the co for the android project to the slice template. --- build-tools/automation/yaml-templates/run-msbuild-tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml index e3cb0b0d108..fc703ec6918 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml @@ -51,6 +51,7 @@ jobs: testFilter: ${{ parameters.testFilter }} $(ExcludedNUnitCategories) testRunTitle: Xamarin.Android.Build.Tests - ${{ parameters.testOS }} retryFailedTests: false + xaSourcePath: ${{ parameters.xaSourcePath }} - template: upload-results.yaml parameters: From ca567e6fb09b52bdedfea7f035a4215e3004c720 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 16 May 2023 17:58:41 -0400 Subject: [PATCH 08/14] Share ExcludeCategories variables. --- build-tools/automation/azure-pipelines.yaml | 2 -- build-tools/automation/yaml-templates/variables.yaml | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 4bb2eed9144..c1ea2b5e367 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -54,8 +54,6 @@ variables: value: $[or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['System.PullRequest.TargetBranch'], 'release/'))] - name: DotNetNUnitCategories value: '& TestCategory != DotNetIgnore & TestCategory != HybridAOT & TestCategory != MkBundle & TestCategory != MonoSymbolicate & TestCategory != StaticProject & TestCategory != SystemApplication' -- name: ExcludedNUnitCategories - value: '& cat != DotNetIgnore & cat != HybridAOT & cat != MkBundle & cat != MonoSymbolicate & cat != StaticProject & cat != SystemApplication' - ${{ if eq(variables['Build.DefinitionName'], 'Xamarin.Android-Private') }}: - group: AzureDevOps-Artifact-Feeds-Pats - group: DotNet-MSRC-Storage diff --git a/build-tools/automation/yaml-templates/variables.yaml b/build-tools/automation/yaml-templates/variables.yaml index 0fb76919c4f..26d33a0b4c1 100644 --- a/build-tools/automation/yaml-templates/variables.yaml +++ b/build-tools/automation/yaml-templates/variables.yaml @@ -45,3 +45,5 @@ variables: value: 0 - name: DefaultTestSdkPlatforms # Comma-separated SDK Platform(s) to install on test agents (no spaces) value: 33,UpsideDownCake +- name: ExcludedNUnitCategories + value: '& cat != DotNetIgnore & cat != HybridAOT & cat != MkBundle & cat != MonoSymbolicate & cat != StaticProject & cat != SystemApplication' From a668f1a34431a7fffc26c6ee9854fd7b3ee816d0 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 7 Jun 2023 14:31:37 -0400 Subject: [PATCH 09/14] Fix some paths, fix condition on fail-on-issue --- .../automation/yaml-templates/fail-on-issue.yaml | 3 ++- .../yaml-templates/run-msbuild-tests.yaml | 3 +++ .../stage-msbuild-emulator-tests.yaml | 13 +++++++++---- .../yaml-templates/stage-msbuild-tests.yaml | 3 +++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/build-tools/automation/yaml-templates/fail-on-issue.yaml b/build-tools/automation/yaml-templates/fail-on-issue.yaml index ad3f176f9ed..2df5c567919 100644 --- a/build-tools/automation/yaml-templates/fail-on-issue.yaml +++ b/build-tools/automation/yaml-templates/fail-on-issue.yaml @@ -1,5 +1,5 @@ parameters: - condition: succeeded() + condition: succeededOrFailed() steps: - powershell: | @@ -8,3 +8,4 @@ steps: Write-Host "##vso[task.complete result=Failed;]DONE" } displayName: fail if any issues occurred + condition: ${{ parameters.condition }} diff --git a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml index fc703ec6918..d70af4ed3c8 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml @@ -7,6 +7,7 @@ parameters: xaSourcePath: $(System.DefaultWorkingDirectory) repositoryAlias: 'self' commit: '' + shouldFailOnIssue: true prepareSteps: [] jobs: @@ -59,3 +60,5 @@ jobs: xaSourcePath: ${{ parameters.xaSourcePath }} - template: fail-on-issue.yaml + paramters: + condition: ${{ parameters.shouldFailOnIssue }} diff --git a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml index d18f9898630..8b0b760e729 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml @@ -11,6 +11,7 @@ parameters: repositoryAlias: 'self' commit: '' usesCleanImages: true + shouldFailOnIssue: true prepareSteps: [] stages: @@ -47,7 +48,7 @@ stages: - task: DownloadPipelineArtifact@2 inputs: artifactName: $(TestAssembliesArtifactName) - downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) + downloadPath: ${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration) - template: start-stop-emulator.yaml parameters: @@ -55,7 +56,7 @@ stages: - template: run-sliced-nunit-tests.yaml parameters: - testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll + testAssembly: ${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll testFilter: cat != TimeZoneInfo & cat != Localization $(ExcludedNUnitCategories) testRunTitle: MSBuildDeviceIntegration On Device - macOS @@ -71,6 +72,8 @@ stages: xaSourcePath: ${{ parameters.xaSourcePath }} - template: fail-on-issue.yaml + paramters: + condition: ${{ parameters.shouldFailOnIssue }} - job: wear_tests displayName: macOS > Tests > WearOS @@ -106,7 +109,7 @@ stages: - task: DownloadPipelineArtifact@2 inputs: artifactName: $(TestAssembliesArtifactName) - downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) + downloadPath: ${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration) - template: start-stop-emulator.yaml parameters: @@ -120,7 +123,7 @@ stages: - template: run-sliced-nunit-tests.yaml parameters: testRunTitle: WearOS On Device - macOS - testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll + testAssembly: ${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll testFilter: cat = WearOS xaSourcePath: ${{ parameters.xaSourcePath }} @@ -142,3 +145,5 @@ stages: xaSourcePath: ${{ parameters.xaSourcePath }} - template: fail-on-issue.yaml + paramters: + condition: ${{ parameters.shouldFailOnIssue }} diff --git a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml index 549a8b4e6fe..3fa201992b1 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml @@ -8,6 +8,7 @@ parameters: xaSourcePath: $(System.DefaultWorkingDirectory) repositoryAlias: 'self' commit: '' + shouldFailOnIssue: true prepareSteps: [] stages: @@ -26,6 +27,7 @@ stages: xaSourcePath: ${{ parameters.xaSourcePath }} repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} + shouldFailOnIssue: ${{ parameters.shouldFailOnIssue }} prepareSteps: ${{ parameters.prepareSteps }} - template: run-msbuild-tests.yaml @@ -38,4 +40,5 @@ stages: xaSourcePath: ${{ parameters.xaSourcePath }} repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} + shouldFailOnIssue: ${{ parameters.shouldFailOnIssue }} prepareSteps: ${{ parameters.prepareSteps }} From 48609feae633bf9eddc50f12e6d824fb3198800a Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 7 Jun 2023 14:36:27 -0400 Subject: [PATCH 10/14] Fix typo --- build-tools/automation/yaml-templates/run-msbuild-tests.yaml | 2 +- .../yaml-templates/stage-msbuild-emulator-tests.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml index d70af4ed3c8..94e58aeda6b 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml @@ -60,5 +60,5 @@ jobs: xaSourcePath: ${{ parameters.xaSourcePath }} - template: fail-on-issue.yaml - paramters: + parameters: condition: ${{ parameters.shouldFailOnIssue }} diff --git a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml index 8b0b760e729..9c9e91a9f0e 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml @@ -72,7 +72,7 @@ stages: xaSourcePath: ${{ parameters.xaSourcePath }} - template: fail-on-issue.yaml - paramters: + parameters: condition: ${{ parameters.shouldFailOnIssue }} - job: wear_tests @@ -145,5 +145,5 @@ stages: xaSourcePath: ${{ parameters.xaSourcePath }} - template: fail-on-issue.yaml - paramters: + parameters: condition: ${{ parameters.shouldFailOnIssue }} From 34c062a13fda9dbfd02a1cf513b0fd29ea2ca623 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 7 Jun 2023 16:48:06 -0400 Subject: [PATCH 11/14] Do not use checkout path param --- .../automation/yaml-templates/setup-test-environment.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml index f836f6ee54f..4dc4af713f5 100644 --- a/build-tools/automation/yaml-templates/setup-test-environment.yaml +++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml @@ -24,8 +24,6 @@ steps: commit: ${{ parameters.commit }} clean: true submodules: recursive - ${{ if ne(parameters.xaSourcePath, variables['System.DefaultWorkingDirectory']) }}: - path: s/xamarin-android - ${{ if eq(parameters.updateVS, true) }}: - template: update-vs.yaml From 17ec9154b452b96aed17e8266504689014858527 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 7 Jun 2023 20:08:11 -0400 Subject: [PATCH 12/14] Clean up, add param for non fatal emulator launch --- build-tools/automation/azure-pipelines.yaml | 12 ------------ .../automation/yaml-templates/run-msbuild-tests.yaml | 2 -- .../yaml-templates/setup-test-environment.yaml | 2 -- .../yaml-templates/stage-msbuild-emulator-tests.yaml | 6 +++--- .../yaml-templates/stage-msbuild-tests.yaml | 3 --- .../yaml-templates/start-stop-emulator.yaml | 3 ++- build-tools/automation/yaml-templates/variables.yaml | 4 ++++ .../Utilities/DeviceTest.cs | 5 +++++ .../Tests/Xamarin.ProjectTools/XABuildPaths.cs | 3 +-- 9 files changed, 15 insertions(+), 25 deletions(-) diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 6596d11c800..0ca96a500ec 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -42,18 +42,6 @@ parameters: variables: - template: yaml-templates/variables.yaml - template: templates/common/vs-release-vars.yml@sdk-insertions - # Run all tests if: - # - User who queued the job requested it (They set XA.RunAllTests to true) - # - This is the master integration branch (Pipeline defaults XA.RunAllTests to true) - # - This is a non-fork branch with name containing "mono-" (for Mono bumps) -- name: IsMonoBranch - value: $[and(ne(variables['System.PullRequest.IsFork'], 'True'), or(contains(variables['Build.SourceBranchName'], 'mono-'), contains(variables['System.PullRequest.SourceBranch'], 'mono-')))] -- name: RunAllTests - value: $[or(eq(variables['XA.RunAllTests'], true), eq(variables['IsMonoBranch'], true))] -- name: IsRelOrTargetingRel - value: $[or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['System.PullRequest.TargetBranch'], 'release/'))] -- name: DotNetNUnitCategories - value: '& TestCategory != DotNetIgnore & TestCategory != HybridAOT & TestCategory != MkBundle & TestCategory != MonoSymbolicate & TestCategory != StaticProject & TestCategory != SystemApplication' - ${{ if eq(variables['Build.DefinitionName'], 'Xamarin.Android-Private') }}: - group: AzureDevOps-Artifact-Feeds-Pats - group: DotNet-MSRC-Storage diff --git a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml index 94e58aeda6b..9d391d2de82 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml @@ -8,7 +8,6 @@ parameters: repositoryAlias: 'self' commit: '' shouldFailOnIssue: true - prepareSteps: [] jobs: - job: ${{ parameters.jobName }} @@ -39,7 +38,6 @@ jobs: xaSourcePath: ${{ parameters.xaSourcePath }} repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} - prepareSteps: ${{ parameters.prepareSteps }} - task: DownloadPipelineArtifact@2 inputs: diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml index 4dc4af713f5..3d50467c960 100644 --- a/build-tools/automation/yaml-templates/setup-test-environment.yaml +++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml @@ -13,11 +13,9 @@ parameters: repositoryAlias: 'self' commit: '' xaprepareScenario: AndroidTestDependencies # Use 'EmulatorTestDependencies' for agents that need the emulator installed - prepareSteps: [] steps: -- ${{ parameters.prepareSteps }} - template: sdk-unified/steps/checkout/v1.yml@yaml-templates parameters: resource: ${{ parameters.repositoryAlias }} diff --git a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml index 9c9e91a9f0e..f8ad18cddce 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml @@ -12,7 +12,7 @@ parameters: commit: '' usesCleanImages: true shouldFailOnIssue: true - prepareSteps: [] + emulatorStartContinueOnError: false stages: - stage: ${{ parameters.stageName }} @@ -43,7 +43,6 @@ stages: repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} xaprepareScenario: EmulatorTestDependencies - prepareSteps: ${{ parameters.prepareSteps }} - task: DownloadPipelineArtifact@2 inputs: @@ -53,6 +52,7 @@ stages: - template: start-stop-emulator.yaml parameters: xaSourcePath: ${{ parameters.xaSourcePath }} + startContinueOnError: ${{ parameters.emulatorStartContinueOnError }} - template: run-sliced-nunit-tests.yaml parameters: @@ -104,7 +104,6 @@ stages: repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} xaprepareScenario: EmulatorTestDependencies - prepareSteps: ${{ parameters.prepareSteps }} - task: DownloadPipelineArtifact@2 inputs: @@ -119,6 +118,7 @@ stages: avdAbi: $(avdAbi) avdType: $(avdType) xaSourcePath: ${{ parameters.xaSourcePath }} + startContinueOnError: ${{ parameters.emulatorStartContinueOnError }} - template: run-sliced-nunit-tests.yaml parameters: diff --git a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml index 3fa201992b1..6c9eaf929d7 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml @@ -9,7 +9,6 @@ parameters: repositoryAlias: 'self' commit: '' shouldFailOnIssue: true - prepareSteps: [] stages: - stage: ${{ parameters.stageName }} @@ -28,7 +27,6 @@ stages: repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} shouldFailOnIssue: ${{ parameters.shouldFailOnIssue }} - prepareSteps: ${{ parameters.prepareSteps }} - template: run-msbuild-tests.yaml parameters: @@ -41,4 +39,3 @@ stages: repositoryAlias: ${{ parameters.repositoryAlias }} commit: ${{ parameters.commit }} shouldFailOnIssue: ${{ parameters.shouldFailOnIssue }} - prepareSteps: ${{ parameters.prepareSteps }} diff --git a/build-tools/automation/yaml-templates/start-stop-emulator.yaml b/build-tools/automation/yaml-templates/start-stop-emulator.yaml index afaa89cc660..7f6f2a1d3a3 100644 --- a/build-tools/automation/yaml-templates/start-stop-emulator.yaml +++ b/build-tools/automation/yaml-templates/start-stop-emulator.yaml @@ -7,13 +7,14 @@ parameters: avdType: # Device AVD, like 'android-wear', required if 'specificImage' is 'true' emulatorMSBuildArgs: # Extra args to pass to the emulator configuration like '-p:TestAvdExtraBootArgs=-writable-system', optional launchTimeoutMin: 20 # Minutes to wait for the emulator to start + startContinueOnError: false # If 'true', do not mark the step as failed if starting the emulator fails xaSourcePath: $(System.DefaultWorkingDirectory) # working directory steps: - ${{ if eq(parameters.command, 'start') }}: - task: DotNetCoreCLI@2 displayName: Start emulator - continueOnError: false + continueOnError: ${{ parameters.startContinueOnError }} inputs: projects: ${{ parameters.xaSourcePath }}/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Emulator.csproj ${{ if eq(parameters.specificImage, true) }}: diff --git a/build-tools/automation/yaml-templates/variables.yaml b/build-tools/automation/yaml-templates/variables.yaml index 26d33a0b4c1..b062fd9c134 100644 --- a/build-tools/automation/yaml-templates/variables.yaml +++ b/build-tools/automation/yaml-templates/variables.yaml @@ -43,6 +43,10 @@ variables: # Workaround: https://github.com/dotnet/linker/issues/3012 - name: DOTNET_gcServer value: 0 +- name: IsRelOrTargetingRel + value: $[or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['System.PullRequest.TargetBranch'], 'release/'))] +- name: DotNetNUnitCategories + value: '& TestCategory != DotNetIgnore & TestCategory != HybridAOT & TestCategory != MkBundle & TestCategory != MonoSymbolicate & TestCategory != StaticProject & TestCategory != SystemApplication' - name: DefaultTestSdkPlatforms # Comma-separated SDK Platform(s) to install on test agents (no spaces) value: 33,UpsideDownCake - name: ExcludedNUnitCategories diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs index 0e5d0ed3909..ed526ebb085 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Diagnostics; using System.IO; +using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; @@ -63,6 +64,10 @@ public void DeviceSetup () if (DeviceAbi.Contains (",")) { DeviceAbi = DeviceAbi.Split (',')[0]; } + + if (string.IsNullOrEmpty (DeviceAbi)) { + DeviceAbi = RuntimeInformation.OSArchitecture == Architecture.Arm64 ? "arm64-v8a" : "x86_64"; + } } } catch (Exception ex) { Console.Error.WriteLine ("Failed to determine whether there is Android target emulator or not: " + ex); diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs index b91f9559582..e2ebdf721ae 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/XABuildPaths.cs @@ -11,8 +11,7 @@ public class XABuildPaths public static string Configuration = Environment.GetEnvironmentVariable ("CONFIGURATION") ?? "Release"; #endif - // if in the megapipeline, we do know the root, else find it based on the assembly - public static string TopDirectory = GetTopDirRecursive (Environment.GetEnvironmentVariable ("MEGAPIPELINE_ANDROID_DIR") ?? Path.GetFullPath ( + public static string TopDirectory = GetTopDirRecursive (Path.GetFullPath ( Path.GetDirectoryName (new Uri (typeof (XamarinProject).Assembly.CodeBase).LocalPath))); public static readonly string PrefixDirectory = Path.Combine (TopDirectory, "bin", Configuration); From f022c7cb4f182107fc0d1624cc6cf34d6dbf0fb8 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 7 Jun 2023 20:14:10 -0400 Subject: [PATCH 13/14] Always ensure DeviceAbi is not null --- .../Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs index ed526ebb085..b09829a2b55 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs @@ -64,10 +64,6 @@ public void DeviceSetup () if (DeviceAbi.Contains (",")) { DeviceAbi = DeviceAbi.Split (',')[0]; } - - if (string.IsNullOrEmpty (DeviceAbi)) { - DeviceAbi = RuntimeInformation.OSArchitecture == Architecture.Arm64 ? "arm64-v8a" : "x86_64"; - } } } catch (Exception ex) { Console.Error.WriteLine ("Failed to determine whether there is Android target emulator or not: " + ex); @@ -75,6 +71,9 @@ public void DeviceSetup () SetAdbLogcatBufferSize (64); CreateGuestUser (GuestUserName); } + if (string.IsNullOrEmpty (DeviceAbi)) { + DeviceAbi = RuntimeInformation.OSArchitecture == Architecture.Arm64 ? "arm64-v8a" : "x86_64"; + } } [OneTimeTearDown] From 0d8102de2b848c0c40889a12cb01b96f1a67c0d6 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Thu, 8 Jun 2023 16:51:55 -0400 Subject: [PATCH 14/14] Apply feedback --- build-tools/automation/yaml-templates/fail-on-issue.yaml | 2 +- .../Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/build-tools/automation/yaml-templates/fail-on-issue.yaml b/build-tools/automation/yaml-templates/fail-on-issue.yaml index 2df5c567919..0aa33f1f32a 100644 --- a/build-tools/automation/yaml-templates/fail-on-issue.yaml +++ b/build-tools/automation/yaml-templates/fail-on-issue.yaml @@ -1,5 +1,5 @@ parameters: - condition: succeededOrFailed() + condition: succeeded() steps: - powershell: | diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs index b09829a2b55..0e5d0ed3909 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Diagnostics; using System.IO; -using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; @@ -71,9 +70,6 @@ public void DeviceSetup () SetAdbLogcatBufferSize (64); CreateGuestUser (GuestUserName); } - if (string.IsNullOrEmpty (DeviceAbi)) { - DeviceAbi = RuntimeInformation.OSArchitecture == Architecture.Arm64 ? "arm64-v8a" : "x86_64"; - } } [OneTimeTearDown]