summaryrefslogtreecommitdiff
path: root/rust/test.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-10-21 15:41:42 -0700
committer Cole Faust <colefaust@google.com> 2024-10-21 15:41:42 -0700
commit65cb40a975fb53187cfc5d9edea905b1f7630ab2 (patch)
tree4fdd79e9271e230761e86e6b9e754e5755c078bd /rust/test.go
parentbae26fe87f9d05a40accf870fee40d000ad4ed64 (diff)
Add new properties to aid in removing the 1-variant fallback
These new properties are essentially methods to specify "outgoing transitions" in blueprint files. There are lots of host tests that want to include apps built for device in their data, so they need a property that adds dependencies based on the device variants instead of copying the same host variants. After this cl is submitted, I'll do an LSC to update all the usages that are relying on the 1-variant fallback to use these properties instead. Bug: 372091092 Test: m nothing --no-skip-soong-tests Change-Id: I45b8fb024da120ad61606e3a21de86e4392be2a4
Diffstat (limited to 'rust/test.go')
-rw-r--r--rust/test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/test.go b/rust/test.go
index b7ddd06a3..20ccfb31c 100644
--- a/rust/test.go
+++ b/rust/test.go
@@ -46,6 +46,9 @@ type TestProperties struct {
// the test
Data []string `android:"path,arch_variant"`
+ // Same as data, but will add dependencies on the device's
+ Device_common_data []string `android:"path_device_common"`
+
// list of shared library modules that should be installed alongside the test
Data_libs []string `android:"arch_variant"`
@@ -143,6 +146,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)...)
ctx.VisitDirectDepsWithTag(dataLibDepTag, func(dep android.Module) {
depName := ctx.OtherModuleName(dep)