Fix problems with TestPrebuiltExportDexImplementationJars
Previously, the test mistakenly configured BootJars which meant the
test was testing not just the propagation of paths to files retrieved
from the prebuilt apex to the java_import module but also the process
of finding appropriate boot jars.
It also set "prefer: true" on the prebuilt_apex instead of the
java_import when checking to make sure that it still found the correct
module when both prebuilt and source were available and the prebuilt
was preferred.
Bug: 171061220
Test: m nothing
Change-Id: I4f2fa7ea372b14d4b169cdc78bdeb1ca4ac4dff8
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 56487ce..efe3e04 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -4213,9 +4213,11 @@
}
}
+// These tests verify that the prebuilt_apex/deapexer to java_import wiring allows for the
+// propagation of paths to dex implementation jars from the former to the latter.
func TestPrebuiltExportDexImplementationJars(t *testing.T) {
transform := func(config *dexpreopt.GlobalConfig) {
- config.BootJars = android.CreateTestConfiguredJarList([]string{"myapex:libfoo"})
+ // Empty transformation.
}
checkDexJarBuildPath := func(ctx *android.TestContext, name string) {
@@ -4298,7 +4300,6 @@
bp := `
prebuilt_apex {
name: "myapex",
- prefer: true,
arch: {
arm64: {
src: "myapex-arm64.apex",
@@ -4312,6 +4313,7 @@
java_import {
name: "libfoo",
+ prefer: true,
jars: ["libfoo.jar"],
}