diff --git a/.gdn/CredScanSuppressions.json b/.gdn/CredScanSuppressions.json new file mode 100644 index 00000000000..e53c619ae4a --- /dev/null +++ b/.gdn/CredScanSuppressions.json @@ -0,0 +1,29 @@ +{ + "Suppressions": [ + { + "Issue": "CSCAN-GENERAL0020", + "Justification": "test.keystore is used for testing purposes only and does not contain sensitive information.", + "FilePath": "src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/test.keystore" + }, + { + "Issue": "CSCAN-GENERAL0060", + "Justification": "False positive detected in external/android-api-docs/docs/xml/Javax.Security.Auth.Callback/PasswordCallback.xml", + "FilePath": "external/android-api-docs/docs/xml/Javax.Security.Auth.Callback/PasswordCallback.xml" + }, + { + "Issue": "CSCAN-GENERAL0060", + "Justification": "False positive detected in external/android-api-docs/docs/xml/Javax.Crypto/ISecretKey.xml", + "FilePath": "external/android-api-docs/docs/xml/Javax.Crypto/ISecretKey.xml" + }, + { + "Issue": "CSCAN-GENERAL0030", + "Justification": "False positive detected in external/android-api-docs/docs/xml/Android.Service.Autofill/FillEventHistory+Event.xml", + "FilePath": "external/android-api-docs/docs/xml/Android.Service.Autofill/FillEventHistory+Event.xml" + }, + { + "Issue": "CSCAN-GENERAL0060", + "Justification": "False positive detected in external/android-api-docs/docs/xml/Android.Service.Autofill/FillEventHistory+Event.xml", + "FilePath": "external/android-api-docs/docs/xml/Android.Service.Autofill/FillEventHistory+Event.xml" + } + ] +} diff --git a/build-tools/automation/azure-pipelines-nightly.yaml b/build-tools/automation/azure-pipelines-nightly.yaml index 9b809bab272..5ac9e262974 100644 --- a/build-tools/automation/azure-pipelines-nightly.yaml +++ b/build-tools/automation/azure-pipelines-nightly.yaml @@ -126,7 +126,7 @@ stages: - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: - project: Xamarin.Android.sln + project: android/Xamarin.Android.sln arguments: -t:PrepareJavaInterop -c $(XA.Build.Configuration) -m:1 -v:n displayName: prepare java.interop $(XA.Build.Configuration) continueOnError: false diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 63017cdb458..b6734940cbd 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -28,6 +28,10 @@ resources: name: dotnet/maui ref: refs/heads/net10.0 endpoint: xamarin + - repository: android-tools + type: github + name: dotnet/android-tools + endpoint: xamarin parameters: - name: pushXAPackagesToMaestro @@ -64,11 +68,19 @@ extends: ${{ if eq('${{ parameters.Skip1ESComplianceTasks }}', 'true') }}: enableAllTools: false binskim: + enabled: true scanOutputDirectoryOnly: true + analyzeTargetGlob: '$(System.DefaultWorkingDirectory)\bin\$(XA.Build.Configuration)\dotnet\packs\Microsoft.Android*\**.dll;$(System.DefaultWorkingDirectory)\bin\$(XA.Build.Configuration)\dotnet\packs\Microsoft.Android*\**.exe' codeql: compiled: enabled: false justificationForDisabling: CodeQL runs against the nightly build + credscan: + enabled: true + ${{ if startsWith(variables['System.JobName'], 'SDLSources') }}: + suppressionsFile: .gdn/CredScanSuppressions.json + ${{ else }}: + suppressionsFile: $(System.SourcesDirectory)/android/.gdn/CredScanSuppressions.json policheck: enabled: false justification: Built in task does not support multi-language scanning @@ -80,14 +92,22 @@ extends: image: $(WindowsPoolImage1ESPT) os: windows sourceRepositoriesToScan: - include: - - ${{ if ne(variables['System.PullRequest.IsFork'], 'True') }}: - - repository: android-platform-support exclude: - - repository: yaml-templates + - repository: android-platform-support + - repository: android-tools - repository: maui + - repository: yaml-templates suppression: - suppressionFile: $(Build.SourcesDirectory)\.gdn\.gdnsuppress + ${{ if startsWith(variables['System.JobName'], 'SDLSources') }}: + suppressionFile: .gdn/.gdnsuppress + ${{ else }}: + suppressionFile: $(Build.SourcesDirectory)/android/.gdn/.gdnsuppress + tsa: + enabled: true + ${{ if startsWith(variables['System.JobName'], 'SDLSources') }}: + configFile: .gdn/tsaoptions-v2.json + ${{ else }}: + configFile: $(Build.SourcesDirectory)/android/.gdn/tsaoptions-v2.json settings: skipBuildTagsForGitHubPullRequests: true stages: diff --git a/build-tools/automation/yaml-templates/apk-instrumentation.yaml b/build-tools/automation/yaml-templates/apk-instrumentation.yaml index 81468c6c681..a497cd0bc72 100644 --- a/build-tools/automation/yaml-templates/apk-instrumentation.yaml +++ b/build-tools/automation/yaml-templates/apk-instrumentation.yaml @@ -1,7 +1,7 @@ parameters: buildConfiguration: $(XA.Build.Configuration) configuration: $(XA.Build.Configuration) - xaSourcePath: $(System.DefaultWorkingDirectory) + xaSourcePath: $(System.DefaultWorkingDirectory)/android testName: "" project: "" testResultsFiles: "" diff --git a/build-tools/automation/yaml-templates/build-linux.yaml b/build-tools/automation/yaml-templates/build-linux.yaml index 08999e2f033..fa97557717f 100644 --- a/build-tools/automation/yaml-templates/build-linux.yaml +++ b/build-tools/automation/yaml-templates/build-linux.yaml @@ -55,7 +55,7 @@ stages: # Always checkout a second resource to ensure we are using multi-repo checkout behavior # https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path - - checkout: maui + - checkout: android-tools - template: /build-tools/automation/yaml-templates/setup-jdk-variables.yaml parameters: diff --git a/build-tools/automation/yaml-templates/build-windows.yaml b/build-tools/automation/yaml-templates/build-windows.yaml index 95db7e69485..6d219697952 100644 --- a/build-tools/automation/yaml-templates/build-windows.yaml +++ b/build-tools/automation/yaml-templates/build-windows.yaml @@ -39,6 +39,10 @@ stages: - template: /build-tools/automation/yaml-templates/clean.yaml + # Always checkout a second resource to ensure we are using multi-repo checkout behavior + # https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path + - checkout: android-tools + - template: /build-tools/automation/yaml-templates/setup-jdk-variables.yaml parameters: useAgentJdkPath: false @@ -51,25 +55,25 @@ stages: - task: DotNetCoreCLI@2 displayName: Prepare Solution inputs: - projects: Xamarin.Android.sln - arguments: '-c $(XA.Build.Configuration) -t:Prepare --no-restore -p:AutoProvision=true -bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\dotnet-build-prepare.binlog' + projects: android/Xamarin.Android.sln + arguments: '-c $(XA.Build.Configuration) -t:Prepare --no-restore -p:AutoProvision=true -bl:$(System.DefaultWorkingDirectory)\android\bin\Build$(XA.Build.Configuration)\dotnet-build-prepare.binlog' # Build Xamarin.Android and configure local workloads to test improved local build loop - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: - project: Xamarin.Android.sln + project: android/Xamarin.Android.sln arguments: >- -t:BuildDotNet -c $(XA.Build.Configuration) -v:n - -bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\dotnet-build.binlog + -bl:$(System.DefaultWorkingDirectory)\android\bin\Build$(XA.Build.Configuration)\dotnet-build.binlog displayName: Build Solution continueOnError: false - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: - project: build-tools/create-packs/Microsoft.Android.Sdk.proj + project: android/build-tools/create-packs/Microsoft.Android.Sdk.proj arguments: >- -t:ConfigureLocalWorkload -c $(XA.Build.Configuration) -v:n -p:RunningOnCI=false - -bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\local-workload.binlog + -bl:$(System.DefaultWorkingDirectory)\android\bin\Build$(XA.Build.Configuration)\local-workload.binlog displayName: Run ConfigureLocalWorkload target continueOnError: false @@ -81,13 +85,13 @@ stages: - template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml parameters: testRunTitle: Smoke MSBuild Tests - Windows Dotnet Build - testAssembly: $(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\$(DotNetStableTargetFramework)\Xamarin.Android.Build.Tests.dll + testAssembly: $(System.DefaultWorkingDirectory)\android\bin\Test$(XA.Build.Configuration)\$(DotNetStableTargetFramework)\Xamarin.Android.Build.Tests.dll dotNetTestExtraArgs: --filter "TestCategory = SmokeTests" - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml@self parameters: command: test - project: src/Microsoft.Android.Sdk.Analysis/Tests/Microsoft.Android.Sdk.Analysis.Tests.csproj + project: android/src/Microsoft.Android.Sdk.Analysis/Tests/Microsoft.Android.Sdk.Analysis.Tests.csproj arguments: -c $(XA.Build.Configuration) displayName: Test Microsoft.Android.Sdk.Analysis $(XA.Build.Configuration) continueOnError: false @@ -95,22 +99,22 @@ stages: - task: BatchScript@1 displayName: Test dotnet-local.cmd - create template inputs: - filename: dotnet-local.cmd + filename: android/dotnet-local.cmd arguments: new android -o $(Build.StagingDirectory)/LocalWorkloadTest - task: BatchScript@1 displayName: Test dotnet-local.cmd - build template inputs: - filename: dotnet-local.cmd + filename: android/dotnet-local.cmd arguments: build -v:n $(Build.StagingDirectory)/LocalWorkloadTest # Pack .nupkgs and extract workload packs to dotnet preview test directory - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: - project: Xamarin.Android.sln + project: android/Xamarin.Android.sln arguments: >- -t:PackDotNet -c $(XA.Build.Configuration) -v:n - -bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\dotnet-pack.binlog + -bl:$(System.DefaultWorkingDirectory)\android\bin\Build$(XA.Build.Configuration)\dotnet-pack.binlog displayName: Test PackDotNet - template: /build-tools/automation/yaml-templates/upload-results.yaml diff --git a/build-tools/automation/yaml-templates/commercial-build.yaml b/build-tools/automation/yaml-templates/commercial-build.yaml index 7fb29cad5d7..b5bf643b22b 100644 --- a/build-tools/automation/yaml-templates/commercial-build.yaml +++ b/build-tools/automation/yaml-templates/commercial-build.yaml @@ -24,7 +24,7 @@ steps: # Always checkout a second resource to ensure we are using multi-repo checkout behavior # https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path -- checkout: maui +- checkout: android-tools - ${{ if ne(variables['System.PullRequest.IsFork'], 'True') }}: - checkout: android-platform-support diff --git a/build-tools/automation/yaml-templates/run-dotnet-preview.yaml b/build-tools/automation/yaml-templates/run-dotnet-preview.yaml index 9253ca1dfa9..2b1bce3975b 100644 --- a/build-tools/automation/yaml-templates/run-dotnet-preview.yaml +++ b/build-tools/automation/yaml-templates/run-dotnet-preview.yaml @@ -1,6 +1,6 @@ parameters: configuration: $(XA.Build.Configuration) - xaSourcePath: $(System.DefaultWorkingDirectory) + xaSourcePath: $(System.DefaultWorkingDirectory)/android command: build project: '' arguments: '' diff --git a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml index 7853353e798..4fa4ac71e3f 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml @@ -4,7 +4,7 @@ parameters: jobDisplayName: '' # Display name of the job agentCount: 1 # Number of build agents to run in parallel testFilter: '' # Filter used to select tests (NUnit test selection language, not dotnet test filter language) - xaSourcePath: $(System.DefaultWorkingDirectory) + xaSourcePath: $(System.DefaultWorkingDirectory)/android repositoryAlias: 'self' commit: '' shouldFailOnIssue: true 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 7451c87fba0..eb88101ec8b 100644 --- a/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml +++ b/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml @@ -2,7 +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) + xaSourcePath: $(System.DefaultWorkingDirectory)/android retryFailedTests: true # Retry failed tests once steps: diff --git a/build-tools/automation/yaml-templates/run-xaprepare.yaml b/build-tools/automation/yaml-templates/run-xaprepare.yaml index 209aab8219d..83c66d84024 100644 --- a/build-tools/automation/yaml-templates/run-xaprepare.yaml +++ b/build-tools/automation/yaml-templates/run-xaprepare.yaml @@ -2,7 +2,7 @@ parameters: displayName: run xaprepare name: configuration: $(XA.Build.Configuration) - xaSourcePath: $(System.DefaultWorkingDirectory) + xaSourcePath: $(System.DefaultWorkingDirectory)/android condition: succeeded() arguments: diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml index 19a98a86fad..4965ed7a4a2 100644 --- a/build-tools/automation/yaml-templates/setup-test-environment.yaml +++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml @@ -1,6 +1,6 @@ parameters: configuration: $(XA.Build.Configuration) - xaSourcePath: $(System.DefaultWorkingDirectory) + xaSourcePath: $(System.DefaultWorkingDirectory)/android jdkMajorVersion: $(DefaultJavaSdkMajorVersion) useAgentJdkPath: true remove_dotnet: false @@ -22,6 +22,10 @@ steps: clean: true submodules: recursive +# Always checkout a second resource to ensure we are using multi-repo checkout behavior +# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path +- checkout: android-tools + - template: /build-tools/automation/yaml-templates/setup-jdk-variables.yaml parameters: jdkMajorVersion: ${{ parameters.jdkMajorVersion }} 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 957e3f239fb..cb1f8a2340b 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml @@ -7,7 +7,7 @@ parameters: agent_count: 12 stageCondition: succeeded() stagePrefix: '' - xaSourcePath: $(System.DefaultWorkingDirectory) + xaSourcePath: $(System.DefaultWorkingDirectory)/android repositoryAlias: 'self' commit: '' usesCleanImages: true @@ -52,7 +52,7 @@ stages: # Currently needed for samples/NativeAOT - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml@self parameters: - project: Xamarin.Android.sln + project: ${{ parameters.xaSourcePath }}/Xamarin.Android.sln arguments: -t:PrepareJavaInterop -c $(XA.Build.Configuration) --no-restore displayName: prepare java.interop $(XA.Build.Configuration) continueOnError: false @@ -186,7 +186,7 @@ stages: - template: /build-tools/automation/yaml-templates/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: name == DebuggingTest testRunTitle: DebuggingTest tests on Windows diff --git a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml index 54fb9005e16..cc68998cff7 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml @@ -5,7 +5,7 @@ parameters: stageCondition: succeeded() dependsOn: mac_build stagePrefix: '' - xaSourcePath: $(System.DefaultWorkingDirectory) + xaSourcePath: $(System.DefaultWorkingDirectory)/android repositoryAlias: 'self' commit: '' shouldFailOnIssue: true diff --git a/build-tools/automation/yaml-templates/stage-package-tests.yaml b/build-tools/automation/yaml-templates/stage-package-tests.yaml index 1e5328ac60c..a4efea1f7f5 100644 --- a/build-tools/automation/yaml-templates/stage-package-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-package-tests.yaml @@ -26,25 +26,25 @@ stages: - task: DownloadPipelineArtifact@2 inputs: artifactName: $(TestAssembliesArtifactName) - downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) + downloadPath: $(System.DefaultWorkingDirectory)/android/bin/Test$(XA.Build.Configuration) # Set up dependencies to run tests in both debug and release configurations - task: DotNetCoreCLI@2 displayName: build Xamarin.Android.Tools.BootstrapTasks.csproj inputs: - projects: $(System.DefaultWorkingDirectory)/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj - arguments: -c Debug -bl:$(System.DefaultWorkingDirectory)/bin/TestDebug/BootstrapTasks.binlog + projects: $(System.DefaultWorkingDirectory)/android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj + arguments: -c Debug -bl:$(System.DefaultWorkingDirectory)/android/bin/TestDebug/BootstrapTasks.binlog - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: - project: Xamarin.Android.sln + project: android/Xamarin.Android.sln arguments: -t:PrepareJavaInterop -c Debug --no-restore displayName: prepare java.interop Debug continueOnError: false - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: - project: Xamarin.Android.sln + project: android/Xamarin.Android.sln arguments: -t:PrepareJavaInterop -c $(XA.Build.Configuration) --no-restore displayName: prepare java.interop $(XA.Build.Configuration) continueOnError: false @@ -52,7 +52,7 @@ stages: - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: command: test - project: src/Microsoft.Android.Sdk.Analysis/Tests/Microsoft.Android.Sdk.Analysis.Tests.csproj + project: android/src/Microsoft.Android.Sdk.Analysis/Tests/Microsoft.Android.Sdk.Analysis.Tests.csproj arguments: -c $(XA.Build.Configuration) displayName: Test Microsoft.Android.Sdk.Analysis $(XA.Build.Configuration) continueOnError: false @@ -131,25 +131,25 @@ stages: - task: DownloadPipelineArtifact@2 inputs: artifactName: $(TestAssembliesArtifactName) - downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) + downloadPath: $(System.DefaultWorkingDirectory)/android/bin/Test$(XA.Build.Configuration) # Set up dependencies to run tests in both debug and release configurations - task: DotNetCoreCLI@2 displayName: build Xamarin.Android.Tools.BootstrapTasks.csproj inputs: - projects: $(System.DefaultWorkingDirectory)/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj - arguments: -c Debug -bl:$(System.DefaultWorkingDirectory)/bin/TestDebug/BootstrapTasks.binlog + projects: $(System.DefaultWorkingDirectory)/android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj + arguments: -c Debug -bl:$(System.DefaultWorkingDirectory)/android/bin/TestDebug/BootstrapTasks.binlog - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: - project: Xamarin.Android.sln + project: android/Xamarin.Android.sln arguments: -t:PrepareJavaInterop -c Debug --no-restore displayName: prepare java.interop Debug continueOnError: false - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: - project: Xamarin.Android.sln + project: android/Xamarin.Android.sln arguments: -t:PrepareJavaInterop -c $(XA.Build.Configuration) --no-restore displayName: prepare java.interop $(XA.Build.Configuration) continueOnError: false @@ -157,7 +157,7 @@ stages: - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: command: test - project: src/Microsoft.Android.Sdk.Analysis/Tests/Microsoft.Android.Sdk.Analysis.Tests.csproj + project: android/src/Microsoft.Android.Sdk.Analysis/Tests/Microsoft.Android.Sdk.Analysis.Tests.csproj arguments: -c $(XA.Build.Configuration) displayName: Test Microsoft.Android.Sdk.Analysis $(XA.Build.Configuration) continueOnError: false @@ -226,7 +226,7 @@ stages: - template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml parameters: testRunTitle: Xamarin.Android.Tools.Aidl-Tests - macOS - testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Tools.Aidl-Tests.dll + testAssembly: $(System.DefaultWorkingDirectory)/android/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Tools.Aidl-Tests.dll - task: ShellScript@2 displayName: Test dotnet-local.sh diff --git a/build-tools/automation/yaml-templates/start-stop-emulator.yaml b/build-tools/automation/yaml-templates/start-stop-emulator.yaml index 5d8f229f4e5..f7939ae39fc 100644 --- a/build-tools/automation/yaml-templates/start-stop-emulator.yaml +++ b/build-tools/automation/yaml-templates/start-stop-emulator.yaml @@ -9,7 +9,7 @@ parameters: launchTimeoutMin: 20 # Minutes to wait for the emulator to start taskTimeoutInMinutes: 30 # Minutes to wait for the task to finish startContinueOnError: false # If 'true', do not mark the step as failed if starting the emulator fails - xaSourcePath: $(System.DefaultWorkingDirectory) # working directory + xaSourcePath: $(System.DefaultWorkingDirectory)/android # working directory steps: - ${{ if eq(parameters.command, 'start') }}: @@ -29,13 +29,13 @@ steps: -p:TestAvdType=${{ parameters.avdType }} ${{ parameters.emulatorMSBuildArgs }} -p:AvdLaunchTimeoutMinutes=${{ parameters.launchTimeoutMin }} - -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/install-emulator-${{ parameters.avdApiLevel }}.binlog + -bl:${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration)/install-emulator-${{ parameters.avdApiLevel }}.binlog ${{ else }}: arguments: >- -c $(XA.Build.Configuration) -t:AcquireAndroidTarget ${{ parameters.emulatorMSBuildArgs }} -p:AvdLaunchTimeoutMinutes=${{ parameters.launchTimeoutMin }} - -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/start-emulator.binlog + -bl:${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration)/start-emulator.binlog - ${{ if eq(parameters.command, 'stop') }}: - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml @@ -54,9 +54,9 @@ steps: -p:TestAvdAbi=${{ parameters.avdAbi }} -p:TestAvdType=${{ parameters.avdType }} -p:AvdLaunchTimeoutMinutes=${{ parameters.launchTimeoutMin }} - -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog + -bl:${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog ${{ else }}: arguments: >- -c $(XA.Build.Configuration) -t:"AcquireAndroidTarget,ReleaseAndroidTarget" -p:AvdLaunchTimeoutMinutes=${{ parameters.launchTimeoutMin }} - -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog + -bl:${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog diff --git a/build-tools/automation/yaml-templates/upload-results.yaml b/build-tools/automation/yaml-templates/upload-results.yaml index 24ebe8007d6..4c158d4818d 100644 --- a/build-tools/automation/yaml-templates/upload-results.yaml +++ b/build-tools/automation/yaml-templates/upload-results.yaml @@ -1,5 +1,5 @@ parameters: - xaSourcePath: $(System.DefaultWorkingDirectory) + xaSourcePath: $(System.DefaultWorkingDirectory)/android configuration: $(XA.Build.Configuration) artifactName: results includeBuildResults: false