summaryrefslogtreecommitdiff
path: root/android/path_properties_test.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-07-09 17:38:55 +0100
committer Paul Duffin <paulduffin@google.com> 2021-07-09 23:54:01 +0100
commitd5cf92e29874c29a65e99ab14a41af40a092a1a5 (patch)
tree60420ca4c38777f907fad24cb56232fcb933dfe7 /android/path_properties_test.go
parent4fbfb59d3e43d92a2ef5c50049210dfcb634fc9e (diff)
Support customizing behavior around sourceOrOutputDependencyTag
Previously, modules customized behavior around the handling of sourceOrOutputDependencyTag by comparing them to android.SourceDepTag and retrieving the module using something like this: ctx.GetDirectDepWithTag(m, android.SourceDepTag) The problem with that is it does not allow an output tag to be specified and does not handle fully qualified names properly. This adds the following: * IsSourceDepTag and IsSourceDepTagWithOutputTag to check whether a blueprint.DependencyTag is a sourceOrOutputDependencyTag. The latter also checks that it has the correct output tag. * GetModuleFromPathDep(ctx, moduleName, outputTag) as a replacement for ctx.GetDirectDepWithTag(m, android.SourceDepTag). Replaces usages of: * t == SourceDepTag with IsSourceDepTagWithOutputTag(t, "") * ctx.GetDirectDepWithTag(m, android.SourceDepTag) with GetModuleFromPathDep(ctx, m, "") It also deprecates the following: * android.SourcDepTag - as a follow up change needs to modify the sourceOrOutputDependencyTag will make this useless. * ExpandSources, ExpandsSources - copies existing deprecated messages from the implementation to the interface so that they can be seen by users of that interface. Bug: 193228441 Test: m nothing Change-Id: I8c397232b8d7dc1f9702c04ad45ea7819d4631ae
Diffstat (limited to 'android/path_properties_test.go')
-rw-r--r--android/path_properties_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/android/path_properties_test.go b/android/path_properties_test.go
index 568f8682b..07b48696c 100644
--- a/android/path_properties_test.go
+++ b/android/path_properties_test.go
@@ -63,7 +63,8 @@ func (p *pathDepsMutatorTestModule) GenerateAndroidBuildActions(ctx ModuleContex
if p.props.Foo != "" {
// Make sure there is only one dependency on a module listed in a property present in multiple property structs
- if ctx.GetDirectDepWithTag(SrcIsModule(p.props.Foo), sourceOrOutputDepTag("")) == nil {
+ m := SrcIsModule(p.props.Foo)
+ if GetModuleFromPathDep(ctx, m, "") == nil {
ctx.ModuleErrorf("GetDirectDepWithTag failed")
}
}