diff options
Diffstat (limited to 'android/testing.go')
-rw-r--r-- | android/testing.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/android/testing.go b/android/testing.go index 196b22e3e..7440869f3 100644 --- a/android/testing.go +++ b/android/testing.go @@ -197,8 +197,8 @@ func NewTestArchContext(config Config) *TestContext { type TestContext struct { *Context - preArch, preDeps, postDeps, finalDeps []RegisterMutatorFunc - NameResolver *NameResolver + preArch, preDeps, postDeps, postApex, finalDeps []RegisterMutatorFunc + NameResolver *NameResolver // The list of singletons registered for the test. singletons sortableComponents @@ -229,6 +229,10 @@ func (ctx *TestContext) PostDepsMutators(f RegisterMutatorFunc) { ctx.postDeps = append(ctx.postDeps, f) } +func (ctx *TestContext) PostApexMutators(f RegisterMutatorFunc) { + ctx.postApex = append(ctx.postApex, f) +} + func (ctx *TestContext) FinalDepsMutators(f RegisterMutatorFunc) { ctx.finalDeps = append(ctx.finalDeps, f) } @@ -449,7 +453,7 @@ func globallyRegisteredComponentsOrder() *registrationSorter { func (ctx *TestContext) Register() { globalOrder := globallyRegisteredComponentsOrder() - mutators := collateRegisteredMutators(ctx.preArch, ctx.preDeps, ctx.postDeps, ctx.finalDeps) + mutators := collateRegisteredMutators(ctx.preArch, ctx.preDeps, ctx.postDeps, ctx.postApex, ctx.finalDeps) // Ensure that the mutators used in the test are in the same order as they are used at runtime. globalOrder.mutatorOrder.enforceOrdering(mutators) mutators.registerAll(ctx.Context) |