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

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

Change-Id: I1fdaa8bb01ac6138c8c4f733424ad527499cbbd1
This commit is contained in:
Paul Duffin
2021-03-15 18:04:19 +00:00
committed by Automerger Merge Worker

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.