summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2020-07-06 22:56:01 +0100
committer Martin Stjernholm <mast@google.com> 2020-07-07 18:12:41 +0100
commit58c33f073d71e35562d7778ff03a74ef6b3e589b (patch)
treeee9a9dd4f4ea1172746bfe4534e9ae49e4b8e134 /apex/apex_test.go
parent5aa31347bc14345372ad716cf177247d9e87fbe2 (diff)
Do not follow prebuiltDependencyTags in APEX payload walks.
If prebuilts are active they will have the other direct dependencies from the source modules. Bug: 151303681 Test: m nothing Test: `m` with prebuilts/runtime in the manifest (along with other fixes) Change-Id: I1ffc7e7b528ed9db5ce6ca2ee96c9d23c6548c49
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index befb81483..6613ab57a 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -5790,6 +5790,41 @@ func TestAllowedFiles(t *testing.T) {
}
}
+func TestNonPreferredPrebuiltDependency(t *testing.T) {
+ _, _ = testApex(t, `
+ apex {
+ name: "myapex",
+ key: "myapex.key",
+ native_shared_libs: ["mylib"],
+ }
+
+ apex_key {
+ name: "myapex.key",
+ public_key: "testkey.avbpubkey",
+ private_key: "testkey.pem",
+ }
+
+ cc_library {
+ name: "mylib",
+ srcs: ["mylib.cpp"],
+ stubs: {
+ versions: ["10000"],
+ },
+ apex_available: ["myapex"],
+ }
+
+ cc_prebuilt_library_shared {
+ name: "mylib",
+ prefer: false,
+ srcs: ["prebuilt.so"],
+ stubs: {
+ versions: ["10000"],
+ },
+ apex_available: ["myapex"],
+ }
+ `)
+}
+
func TestMain(m *testing.M) {
run := func() int {
setUp()