From 132c3e61c0357bf0ef438107b2896e55841bbca2 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 28 Oct 2021 18:16:14 +0100 Subject: 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 --- java/testing.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'java/testing.go') diff --git a/java/testing.go b/java/testing.go index 99d55a054..0a6a4fabb 100644 --- a/java/testing.go +++ b/java/testing.go @@ -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 -- cgit v1.2.3-59-g8ed1b