Merge "Convert testJavaError to test fixtures" am: 56372081ed

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634622

Change-Id: I82e90bcaf17b358aaa72b7c5c79fb0911282edff
This commit is contained in:
Paul Duffin 2021-03-15 17:45:29 +00:00 committed by Automerger Merge Worker
commit c0acd402ef
1 changed files with 5 additions and 1 deletions

View File

@ -147,7 +147,11 @@ func run(t *testing.T, ctx *android.TestContext, config android.Config) {
// deprecated
func testJavaError(t *testing.T, pattern string, bp string) (*android.TestContext, android.Config) {
t.Helper()
return testJavaErrorWithConfig(t, pattern, testConfig(nil, bp, nil))
result := javaFixtureFactory.
Extend(dexpreopt.PrepareForTestWithDexpreopt).
ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern(pattern)).
RunTestWithBp(t, bp)
return result.TestContext, result.Config
}
// testJavaErrorWithConfig is a legacy way of running tests of java modules that expect errors.