aboutsummaryrefslogtreecommitdiffstats
path: root/apex/apex_test.go
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2019-02-01 12:03:59 +0900
committerJiyong Park <jiyong@google.com>2019-02-05 21:00:41 +0900
commitb7c24df220607265f21ce0b338b107896e142f9c (patch)
treec9a2b8a34cc9711cee56cd5b39dc45f2a6ef8a62 /apex/apex_test.go
parentdcac078c91dd6ca3bf81fc41c202aa8caa4ac4e4 (diff)
downloadandroid_build_soong-b7c24df220607265f21ce0b338b107896e142f9c.tar.gz
android_build_soong-b7c24df220607265f21ce0b338b107896e142f9c.tar.bz2
android_build_soong-b7c24df220607265f21ce0b338b107896e142f9c.zip
APEX respects relative_install_path
relative_install_path for cc_library is respected by APEX. relative_install_path for cc_binary is not yet respected because doing it will break the path to the dynamic linker in the runtime APEX. That change should be done along with changes in init, bionic, etc. Bug: 123721777 Test: m (apex_test.go amended) Change-Id: I855f8eda0d4255d563861ac96d0d3e2c669e9a2a
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go33
1 files changed, 32 insertions, 1 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 9d330608..1315c25d 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -615,7 +615,10 @@ func TestFilesInSubDir(t *testing.T) {
apex {
name: "myapex",
key: "myapex.key",
+ native_shared_libs: ["mylib"],
+ binaries: ["mybin"],
prebuilts: ["myetc"],
+ compile_multilib: "both",
}
apex_key {
@@ -629,15 +632,43 @@ func TestFilesInSubDir(t *testing.T) {
src: "myprebuilt",
sub_dir: "foo/bar",
}
+
+ cc_library {
+ name: "mylib",
+ srcs: ["mylib.cpp"],
+ relative_install_path: "foo/bar",
+ system_shared_libs: [],
+ stl: "none",
+ }
+
+ cc_binary {
+ name: "mybin",
+ srcs: ["mylib.cpp"],
+ relative_install_path: "foo/bar",
+ system_shared_libs: [],
+ static_executable: true,
+ stl: "none",
+ }
`)
generateFsRule := ctx.ModuleForTests("myapex", "android_common_myapex").Rule("generateFsConfig")
dirs := strings.Split(generateFsRule.Args["exec_paths"], " ")
- // Ensure that etc, etc/foo, and etc/foo/bar are all listed
+ // Ensure that the subdirectories are all listed
ensureListContains(t, dirs, "etc")
ensureListContains(t, dirs, "etc/foo")
ensureListContains(t, dirs, "etc/foo/bar")
+ ensureListContains(t, dirs, "lib64")
+ ensureListContains(t, dirs, "lib64/foo")
+ ensureListContains(t, dirs, "lib64/foo/bar")
+ ensureListContains(t, dirs, "lib")
+ ensureListContains(t, dirs, "lib/foo")
+ ensureListContains(t, dirs, "lib/foo/bar")
+
+ // TODO(b/123721777) respect relative path for binaries
+ // ensureListContains(t, dirs, "bin")
+ // ensureListContains(t, dirs, "bin/foo")
+ // ensureListContains(t, dirs, "bin/foo/bar")
}
func TestUseVendor(t *testing.T) {