Add NinjaDeps to TestResult
Bug: 182885307
Test: m nothing
Change-Id: I1eb49f2514b13f52f367cd8f57e5cb0ab3336bd7
diff --git a/android/fixture.go b/android/fixture.go
index 6db43e2..4e445c0 100644
--- a/android/fixture.go
+++ b/android/fixture.go
@@ -582,6 +582,10 @@
// The errors that were reported during the test.
Errs []error
+
+ // The ninja deps is a list of the ninja files dependencies that were added by the modules and
+ // singletons via the *.AddNinjaFileDeps() methods.
+ NinjaDeps []string
}
var _ FixtureFactory = (*fixtureFactory)(nil)
@@ -722,9 +726,14 @@
}
ctx.Register()
- _, errs := ctx.ParseBlueprintsFiles("ignored")
+ var ninjaDeps []string
+ extraNinjaDeps, errs := ctx.ParseBlueprintsFiles("ignored")
if len(errs) == 0 {
- _, errs = ctx.PrepareBuildActions(f.config)
+ ninjaDeps = append(ninjaDeps, extraNinjaDeps...)
+ extraNinjaDeps, errs = ctx.PrepareBuildActions(f.config)
+ if len(errs) == 0 {
+ ninjaDeps = append(ninjaDeps, extraNinjaDeps...)
+ }
}
result := &TestResult{
@@ -732,6 +741,7 @@
fixture: f,
Config: f.config,
Errs: errs,
+ NinjaDeps: ninjaDeps,
}
f.errorHandler.CheckErrors(f.t, result)