diff options
| author | 2021-03-01 17:04:53 +0000 | |
|---|---|---|
| committer | 2021-03-01 17:04:53 +0000 | |
| commit | c572b5bf62ba925e017fed347a40903fb0268f09 (patch) | |
| tree | 10daa938277b800c84371585ea79ffb972603af1 /java/java_test.go | |
| parent | 69804ac3886c7ef1d787efea029f2d62cef203b0 (diff) | |
| parent | ec0fe1775b726f852839729ecc16adff1dcffe4d (diff) | |
Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar"
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/java/java_test.go b/java/java_test.go index 8407f2462..bb51ebc3d 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -114,20 +114,26 @@ func testJavaErrorWithConfig(t *testing.T, pattern string, config android.Config pathCtx := android.PathContextForTesting(config) dexpreopt.SetTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx)) + runWithErrors(t, ctx, config, pattern) + + return ctx, config +} + +func runWithErrors(t *testing.T, ctx *android.TestContext, config android.Config, pattern string) { ctx.Register() _, errs := ctx.ParseBlueprintsFiles("Android.bp") if len(errs) > 0 { android.FailIfNoMatchingErrors(t, pattern, errs) - return ctx, config + return } _, errs = ctx.PrepareBuildActions(config) if len(errs) > 0 { android.FailIfNoMatchingErrors(t, pattern, errs) - return ctx, config + return } t.Fatalf("missing expected error %q (0 errors are returned)", pattern) - return ctx, config + return } func testJavaWithFS(t *testing.T, bp string, fs map[string][]byte) (*android.TestContext, android.Config) { |