summaryrefslogtreecommitdiff
path: root/python/test.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-10-23 20:49:17 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-10-23 20:49:17 +0000
commitadab47873bc145ef576d93a01b0070c1ca476ae9 (patch)
tree427387a183b334fba1ed06e1cf72a9fda1c13ebc /python/test.go
parentbf1a7574b7d1ca32b82a4ee8dd9b092e4a6e6116 (diff)
parentee45d33c1e79c4e0870473ead1b846f6e1a80ccc (diff)
Merge "Include device_common_data in python test data" into main
Diffstat (limited to 'python/test.go')
-rw-r--r--python/test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/test.go b/python/test.go
index 85decf931..acf5b26da 100644
--- a/python/test.go
+++ b/python/test.go
@@ -65,6 +65,11 @@ type TestProperties struct {
// the test
Data []string `android:"path,arch_variant"`
+ // Same as data, but will add dependencies on modules using the device's os variation and
+ // the common arch variation. Useful for a host test that wants to embed a module built for
+ // device.
+ Device_common_data []string `android:"path_device_common"`
+
// list of java modules that provide data that should be installed alongside the test.
Java_data []string
@@ -183,6 +188,9 @@ func (p *PythonTestModule) GenerateAndroidBuildActions(ctx android.ModuleContext
for _, dataSrcPath := range android.PathsForModuleSrc(ctx, p.testProperties.Data) {
p.data = append(p.data, android.DataPath{SrcPath: dataSrcPath})
}
+ for _, dataSrcPath := range android.PathsForModuleSrc(ctx, p.testProperties.Device_common_data) {
+ p.data = append(p.data, android.DataPath{SrcPath: dataSrcPath})
+ }
if p.isTestHost() && len(p.testProperties.Data_device_bins_both) > 0 {
ctx.VisitDirectDepsWithTag(dataDeviceBinsTag, func(dep android.Module) {