summaryrefslogtreecommitdiff
path: root/cc/test.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/test.go')
-rw-r--r--cc/test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/test.go b/cc/test.go
index 2c5c36eac..d2c4b28e8 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -94,6 +94,11 @@ type TestBinaryProperties struct {
// of a host test.
Device_first_data []string `android:"path_device_first"`
+ // Same as data, but will add dependencies on modules using the host's os variation and
+ // the common arch variation. Useful for a device test that wants to depend on a host
+ // module, for example to include a custom Tradefed test runner.
+ Host_common_data []string `android:"path_host_common"`
+
// list of shared library modules that should be installed alongside the test
Data_libs []string `android:"arch_variant"`
@@ -345,6 +350,7 @@ func (test *testBinary) install(ctx ModuleContext, file android.Path) {
dataSrcPaths := android.PathsForModuleSrc(ctx, test.Properties.Data)
dataSrcPaths = append(dataSrcPaths, android.PathsForModuleSrc(ctx, test.Properties.Device_common_data)...)
dataSrcPaths = append(dataSrcPaths, android.PathsForModuleSrc(ctx, test.Properties.Device_first_data)...)
+ dataSrcPaths = append(dataSrcPaths, android.PathsForModuleSrc(ctx, test.Properties.Host_common_data)...)
for _, dataSrcPath := range dataSrcPaths {
test.data = append(test.data, android.DataPath{SrcPath: dataSrcPath})