Supported python build in host side.
The base module handles all the common functionalites, such as version
compatibilty check, version variations split, source file format check,
source/data file duplicate check.
The library/binary module focuses on how to generate binary build actions,
such as setting up stub script, zipping, filling in __init__.py in
runfiles dir tree.
Bug: b/31676493
Test: go test under python package
Change-Id: I06608369f350f7195873d459e1c8d1bdb811e77e
diff --git a/android/mutator.go b/android/mutator.go
index 940b0ff..bb49487 100644
--- a/android/mutator.go
+++ b/android/mutator.go
@@ -81,8 +81,18 @@
}
func RegisterTestMutators(ctx *blueprint.Context) {
- mutators := registerMutatorsContext{}
+ mutators := ®isterMutatorsContext{}
+
+ 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 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 @@
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 {