Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] InstallAndroidDependenciesTest can use platform-tools 34.0.1 #7873

Conversation

jonpryor
Copy link
Member

Context: bec42ef
Context: 9752257
Context: …
Context: https://dl-ssl.google.com/android/repository/repository2-3.xml

Whenever Google updates their repository2-3.xml, there is a chance that our AndroidDependenciesTests.InstallAndroidDependenciesTest() unit test will fail, as repository2-3.xml containsn only one platform-tools package version, and when that changes, out test breaks.

Tracking down the cause of this breakage is annoying, usually because when this happens we've forgotten that platform-tools package version changes are the primary reason InstallAndroidDependencies() fails. 😅

Update AndroidDependenciesTests.InstallAndroidDependenciesTest() to set $(AndroidSdkPlatformToolsVersion)=34.0.1, fixing the test, and also update the test so that when the wrong
$(_AndroidSdkDirectory) value is found, we read the current version of the platform-tools package from repository2-3.xml and include that information in our assertion message.

Context: bec42ef
Context: 9752257
Context: …
Context: https://dl-ssl.google.com/android/repository/repository2-3.xml

Whenever Google updates their `repository2-3.xml`, there is a chance
that our `AndroidDependenciesTests.InstallAndroidDependenciesTest()`
unit test will fail, as `repository2-3.xml` containsn *only one*
platform-tools package version, and when that changes, out test breaks.

Tracking down the cause of this breakage is annoying, usually because
when this happens we've forgotten that platform-tools package version
changes are the primary reason `InstallAndroidDependencies()` fails. 😅

Update `AndroidDependenciesTests.InstallAndroidDependenciesTest()`
to set `$(AndroidSdkPlatformToolsVersion)`=34.0.1, fixing the test,
*and also* update the test so that when the wrong
`$(_AndroidSdkDirectory)` value is found, we read the *current version*
of the platform-tools package from `repository2-3.xml` and include
that information in our assertion message.
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me if it fixes this test on CI. 👍

}
}
catch (Exception e) {
// ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe still TestContext.WriteLine(e)?

@jonpryor jonpryor merged commit ada5914 into dotnet:main Mar 11, 2023
jonathanpeppers pushed a commit that referenced this pull request Mar 11, 2023
…#7873)

Context: bec42ef
Context: 9752257
Context: …
Context: https://dl-ssl.google.com/android/repository/repository2-3.xml

Whenever Google updates their `repository2-3.xml`, there is a chance
that our `AndroidDependenciesTests.InstallAndroidDependenciesTest()`
unit test will fail, as `repository2-3.xml` containsn *only one*
platform-tools package version, and when that changes, out test breaks.

Tracking down the cause of this breakage is annoying, usually because
when this happens we've forgotten that platform-tools package version
changes are the primary reason `InstallAndroidDependencies()` fails. 😅

Update `AndroidDependenciesTests.InstallAndroidDependenciesTest()`
to set `$(AndroidSdkPlatformToolsVersion)`=34.0.1, fixing the test,
*and also* update the test so that when the wrong
`$(_AndroidSdkDirectory)` value is found, we read the *current version*
of the platform-tools package from `repository2-3.xml` and include
that information in our assertion message.
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 13, 2023
* main:
  [tests] `InstallAndroidDependenciesTest` uses `platform-tools` 34.0.1 (dotnet#7873)
  [ci] Parallelize and reduce overhead of MSBuild test stage. (dotnet#7850)
  [Xamarin.Android.Build.Tasks] Remove MAM targets from CoreResolve (dotnet#7868)
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 13, 2023
* main:
  [tests] `InstallAndroidDependenciesTest` uses `platform-tools` 34.0.1 (dotnet#7873)
  [ci] Parallelize and reduce overhead of MSBuild test stage. (dotnet#7850)
  [Xamarin.Android.Build.Tasks] Remove MAM targets from CoreResolve (dotnet#7868)
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 13, 2023
* main:
  [tests] `InstallAndroidDependenciesTest` uses `platform-tools` 34.0.1 (dotnet#7873)
  [ci] Parallelize and reduce overhead of MSBuild test stage. (dotnet#7850)
  [Xamarin.Android.Build.Tasks] Remove MAM targets from CoreResolve (dotnet#7868)
jonathanpeppers pushed a commit that referenced this pull request Mar 20, 2023
…#7873)

Context: bec42ef
Context: 9752257
Context: …
Context: https://dl-ssl.google.com/android/repository/repository2-3.xml

Whenever Google updates their `repository2-3.xml`, there is a chance
that our `AndroidDependenciesTests.InstallAndroidDependenciesTest()`
unit test will fail, as `repository2-3.xml` containsn *only one*
platform-tools package version, and when that changes, out test breaks.

Tracking down the cause of this breakage is annoying, usually because
when this happens we've forgotten that platform-tools package version
changes are the primary reason `InstallAndroidDependencies()` fails. 😅

Update `AndroidDependenciesTests.InstallAndroidDependenciesTest()`
to set `$(AndroidSdkPlatformToolsVersion)`=34.0.1, fixing the test,
*and also* update the test so that when the wrong
`$(_AndroidSdkDirectory)` value is found, we read the *current version*
of the platform-tools package from `repository2-3.xml` and include
that information in our assertion message.
jonpryor added a commit that referenced this pull request Apr 21, 2023
…#7873)

Context: bec42ef
Context: 9752257
Context: …
Context: https://dl-ssl.google.com/android/repository/repository2-3.xml

Whenever Google updates their `repository2-3.xml`, there is a chance
that our `AndroidDependenciesTests.InstallAndroidDependenciesTest()`
unit test will fail, as `repository2-3.xml` containsn *only one*
platform-tools package version, and when that changes, out test breaks.

Tracking down the cause of this breakage is annoying, usually because
when this happens we've forgotten that platform-tools package version
changes are the primary reason `InstallAndroidDependencies()` fails. 😅

Update `AndroidDependenciesTests.InstallAndroidDependenciesTest()`
to set `$(AndroidSdkPlatformToolsVersion)`=34.0.1, fixing the test,
*and also* update the test so that when the wrong
`$(_AndroidSdkDirectory)` value is found, we read the *current version*
of the platform-tools package from `repository2-3.xml` and include
that information in our assertion message.
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants