summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2018-03-26 14:42:44 -0700
committer Colin Cross <ccross@android.com> 2018-04-10 17:06:21 +0000
commitf19b9bb9819fbe36a05c31e193135a9b3b2e8388 (patch)
tree9de2ef5106c63448cd73283fb77926fe7be815ec /java/java_test.go
parent559795114dbb9c8ff3210745c4c78aaf163ceab8 (diff)
Use built SDK stubs
Now that the SDK stubs are built in Soong, undo the hack that uses the prebuilt stubs. Fix the linktype checks to treat the various stubs libraries as the correct type, since they can't be annotated with sdk_version. Bug: 70351683 Bug: 77285514 Test: m checkbuild Change-Id: I5e870c34dd0ebc8ae3f888ec627da590c846a76f
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go17
1 files changed, 6 insertions, 11 deletions
diff --git a/java/java_test.go b/java/java_test.go
index 6b730dae1..c790342a1 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -97,6 +97,7 @@ func testContext(config android.Config, bp string,
"android_stubs_current",
"android_system_stubs_current",
"android_test_stubs_current",
+ "core.current.stubs",
"kotlin-stdlib",
}
@@ -106,6 +107,7 @@ func testContext(config android.Config, bp string,
name: "%s",
srcs: ["a.java"],
no_standard_libs: true,
+ sdk_version: "core_current",
system_modules: "core-system-modules",
}
`, extra)
@@ -212,9 +214,6 @@ func moduleToPath(name string) string {
return name
case strings.HasSuffix(name, ".jar"):
return name
- case name == "android_stubs_current" || name == "android_system_stubs_current" ||
- name == "android_test_stubs_current":
- return filepath.Join(buildDir, ".intermediates", name, "android_common", "javac", name+".jar")
default:
return filepath.Join(buildDir, ".intermediates", name, "android_common", "turbine-combined", name+".jar")
}
@@ -346,17 +345,15 @@ var classpathTestcases = []struct {
name: "current",
properties: `sdk_version: "current",`,
- bootclasspath: []string{`""`},
+ bootclasspath: []string{"android_stubs_current"},
system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath
- classpath: []string{"prebuilts/sdk/current/android.jar"},
},
{
name: "system_current",
properties: `sdk_version: "system_current",`,
- bootclasspath: []string{`""`},
+ bootclasspath: []string{"android_system_stubs_current"},
system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath
- classpath: []string{"prebuilts/sdk/system_current/android.jar"},
},
{
@@ -370,17 +367,15 @@ var classpathTestcases = []struct {
name: "test_current",
properties: `sdk_version: "test_current",`,
- bootclasspath: []string{`""`},
+ bootclasspath: []string{"android_test_stubs_current"},
system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath
- classpath: []string{"prebuilts/sdk/test_current/android.jar"},
},
{
name: "core_current",
properties: `sdk_version: "core_current",`,
- bootclasspath: []string{`""`},
+ bootclasspath: []string{"core.current.stubs"},
system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath
- classpath: []string{"prebuilts/sdk/current/core.jar"},
},
{