summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Vinh Tran <vinhdaitran@google.com> 2022-12-14 11:34:54 -0500
committer Vinh Tran <vinhdaitran@google.com> 2022-12-14 18:54:47 -0500
commitb6803a5f52cb152869abda9a9b870122d8704e56 (patch)
treed3d2c636b61cab2c9d526c7569cd46403aa4f9cf /apex/apex_test.go
parentccfe6022d445b1fecc161c073033ef3e999a3b41 (diff)
Add ApexInfo.RequiresLibs to mixed build handler for apex
Adding ApexInfo.RequiresLibs from Bazel to apexBundle.requiredDeps which is eventuallyread by apex androidmk writer for LOCAL_REQUIRED_MODULES to ensures the libs are installed as part of a bundle build. In Soong, apexBundle.requiredDeps is set in https://cs.android.com/android/platform/build/soong/+/master:apex/apex.go;l=2305-2323;drc=cb7e73bc0130a95f5991c925c349387185abc098 The same logic is replicated in Bazel at https://cs.android.com/android/platform/build/bazel/+/master:rules/apex/cc.bzl;l=141-163;drc=cb7e73bc0130a95f5991c925c349387185abc098. This CL is porting the required libs set by Bazel in mixed build. Test: go test Test: run build/bazel/ci/mixed_libc.sh Bug: 215500321 Change-Id: Id7256d279ac09a8fd42db391a7e93ce0021d8345
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 1f2be357b..c0bdfc446 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -9835,11 +9835,11 @@ apex {
JavaSymbolsUsedByApex: "foo_using.xml",
BundleFile: "apex_bundle.zip",
InstalledFiles: "installed-files.txt",
+ RequiresLibs: []string{"//path/c:c", "//path/d:d"},
// unused
PackageName: "pkg_name",
ProvidesLibs: []string{"a", "b"},
- RequiresLibs: []string{"c", "d"},
},
},
}
@@ -9895,4 +9895,7 @@ apex {
if w := "$(call dist-for-goals,checkbuild,out/bazel/execroot/__main__/installed-files.txt:foo-installed-files.txt)"; !strings.Contains(data, w) {
t.Errorf("Expected %q in androidmk data, but did not find %q", w, data)
}
+ if w := "LOCAL_REQUIRED_MODULES := c d"; !strings.Contains(data, w) {
+ t.Errorf("Expected %q in androidmk data, but did not find it in %q", w, data)
+ }
}