Add test infrastructure for running the arch mutator

Add TestArchConfig and NewTestArchContext to create a test context
that will run the arch mutator, which is necessary to test any code
that is inside a ctx.Device() block or similar.

Test: next patch
Change-Id: Ieb1a0326bc27fc18ba88b8d37655a7e0c6870d6c
This commit is contained in:
Colin Cross
2017-09-15 17:33:55 -07:00
parent 6ade34f641
commit ae4c6180a7
3 changed files with 31 additions and 4 deletions

View File

@@ -78,11 +78,13 @@ var preArch = []RegisterMutatorFunc{
RegisterDefaultsPreArchMutators,
}
func registerArchMutator(ctx RegisterMutatorsContext) {
ctx.BottomUp("arch", archMutator).Parallel()
ctx.TopDown("arch_hooks", archHookMutator).Parallel()
}
var preDeps = []RegisterMutatorFunc{
func(ctx RegisterMutatorsContext) {
ctx.BottomUp("arch", archMutator).Parallel()
ctx.TopDown("arch_hooks", archHookMutator).Parallel()
},
registerArchMutator,
}
var postDeps = []RegisterMutatorFunc{