From cf371cc1f73f2c4ac0dc824d16160648b9b1d952 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 13 Nov 2020 11:48:42 -0800 Subject: Replace android.WriteFile rule with android.WriteFileRule The android.WriteFile rule takes careful escaping to produce the right contents. Wrap it in an android.WriteFileRule that handles the escaping. Test: compare all android.WriteFile outputs Change-Id: If71a5843af47a37ca61714e1a1ebb32d08536c31 --- apex/apex_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apex/apex_test.go') diff --git a/apex/apex_test.go b/apex/apex_test.go index 532a7aaaf..321883f2c 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -5574,7 +5574,7 @@ func TestAppBundle(t *testing.T) { } `, withManifestPackageNameOverrides([]string{"AppFoo:com.android.foo"})) - bundleConfigRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Description("Bundle Config") + bundleConfigRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Output("bundle_config.json") content := bundleConfigRule.Args["content"] ensureContains(t, content, `"compression":{"uncompressed_glob":["apex_payload.img","apex_manifest.*"]}`) @@ -5600,7 +5600,7 @@ func TestAppSetBundle(t *testing.T) { set: "AppSet.apks", }`) mod := ctx.ModuleForTests("myapex", "android_common_myapex_image") - bundleConfigRule := mod.Description("Bundle Config") + bundleConfigRule := mod.Output("bundle_config.json") content := bundleConfigRule.Args["content"] ensureContains(t, content, `"compression":{"uncompressed_glob":["apex_payload.img","apex_manifest.*"]}`) s := mod.Rule("apexRule").Args["copy_commands"] -- cgit v1.2.3-59-g8ed1b