summaryrefslogtreecommitdiff
path: root/python/test.go
diff options
context:
space:
mode:
Diffstat (limited to 'python/test.go')
-rw-r--r--python/test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/test.go b/python/test.go
index f9baa465c..4df71c11b 100644
--- a/python/test.go
+++ b/python/test.go
@@ -45,6 +45,9 @@ type TestProperties struct {
// the test
Data []string `android:"path,arch_variant"`
+ // list of java modules that provide data that should be installed alongside the test.
+ Java_data []string
+
// Test options.
Test_options TestOptions
}
@@ -80,6 +83,13 @@ func (test *testDecorator) install(ctx android.ModuleContext, file android.Path)
for _, dataSrcPath := range dataSrcPaths {
test.data = append(test.data, android.DataPath{SrcPath: dataSrcPath})
}
+
+ // Emulate the data property for java_data dependencies.
+ for _, javaData := range ctx.GetDirectDepsWithTag(javaDataTag) {
+ for _, javaDataSrcPath := range android.OutputFilesForModule(ctx, javaData, "") {
+ test.data = append(test.data, android.DataPath{SrcPath: javaDataSrcPath})
+ }
+ }
}
func NewTest(hod android.HostOrDeviceSupported) *Module {