Merge "Add preparer for test to allow missing dependencies" am: d1fc19be39
am: 840581bd45
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626511 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I44ffa8d67af7e3a3fd8e5ccaf7c67c0ddaab0aac
This commit is contained in:
commit
c84e0c388b
|
@ -24,6 +24,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
"github.com/google/blueprint/proptools"
|
||||
)
|
||||
|
||||
func NewTestContext(config Config) *TestContext {
|
||||
|
@ -105,6 +106,17 @@ var PrepareForIntegrationTestWithAndroid = GroupFixturePreparers(
|
|||
PrepareForTestWithAndroidBuildComponents,
|
||||
)
|
||||
|
||||
// Prepares a test that may be missing dependencies by setting allow_missing_dependencies to
|
||||
// true.
|
||||
var PrepareForTestWithAllowMissingDependencies = GroupFixturePreparers(
|
||||
FixtureModifyProductVariables(func(variables FixtureProductVariables) {
|
||||
variables.Allow_missing_dependencies = proptools.BoolPtr(true)
|
||||
}),
|
||||
FixtureModifyContext(func(ctx *TestContext) {
|
||||
ctx.SetAllowMissingDependencies(true)
|
||||
}),
|
||||
)
|
||||
|
||||
func NewTestArchContext(config Config) *TestContext {
|
||||
ctx := NewTestContext(config)
|
||||
ctx.preDeps = append(ctx.preDeps, registerArchMutator)
|
||||
|
|
Loading…
Reference in New Issue