diff options
author | 2025-02-18 15:18:18 -0800 | |
---|---|---|
committer | 2025-02-18 15:19:56 -0800 | |
commit | b361442aa66c644efba22c6c3da846ac0644d86a (patch) | |
tree | df6345e8800f50ca577044e9fcd7ccde232bf475 /android/path_properties.go | |
parent | 6029aed8b971969c87f42cd940434f0fe1da904b (diff) |
Implement host_common_data property for cc, java, rust and sh test modules
Implement the host_common_data property that will copy a host common
module into the test data directory. This property can be used to
copy a custom Tradefed test runner jar alongside the test.
Bug: 262397555
Test: TestHostCommonData
Change-Id: Iacef0778254a3dda400c9e221f442c47d8db7b02
Diffstat (limited to 'android/path_properties.go')
-rw-r--r-- | android/path_properties.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/android/path_properties.go b/android/path_properties.go index 55a4dc066..d769d58c4 100644 --- a/android/path_properties.go +++ b/android/path_properties.go @@ -54,12 +54,14 @@ func addPathDepsForProps(ctx BottomUpMutatorContext, props []interface{}) { var pathDeviceFirstPrefer32Properties []string var pathDeviceCommonProperties []string var pathCommonOsProperties []string + var pathHostCommonProperties []string for _, ps := range props { pathProperties = append(pathProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path")...) pathDeviceFirstProperties = append(pathDeviceFirstProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path_device_first")...) pathDeviceFirstPrefer32Properties = append(pathDeviceFirstPrefer32Properties, taggedPropertiesForPropertyStruct(ctx, ps, "path_device_first_prefer32")...) pathDeviceCommonProperties = append(pathDeviceCommonProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path_device_common")...) pathCommonOsProperties = append(pathCommonOsProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path_common_os")...) + pathHostCommonProperties = append(pathHostCommonProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path_host_common")...) } // Remove duplicates to avoid multiple dependencies. @@ -68,6 +70,7 @@ func addPathDepsForProps(ctx BottomUpMutatorContext, props []interface{}) { pathDeviceFirstPrefer32Properties = FirstUniqueStrings(pathDeviceFirstPrefer32Properties) pathDeviceCommonProperties = FirstUniqueStrings(pathDeviceCommonProperties) pathCommonOsProperties = FirstUniqueStrings(pathCommonOsProperties) + pathHostCommonProperties = FirstUniqueStrings(pathHostCommonProperties) // Add dependencies to anything that is a module reference. for _, s := range pathProperties { @@ -108,6 +111,12 @@ func addPathDepsForProps(ctx BottomUpMutatorContext, props []interface{}) { ctx.AddVariationDependencies(ctx.Config().AndroidCommonTarget.Variations(), sourceOrOutputDepTag(m, t), m) } } + // properties tagged "path_host_common" get the host common variant + for _, s := range pathHostCommonProperties { + if m, t := SrcIsModuleWithTag(s); m != "" { + ctx.AddVariationDependencies(ctx.Config().BuildOSCommonTarget.Variations(), sourceOrOutputDepTag(m, t), m) + } + } // properties tagged "path_common_os" get the CommonOs variant for _, s := range pathCommonOsProperties { if m, t := SrcIsModuleWithTag(s); m != "" { |