summaryrefslogtreecommitdiff
path: root/android/testing.go
diff options
context:
space:
mode:
author Jeff Gaston <jeffrygaston@google.com> 2017-12-01 17:10:33 -0800
committer Jeff Gaston <jeffrygaston@google.com> 2017-12-04 17:44:32 -0800
commitb274ed3252dfadfd5a7edf70e470b61cf074c0de (patch)
treed9b6240f71a17911de306631868ca851d7163887 /android/testing.go
parent5c3886de5a1eabb81e7d166a86c29ca324dabf49 (diff)
Make ninja file deterministic even with dup module names
Bug: 65683273 Test: ./build/soong/scripts/diff_build_graphs.sh \ --products=aosp_arm '' '' Change-Id: Ie01ff579d69e94b12363f53aec5d25810211c451
Diffstat (limited to 'android/testing.go')
-rw-r--r--android/testing.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/android/testing.go b/android/testing.go
index 4f2a2da4f..1c0fac10d 100644
--- a/android/testing.go
+++ b/android/testing.go
@@ -23,14 +23,17 @@ import (
)
func NewTestContext() *TestContext {
- ctx := &TestContext{
- Context: blueprint.NewContext(),
- }
-
namespaceExportFilter := func(namespace *Namespace) bool {
return true
}
- ctx.SetNameInterface(NewNameResolver(namespaceExportFilter))
+
+ nameResolver := NewNameResolver(namespaceExportFilter)
+ ctx := &TestContext{
+ Context: blueprint.NewContext(),
+ NameResolver: nameResolver,
+ }
+
+ ctx.SetNameInterface(nameResolver)
return ctx
}
@@ -44,6 +47,7 @@ func NewTestArchContext() *TestContext {
type TestContext struct {
*blueprint.Context
preArch, preDeps, postDeps []RegisterMutatorFunc
+ NameResolver *NameResolver
}
func (ctx *TestContext) PreArchMutators(f RegisterMutatorFunc) {