Skip to content

Commit

Permalink
[build] Use xaprepare to provision Android tools
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcollins committed Jun 10, 2019
1 parent 0e489de commit 88bbd48
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
15 changes: 11 additions & 4 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,18 @@ stages:

- template: yaml-templates/run-installer.yaml

# HACK - Provision Emulator
- task: MSBuild@1
displayName: build xaprepare
inputs:
solution: build-tools/xaprepare/xaprepare.sln
configuration: $(XA.Build.Configuration)
msbuildArguments: /t:Restore,Build

- script: |
make prepare CONFIGURATION=$(ApkTestConfiguration) V=1 MSBUILD=msbuild MSBUILD_ARGS="$(AutoProvisionArgs)"
git clean -xfd
displayName: (hack) make prepare - provision emulator
mono build-tools/xaprepare/xaprepare/bin/$(XA.Build.Configuration)/xaprepare.exe --s=UpdateMono --auto-provision=yes --auto-provision-uses-sudo=yes --no-emoji --run-mode=CI
mono build-tools/xaprepare/xaprepare/bin/$(XA.Build.Configuration)/xaprepare.exe --s=Required --auto-provision=yes --auto-provision-uses-sudo=yes --no-emoji --run-mode=CI
mono build-tools/xaprepare/xaprepare/bin/$(XA.Build.Configuration)/xaprepare.exe --s=AndroidToolchain --no-emoji --run-mode=CI
displayName: provision dependencies
- task: NuGetCommand@2
displayName: nuget restore Xamarin.Android.Tools.sln
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parameters:
testName: []
project: []
testResultsFiles: []
extraBuildArgs: []
extraBuildArgs: ""
testResultsFormat: NUnit
packageType: Apk

Expand Down
2 changes: 1 addition & 1 deletion build-tools/scripts/TestApks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
/>
</Target>
<Target Name="RenameApkTestCases"
Condition=" '@(TestApk)' != '' ">
Condition=" '@(TestApk)' != '' Or '@(TestAab)' != '' ">
<RenameTestCases
Condition=" '%(TestApkInstrumentation.ResultsPath)' != '' "
Configuration="$(Configuration)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public override bool Execute ()
} else {
if (line.Contains ($"Process {ApplicationPackageName} (pid {PID}) has died")) {
Log.LogError ("Application crash detected. Could not collect performance data.");
reader.Close ();
return false;
}

Expand Down Expand Up @@ -99,11 +98,8 @@ public override bool Execute ()
WriteResults ();
} else {
Log.LogError ("Application start wasn't detected. Could not collect performance data.");
reader.Close ();
return false;
}

reader.Close ();
}

return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Xamarin.Forms.Performance.Integration.Droid.projitems" />
<Import Project="..\..\..\build-tools\scripts\TestApks.targets" />
<Import Project="..\..\..\build-tools\scripts\JavaInteropDllConfigs.targets" />
<Import Project="$(XamarinAndroidSourcePath)build-tools\scripts\TestApks.targets" />
<Import Project="$(XamarinAndroidSourcePath)build-tools\scripts\JavaInteropDllConfigs.targets" />
<Target Name="EnsureJavaInteropDllConfigs"
Condition="Exists ('$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll')"
BeforeTargets="_GenerateJniMarshalMethods"
Expand Down

0 comments on commit 88bbd48

Please sign in to comment.