summaryrefslogtreecommitdiff
path: root/rust/test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2025-02-21 15:31:29 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-02-21 15:31:29 -0800
commitff5a9c36f906accadb520cd479f876daf1d4587d (patch)
tree5f55e2d0b02a90ddc9f598ec33bd1f7a54f196c2 /rust/test.go
parent2cb77e066ae2548db00cfaba95665141aa3cfc02 (diff)
parentb361442aa66c644efba22c6c3da846ac0644d86a (diff)
Merge "Implement host_common_data property for cc, java, rust and sh test modules" into main
Diffstat (limited to 'rust/test.go')
-rw-r--r--rust/test.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/rust/test.go b/rust/test.go
index 5c183bc67..9833ffdb6 100644
--- a/rust/test.go
+++ b/rust/test.go
@@ -46,9 +46,16 @@ type TestProperties struct {
// the test
Data []string `android:"path,arch_variant"`
- // Same as data, but will add dependencies on the device's
+ // Same as data, but adds dependencies on modules using the device's os variant, and common
+ // architecture's variant. Can be useful to add device-built apps to the data of a host
+ // test.
Device_common_data []string `android:"path_device_common"`
+ // 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"`
@@ -147,6 +154,7 @@ func (test *testDecorator) install(ctx ModuleContext) {
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.Host_common_data)...)
ctx.VisitDirectDepsProxyWithTag(dataLibDepTag, func(dep android.ModuleProxy) {
depName := ctx.OtherModuleName(dep)