diff options
author | 2025-02-21 15:31:29 -0800 | |
---|---|---|
committer | 2025-02-21 15:31:29 -0800 | |
commit | ff5a9c36f906accadb520cd479f876daf1d4587d (patch) | |
tree | 5f55e2d0b02a90ddc9f598ec33bd1f7a54f196c2 /sh | |
parent | 2cb77e066ae2548db00cfaba95665141aa3cfc02 (diff) | |
parent | b361442aa66c644efba22c6c3da846ac0644d86a (diff) |
Merge "Implement host_common_data property for cc, java, rust and sh test modules" into main
Diffstat (limited to 'sh')
-rw-r--r-- | sh/sh_binary.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sh/sh_binary.go b/sh/sh_binary.go index c0c6ff2ae..f8d1ce523 100644 --- a/sh/sh_binary.go +++ b/sh/sh_binary.go @@ -138,6 +138,11 @@ type TestProperties struct { // 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"` + // Add RootTargetPreparer to auto generated test config. This guarantees the test to run // with root permission. Require_root *bool @@ -436,6 +441,7 @@ func (s *ShTest) GenerateAndroidBuildActions(ctx android.ModuleContext) { 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)...) + expandedData = append(expandedData, android.PathsForModuleSrc(ctx, s.testProperties.Host_common_data)...) // Emulate the data property for java_data dependencies. for _, javaData := range ctx.GetDirectDepsProxyWithTag(shTestJavaDataTag) { expandedData = append(expandedData, android.OutputFilesForModule(ctx, javaData, "")...) |