summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index dc6986244..021c3e22a 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -180,6 +180,8 @@ func testApexContext(t *testing.T, bp string, handlers ...testCustomizer) (*andr
"build/make/core/proguard.flags": nil,
"build/make/core/proguard_basic_keeps.flags": nil,
"dummy.txt": nil,
+ "baz": nil,
+ "bar/baz": nil,
}
cc.GatherRequiredFilesForTest(fs)
@@ -3267,6 +3269,14 @@ func TestApexWithTests(t *testing.T) {
private_key: "testkey.pem",
}
+ filegroup {
+ name: "fg",
+ srcs: [
+ "baz",
+ "bar/baz"
+ ],
+ }
+
cc_test {
name: "mytest",
gtest: false,
@@ -3276,6 +3286,7 @@ func TestApexWithTests(t *testing.T) {
system_shared_libs: [],
static_executable: true,
stl: "none",
+ data: [":fg"],
}
cc_library {
@@ -3308,6 +3319,10 @@ func TestApexWithTests(t *testing.T) {
ensureContains(t, copyCmds, "image.apex/bin/test/mytest")
ensureContains(t, copyCmds, "image.apex/lib64/mylib.so")
+ //Ensure that test data are copied into apex.
+ ensureContains(t, copyCmds, "image.apex/bin/test/baz")
+ ensureContains(t, copyCmds, "image.apex/bin/test/bar/baz")
+
// Ensure that test deps built with `test_per_src` are copied into apex.
ensureContains(t, copyCmds, "image.apex/bin/test/mytest1")
ensureContains(t, copyCmds, "image.apex/bin/test/mytest2")