diff options
author | 2021-12-17 07:36:53 +0000 | |
---|---|---|
committer | 2021-12-17 07:36:53 +0000 | |
commit | dbd3553d83866e198e6980146b9e6c2b2fe96e11 (patch) | |
tree | 9a76ef9c55f4891e9303f297d51bbc9147f5f27d /java/rro_test.go | |
parent | 126fc68a920c9bc9732a7186301111c50d89a370 (diff) | |
parent | 8ef2179a6e5416a2a03893d54d021ee48846c150 (diff) |
Merge "Remove InstallBypassMake and ToMakePath" am: f1228f570a am: a9f335cf5a am: fd865c6688 am: 8ef2179a6e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1889722
Change-Id: If49c894804c5ca0dfd197ca848ff1c9ac79556f4
Diffstat (limited to 'java/rro_test.go')
-rw-r--r-- | java/rro_test.go | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/java/rro_test.go b/java/rro_test.go index 2d76a4d2f..00ba5ba11 100644 --- a/java/rro_test.go +++ b/java/rro_test.go @@ -63,6 +63,7 @@ func TestRuntimeResourceOverlay(t *testing.T) { result := android.GroupFixturePreparers( PrepareForTestWithJavaDefaultModules, PrepareForTestWithOverlayBuildComponents, + android.FixtureModifyConfig(android.SetKatiEnabledForTests), fs.AddToFixture(), ).RunTestWithBp(t, bp) @@ -129,7 +130,10 @@ func TestRuntimeResourceOverlay(t *testing.T) { } func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) { - ctx, config := testJava(t, ` + result := android.GroupFixturePreparers( + PrepareForTestWithJavaDefaultModules, + android.FixtureModifyConfig(android.SetKatiEnabledForTests), + ).RunTestWithBp(t, ` java_defaults { name: "rro_defaults", theme: "default_theme", @@ -150,7 +154,7 @@ func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) { // // RRO module with defaults // - m := ctx.ModuleForTests("foo_with_defaults", "android_common") + m := result.ModuleForTests("foo_with_defaults", "android_common") // Check AAPT2 link flags. aapt2Flags := strings.Split(m.Output("package-res.apk").Args["flags"], " ") @@ -161,14 +165,14 @@ func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) { } // Check device location. - path := android.AndroidMkEntriesForTest(t, ctx, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"] + path := android.AndroidMkEntriesForTest(t, result.TestContext, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"] expectedPath := []string{shared.JoinPath("out/target/product/test_device/product/overlay/default_theme")} - android.AssertStringPathsRelativeToTopEquals(t, "LOCAL_MODULE_PATH", config, expectedPath, path) + android.AssertStringPathsRelativeToTopEquals(t, "LOCAL_MODULE_PATH", result.Config, expectedPath, path) // // RRO module without defaults // - m = ctx.ModuleForTests("foo_barebones", "android_common") + m = result.ModuleForTests("foo_barebones", "android_common") // Check AAPT2 link flags. aapt2Flags = strings.Split(m.Output("package-res.apk").Args["flags"], " ") @@ -178,9 +182,9 @@ func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) { } // Check device location. - path = android.AndroidMkEntriesForTest(t, ctx, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"] + path = android.AndroidMkEntriesForTest(t, result.TestContext, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"] expectedPath = []string{shared.JoinPath("out/target/product/test_device/product/overlay")} - android.AssertStringPathsRelativeToTopEquals(t, "LOCAL_MODULE_PATH", config, expectedPath, path) + android.AssertStringPathsRelativeToTopEquals(t, "LOCAL_MODULE_PATH", result.Config, expectedPath, path) } func TestOverrideRuntimeResourceOverlay(t *testing.T) { |