Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78c36216 authored by Paul Duffin's avatar Paul Duffin
Browse files

Add NinjaDeps to TestResult

Bug: 182885307
Test: m nothing
Change-Id: I1eb49f2514b13f52f367cd8f57e5cb0ab3336bd7
parent a9237b6e
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -582,6 +582,10 @@ type TestResult struct {

	// 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 @@ func (f *fixture) RunTest() *TestResult {
	}

	ctx.Register()
	_, errs := ctx.ParseBlueprintsFiles("ignored")
	var ninjaDeps []string
	extraNinjaDeps, errs := ctx.ParseBlueprintsFiles("ignored")
	if len(errs) == 0 {
		ninjaDeps = append(ninjaDeps, extraNinjaDeps...)
		extraNinjaDeps, errs = ctx.PrepareBuildActions(f.config)
		if len(errs) == 0 {
		_, errs = ctx.PrepareBuildActions(f.config)
			ninjaDeps = append(ninjaDeps, extraNinjaDeps...)
		}
	}

	result := &TestResult{
@@ -732,6 +741,7 @@ func (f *fixture) RunTest() *TestResult {
		fixture:     f,
		Config:      f.config,
		Errs:        errs,
		NinjaDeps:   ninjaDeps,
	}

	f.errorHandler.CheckErrors(f.t, result)