Lorenzo Colitti ddeb269ca0 Fix CtsNetTestCasesLatestSdk in AOSP.
This test suite is broken in AOSP due to a number of tests that
depend on S APIs. We attempted to prevent those tests running on
R builds with:

@IgnoreUpTo(Build.VERSION_CODES.R)

but this is not sufficient for them to pass when the test is
compiled against the R SDK (e.g., in CtsNetTestCasesLatestSdk).
This is because when compiling against the R SDK, the test uses
the API 30 shims, which throw UnsupportedApiLevelException even
though the method actually exists on device.

Fix this using:

    assumeTrue(shouldTestSApis());

This is not great, but at least it unbreaks the tests for now.

Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.ConnectivityManagerTest
Change-Id: Ifee0aea5afef6bd4bc762a4b1f25fc05e562d49a
2021-04-15 13:30:02 +09:00
2021-01-19 18:31:52 -08:00
Description
android_packages_modules_Connectivity
189 MiB
Languages
Java 81.4%
Kotlin 7.7%
AIDL 4.5%
C++ 4.5%
C 1.7%
Other 0.1%