Run TestClasspath test cases with Always_use_prebuilt_sdks=true/false

Previously, the TestClasspath test cases were only run with the default
setting of Always_use_prebuilt_sdks=false. That meant that some of the
code under test that depended on the setting of that variable was not
tested properly.

This change runs the test cases m with Always_use_prebuilt_sdks=true as
well. Those test cases whose behavior depends on the setting of that
variable are split into two separate test cases, each of which only
runs with the appropriate setting of that variable. All other test
cases are run for both settings of the variable.

That revealed a slight issue with the test setup (a missing
prebuilts/sdk/public/core/android.jar file) which broke the
core_current test when run with Always_use_prebuilt_sdks=true which has
also been fixed.

Bug: 204189791
Test: m nothing
Change-Id: If2ea3fde40c7573262e93691af0b5a57e4d54469
This commit is contained in:
Paul Duffin
2021-10-28 18:16:14 +01:00
parent 0b3b36a402
commit 132c3e61c0
2 changed files with 116 additions and 4 deletions

View File

@@ -181,6 +181,9 @@ func prebuiltApisFilesForLibs(apiLevels []string, sdkLibs []string) map[string][
}
}
}
if level == "current" {
fs["prebuilts/sdk/current/core/android.jar"] = nil
}
fs[fmt.Sprintf("prebuilts/sdk/%s/public/framework.aidl", level)] = nil
}
return fs