Merge "Use alias for test_per_src apex dependencies"

This commit is contained in:
Colin Cross 2020-09-12 20:21:36 +00:00 committed by Gerrit Code Review
commit a018b3df16
2 changed files with 2 additions and 5 deletions

View File

@ -1450,8 +1450,6 @@ func addDependenciesForNativeModules(ctx android.BottomUpMutatorContext,
binVariations := target.Variations()
libVariations := append(target.Variations(),
blueprint.Variation{Mutator: "link", Variation: "shared"})
testVariations := append(target.Variations(),
blueprint.Variation{Mutator: "test_per_src", Variation: ""}) // "" is the all-tests variant
if ctx.Device() {
binVariations = append(binVariations,
@ -1459,8 +1457,6 @@ func addDependenciesForNativeModules(ctx android.BottomUpMutatorContext,
libVariations = append(libVariations,
blueprint.Variation{Mutator: "image", Variation: imageVariation},
blueprint.Variation{Mutator: "version", Variation: ""}) // "" is the non-stub variant
testVariations = append(testVariations,
blueprint.Variation{Mutator: "image", Variation: imageVariation})
}
ctx.AddFarVariationDependencies(libVariations, sharedLibTag, nativeModules.Native_shared_libs...)
@ -1469,7 +1465,7 @@ func addDependenciesForNativeModules(ctx android.BottomUpMutatorContext,
ctx.AddFarVariationDependencies(binVariations, executableTag, nativeModules.Binaries...)
ctx.AddFarVariationDependencies(testVariations, testTag, nativeModules.Tests...)
ctx.AddFarVariationDependencies(binVariations, testTag, nativeModules.Tests...)
}
func (a *apexBundle) combineProperties(ctx android.BottomUpMutatorContext) {

View File

@ -223,6 +223,7 @@ func TestPerSrcMutator(mctx android.BottomUpMutatorContext) {
tests[i].(*Module).linker.(testPerSrc).setSrc(testNames[i], src)
mctx.AddInterVariantDependency(testPerSrcDepTag, all_tests, tests[i])
}
mctx.AliasVariation("")
}
}
}