diff options
| author | Logan Chien <loganchien@google.com> | 2018-03-16 01:57:31 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-03-16 01:57:31 +0000 |
| commit | 45d4f09f2fff71532e276281af0597515cca058f (patch) | |
| tree | 7a4d084bf23f836ec53ce17f80f5a8dbb93f21cc /python/python_test.go | |
| parent | 1eb9f090e038160489af46b3ad18d8f187caa3e2 (diff) | |
| parent | af29bada75a542bc08ce0fe7f410917dbfa2b3b2 (diff) | |
Merge changes I406c5bef,Ibde685d7,I1c09412d
* changes:
Allow VNDK extensions under vendor or device
Add unit tests for android/neverallow.go
Extract failIfErrored() to android/testing.go
Diffstat (limited to 'python/python_test.go')
| -rw-r--r-- | python/python_test.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/python/python_test.go b/python/python_test.go index 67b19827c..9ef6cb097 100644 --- a/python/python_test.go +++ b/python/python_test.go @@ -342,7 +342,7 @@ func TestPythonModule(t *testing.T) { ctx.Register() ctx.MockFileSystem(d.mockFiles) _, testErrs := ctx.ParseBlueprintsFiles(bpFile) - fail(t, testErrs) + android.FailIfErrored(t, testErrs) _, actErrs := ctx.PrepareBuildActions(config) if len(actErrs) > 0 { testErrs = append(testErrs, expectErrors(t, actErrs, d.errors)...) @@ -356,7 +356,7 @@ func TestPythonModule(t *testing.T) { e.depsSrcsZips)...) } } - fail(t, testErrs) + android.FailIfErrored(t, testErrs) }) } } @@ -442,12 +442,3 @@ func setupBuildEnv(t *testing.T) (config android.Config, buildDir string) { func tearDownBuildEnv(buildDir string) { os.RemoveAll(buildDir) } - -func fail(t *testing.T, errs []error) { - if len(errs) > 0 { - for _, err := range errs { - t.Error(err) - } - t.FailNow() - } -} |
