diff options
author | 2020-05-04 10:31:32 +0900 | |
---|---|---|
committer | 2020-05-04 10:31:32 +0900 | |
commit | af9539fd147c09ec5c23aca1115d8f214783f9c9 (patch) | |
tree | 8f4fc4dc0c4c053454568c2eacedf4ed77735fb4 /apex/apex_test.go | |
parent | b39e15d3f37841ecd964b518673214cab5c3c1ea (diff) |
Dependencies of tests are also included in APEX
Shared lib dependencies of a test is included in the APEX regardless of
whether the test has test_per_srcs or not.
Bug: N/A
Test: m (apex_test.go amended)
Change-Id: I6b16843cc7467c42e250aba88d79d5580ba47324
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r-- | apex/apex_test.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index dea7a087e..b58363e62 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -3145,11 +3145,19 @@ func TestApexWithTests(t *testing.T) { gtest: false, srcs: ["mytest.cpp"], relative_install_path: "test", + shared_libs: ["mylib"], system_shared_libs: [], static_executable: true, stl: "none", } + cc_library { + name: "mylib", + srcs: ["mylib.cpp"], + system_shared_libs: [], + stl: "none", + } + cc_test { name: "mytests", gtest: false, @@ -3169,8 +3177,9 @@ func TestApexWithTests(t *testing.T) { apexRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Rule("apexRule") copyCmds := apexRule.Args["copy_commands"] - // Ensure that test dep is copied into apex. + // Ensure that test dep (and their transitive dependencies) are copied into apex. ensureContains(t, copyCmds, "image.apex/bin/test/mytest") + ensureContains(t, copyCmds, "image.apex/lib64/mylib.so") // Ensure that test deps built with `test_per_src` are copied into apex. ensureContains(t, copyCmds, "image.apex/bin/test/mytest1") |