Make TestModule.Output print a list of all outputs on error am: 9cf27db425
am: 799ed60b06
Change-Id: I6c1d89049b517493b8780f05b96b1e2a7e8dec1c
This commit is contained in:
commit
b1e8caba31
1 changed files with 4 additions and 1 deletions
|
@ -136,6 +136,7 @@ func (m TestingModule) Description(desc string) BuildParams {
|
|||
}
|
||||
|
||||
func (m TestingModule) Output(file string) BuildParams {
|
||||
var searchedOutputs []string
|
||||
for _, p := range m.module.BuildParamsForTests() {
|
||||
outputs := append(WritablePaths(nil), p.Outputs...)
|
||||
if p.Output != nil {
|
||||
|
@ -145,7 +146,9 @@ func (m TestingModule) Output(file string) BuildParams {
|
|||
if f.String() == file || f.Rel() == file {
|
||||
return p
|
||||
}
|
||||
searchedOutputs = append(searchedOutputs, f.Rel())
|
||||
}
|
||||
}
|
||||
panic(fmt.Errorf("couldn't find output %q", file))
|
||||
panic(fmt.Errorf("couldn't find output %q.\nall outputs: %v",
|
||||
file, searchedOutputs))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue