Make TestModule.Output print a list of all outputs on error
am: 9cf27db425
Change-Id: Id3e6b3e4b2faee411753d4e34ce59a3cee2651ac
This commit is contained in:
commit
799ed60b06
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