diff options
author | 2021-03-24 08:25:20 +0000 | |
---|---|---|
committer | 2021-03-24 08:25:20 +0000 | |
commit | b6535d329f4fcf67ceedacdd900517d510c96972 (patch) | |
tree | be4412e19d4b6075dca3f9bb2041f3a2180968a3 /java/app_test.go | |
parent | 9d33cf237afcb7fc42ca9ebfa87089d2bc67c4ed (diff) | |
parent | 71ae59412b6667210e11d3fb21971153ecbf3183 (diff) |
Merge "Remove javaFixtureFactory"
Diffstat (limited to 'java/app_test.go')
-rw-r--r-- | java/app_test.go | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/java/app_test.go b/java/app_test.go index 609ddf1a8..252353364 100644 --- a/java/app_test.go +++ b/java/app_test.go @@ -29,14 +29,14 @@ import ( "android/soong/genrule" ) -// testApp runs tests using the javaFixtureFactory +// testApp runs tests using the prepareForJavaTest // // See testJava for an explanation as to how to stop using this deprecated method. // // deprecated func testApp(t *testing.T, bp string) *android.TestContext { t.Helper() - result := javaFixtureFactory.RunTestWithBp(t, bp) + result := prepareForJavaTest.RunTestWithBp(t, bp) return result.TestContext } @@ -55,7 +55,8 @@ func TestApp(t *testing.T) { for _, moduleType := range []string{"android_app", "android_library"} { t.Run(moduleType, func(t *testing.T) { - result := javaFixtureFactory.Extend( + result := android.GroupFixturePreparers( + prepareForJavaTest, android.FixtureModifyMockFS(func(fs android.MockFS) { for _, file := range resourceFiles { fs[file] = nil @@ -364,8 +365,8 @@ func TestUpdatableApps(t *testing.T) { if test.expectedError != "" { errorHandler = android.FixtureExpectsAtLeastOneErrorMatchingPattern(test.expectedError) } - javaFixtureFactory. - Extend(FixtureWithPrebuiltApis(map[string][]string{ + android.GroupFixturePreparers( + prepareForJavaTest, FixtureWithPrebuiltApis(map[string][]string{ "29": {"foo"}, })). ExtendWithErrorHandler(errorHandler).RunTestWithBp(t, test.bp) @@ -1063,7 +1064,8 @@ func TestAppSdkVersion(t *testing.T) { %s }`, moduleType, test.sdkVersion, platformApiProp) - result := javaFixtureFactory.Extend( + result := android.GroupFixturePreparers( + prepareForJavaTest, android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) { variables.Platform_sdk_version = &test.platformSdkInt variables.Platform_sdk_codename = &test.platformSdkCodename @@ -1131,7 +1133,8 @@ func TestVendorAppSdkVersion(t *testing.T) { vendor: true, }`, moduleType, sdkKind, test.sdkVersion) - result := javaFixtureFactory.Extend( + result := android.GroupFixturePreparers( + prepareForJavaTest, android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) { variables.Platform_sdk_version = &test.platformSdkInt variables.Platform_sdk_codename = &test.platformSdkCodename @@ -2331,7 +2334,8 @@ func TestUsesLibraries(t *testing.T) { } ` - result := javaFixtureFactory.Extend( + result := android.GroupFixturePreparers( + prepareForJavaTest, PrepareForTestWithJavaSdkLibraryFiles, FixtureWithLastReleaseApis("runtime-library", "foo", "quuz", "qux", "bar", "fred"), android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) { @@ -2681,7 +2685,8 @@ func TestUncompressDex(t *testing.T) { test := func(t *testing.T, bp string, want bool, unbundled bool) { t.Helper() - result := javaFixtureFactory.Extend( + result := android.GroupFixturePreparers( + prepareForJavaTest, PrepareForTestWithPrebuiltsOfCurrentApi, android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) { if unbundled { |