diff options
author | 2024-10-21 15:41:42 -0700 | |
---|---|---|
committer | 2024-10-21 15:41:42 -0700 | |
commit | 65cb40a975fb53187cfc5d9edea905b1f7630ab2 (patch) | |
tree | 4fdd79e9271e230761e86e6b9e754e5755c078bd /sh/sh_binary.go | |
parent | bae26fe87f9d05a40accf870fee40d000ad4ed64 (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 'sh/sh_binary.go')
-rw-r--r-- | sh/sh_binary.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sh/sh_binary.go b/sh/sh_binary.go index 2e48d83e6..ac27df820 100644 --- a/sh/sh_binary.go +++ b/sh/sh_binary.go @@ -120,6 +120,16 @@ type TestProperties struct { // the test. Data []string `android:"path,arch_variant"` + // same as data, but adds dependencies using the device's os variation and the common + // architecture's variation. Can be used to add a module built for device to the data of a + // host test. + Device_common_data []string `android:"path_device_common"` + + // same as data, but adds dependencies using the device's os variation and the device's first + // architecture's variation. Can be used to add a module built for device to the data of a + // host test. + Device_first_data []string `android:"path_device_first"` + // Add RootTargetPreparer to auto generated test config. This guarantees the test to run // with root permission. Require_root *bool @@ -407,6 +417,8 @@ func (s *ShTest) GenerateAndroidBuildActions(ctx android.ModuleContext) { s.ShBinary.generateAndroidBuildActions(ctx) expandedData := android.PathsForModuleSrc(ctx, s.testProperties.Data) + expandedData = append(expandedData, android.PathsForModuleSrc(ctx, s.testProperties.Device_common_data)...) + expandedData = append(expandedData, android.PathsForModuleSrc(ctx, s.testProperties.Device_first_data)...) // Emulate the data property for java_data dependencies. for _, javaData := range ctx.GetDirectDepsWithTag(shTestJavaDataTag) { expandedData = append(expandedData, android.OutputFilesForModule(ctx, javaData, "")...) |