Skip to content

Commit c6ce627

Browse files
dellis1972jonathanpeppers
authored andcommitted
[tests] InstallAndroidDependenciesTest can use platform-tools 34.0.0 (#7800)
We are seeing the `InstallAndroidDependenciesTest` test fail allot recently. Looking at the logs we see the following warning. warning : Dependency `platform-tools` should have been installed but could not be resolved. You can attempt to install it with: /Users/dean/Documents/Sandbox/Xamarin/WI1714603/bin/TestRelease/temp/InstallAndroidDependenciesTest/android-sdk/cmdline-tools/7.0/lib/sdkmanager-classpath.jar --install "platform-tools" As a result `platform-tools` is not installed. This causes the `ResolveSdks` task to ignore the test sdk directory because `adb` is missing. So lets update the `AndroidSdkPlatformToolsVersion ` to use one that does work.
1 parent 6637268 commit c6ce627

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidDependenciesTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ public void InstallAndroidDependenciesTest ()
3939
Assert.IsTrue (b.Build (proj, parameters: new string [] {
4040
"AcceptAndroidSDKLicenses=true",
4141
"AndroidManifestType=GoogleV2", // Need GoogleV2 so we can install API-32
42-
"AndroidSdkPlatformToolsVersion=33.0.3",
42+
"AndroidSdkPlatformToolsVersion=34.0.0",
4343
}), "InstallAndroidDependencies should have succeeded.");
4444
b.Target = defaultTarget;
4545
b.BuildLogFile = "build.log";
4646
Assert.IsTrue (b.Build (proj, true), "build should have succeeded.");
47-
Assert.IsTrue (b.LastBuildOutput.ContainsText ($"Output Property: _AndroidSdkDirectory={sdkPath}"), "_AndroidSdkDirectory was not set to new SDK path.");
48-
Assert.IsTrue (b.LastBuildOutput.ContainsText ($"JavaPlatformJarPath={sdkPath}"), "JavaPlatformJarPath did not contain new SDK path.");
47+
Assert.IsTrue (b.LastBuildOutput.ContainsText ($"Output Property: _AndroidSdkDirectory={sdkPath}"), $"_AndroidSdkDirectory was not set to new SDK path `{sdkPath}`.");
48+
Assert.IsTrue (b.LastBuildOutput.ContainsText ($"JavaPlatformJarPath={sdkPath}"), $"JavaPlatformJarPath did not contain new SDK path `{sdkPath}`.");
4949
}
5050
} finally {
5151
Environment.SetEnvironmentVariable ("TEST_ANDROID_SDK_PATH", old);

0 commit comments

Comments
 (0)