Merge changes from topic "replace_dependencies" into main
* changes: Only update DebugMutator and DebugVariation for non-empty transition variations Update docs for ReplaceDependencies[If] Raise test timeout when running soong tests with race detector
This commit is contained in:
@@ -293,15 +293,14 @@ type BottomUpMutatorContext interface {
|
||||
// WalkDeps, etc.
|
||||
AddInterVariantDependency(tag blueprint.DependencyTag, from, to blueprint.Module)
|
||||
|
||||
// ReplaceDependencies replaces all dependencies on the identical variant of the module with the
|
||||
// specified name with the current variant of this module. Replacements don't take effect until
|
||||
// after the mutator pass is finished.
|
||||
// ReplaceDependencies finds all the variants of the module with the specified name, then
|
||||
// replaces all dependencies onto those variants with the current variant of this module.
|
||||
// Replacements don't take effect until after the mutator pass is finished.
|
||||
ReplaceDependencies(string)
|
||||
|
||||
// ReplaceDependencies replaces all dependencies on the identical variant of the module with the
|
||||
// specified name with the current variant of this module as long as the supplied predicate returns
|
||||
// true.
|
||||
//
|
||||
// ReplaceDependenciesIf finds all the variants of the module with the specified name, then
|
||||
// replaces all dependencies onto those variants with the current variant of this module
|
||||
// as long as the supplied predicate returns true.
|
||||
// Replacements don't take effect until after the mutator pass is finished.
|
||||
ReplaceDependenciesIf(string, blueprint.ReplaceDependencyPredicate)
|
||||
|
||||
@@ -595,11 +594,16 @@ func (a *androidTransitionMutator) IncomingTransition(bpctx blueprint.IncomingTr
|
||||
|
||||
func (a *androidTransitionMutator) Mutate(ctx blueprint.BottomUpMutatorContext, variation string) {
|
||||
if am, ok := ctx.Module().(Module); ok {
|
||||
if variation != "" {
|
||||
// TODO: this should really be checking whether the TransitionMutator affected this module, not
|
||||
// the empty variant, but TransitionMutator has no concept of skipping a module.
|
||||
base := am.base()
|
||||
base.commonProperties.DebugMutators = append(base.commonProperties.DebugMutators, a.name)
|
||||
base.commonProperties.DebugVariations = append(base.commonProperties.DebugVariations, variation)
|
||||
}
|
||||
|
||||
mctx := bottomUpMutatorContextFactory(ctx, am, a.finalPhase)
|
||||
defer bottomUpMutatorContextPool.Put(mctx)
|
||||
base := am.base()
|
||||
base.commonProperties.DebugMutators = append(base.commonProperties.DebugMutators, a.name)
|
||||
base.commonProperties.DebugVariations = append(base.commonProperties.DebugVariations, variation)
|
||||
a.mutator.Mutate(mctx, variation)
|
||||
}
|
||||
}
|
||||
|
@@ -74,6 +74,6 @@ for dir in "${go_modules[@]}"; do
|
||||
(cd "$dir";
|
||||
eval ${network_jail} -- ${GOROOT}/bin/go build ./...
|
||||
eval ${network_jail} -- ${GOROOT}/bin/go test ./...
|
||||
eval ${network_jail} -- ${GOROOT}/bin/go test -race -short ./...
|
||||
eval ${network_jail} -- ${GOROOT}/bin/go test -race -timeout 20m -short ./...
|
||||
)
|
||||
done
|
||||
|
Reference in New Issue
Block a user