diff options
Diffstat (limited to 'android/testing.go')
-rw-r--r-- | android/testing.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/android/testing.go b/android/testing.go index ae012b06..6e80c532 100644 --- a/android/testing.go +++ b/android/testing.go @@ -18,6 +18,7 @@ import ( "fmt" "path/filepath" "strings" + "testing" "github.com/google/blueprint" ) @@ -152,3 +153,13 @@ func (m TestingModule) Output(file string) BuildParams { panic(fmt.Errorf("couldn't find output %q.\nall outputs: %v", file, searchedOutputs)) } + +func FailIfErrored(t *testing.T, errs []error) { + t.Helper() + if len(errs) > 0 { + for _, err := range errs { + t.Error(err) + } + t.FailNow() + } +} |