aboutsummaryrefslogtreecommitdiffstats
path: root/android/mutator.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/mutator.go')
-rw-r--r--android/mutator.go22
1 files changed, 20 insertions, 2 deletions
diff --git a/android/mutator.go b/android/mutator.go
index 940b0ffb..bb494878 100644
--- a/android/mutator.go
+++ b/android/mutator.go
@@ -81,8 +81,18 @@ func registerMutators(ctx *blueprint.Context) {
}
func RegisterTestMutators(ctx *blueprint.Context) {
- mutators := registerMutatorsContext{}
+ mutators := &registerMutatorsContext{}
+
+ register := func(funcs []RegisterMutatorFunc) {
+ for _, f := range funcs {
+ f(mutators)
+ }
+ }
+
+ register(testPreDeps)
mutators.BottomUp("deps", depsMutator).Parallel()
+ register(testPostDeps)
+
registerMutatorsToContext(ctx, mutators.mutators)
}
@@ -97,7 +107,7 @@ type RegisterMutatorsContext interface {
type RegisterMutatorFunc func(RegisterMutatorsContext)
-var preArch, preDeps, postDeps []RegisterMutatorFunc
+var preArch, preDeps, postDeps, testPreDeps, testPostDeps []RegisterMutatorFunc
func PreArchMutators(f RegisterMutatorFunc) {
preArch = append(preArch, f)
@@ -111,6 +121,14 @@ func PostDepsMutators(f RegisterMutatorFunc) {
postDeps = append(postDeps, f)
}
+func TestPreDepsMutators(f RegisterMutatorFunc) {
+ testPreDeps = append(testPreDeps, f)
+}
+
+func TeststPostDepsMutators(f RegisterMutatorFunc) {
+ testPostDeps = append(testPostDeps, f)
+}
+
type AndroidTopDownMutator func(TopDownMutatorContext)
type TopDownMutatorContext interface {