From 808a4f29990d267069fe93ac8887954e0dcc9c3f Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Thu, 17 Jun 2021 19:15:09 +0000 Subject: [PATCH] Unzip apk in $(genDir) instead of inside source tree Android source tree will eventually be made ReadOnly with /tmp and /out as ReadWrite directories This CL will ensure that the file extracted during the test will be written to the sandbox dir $(genDir) instead of $TOP Formatting changes are due to bpfmt Bug: 174726238 Test: Built a target in git_master in a RO source tree 1. Before CL, we get this error "error: cannot create resources.arsc Read-only file system" 2. After CL, the above error is fixed Change-Id: I012284a5835603c54bc2a8bde585a01a4325c43a --- .../perftests/core/apps/reources_manager/Android.bp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apct-tests/perftests/core/apps/reources_manager/Android.bp b/apct-tests/perftests/core/apps/reources_manager/Android.bp index 85dd0c4be48d..766b8c455d23 100644 --- a/apct-tests/perftests/core/apps/reources_manager/Android.bp +++ b/apct-tests/perftests/core/apps/reources_manager/Android.bp @@ -23,15 +23,15 @@ package { android_test_helper_app { name: "LargeResourcesCompressed", - static_libs: [ "androidx.appcompat_appcompat" ], + static_libs: ["androidx.appcompat_appcompat"], } genrule { name: "LargeResourcesUncompressed", - srcs: [ ":LargeResourcesCompressed" ], + srcs: [":LargeResourcesCompressed"], out: ["LargeResourcesUncompressed.apk"], - cmd: "cp $(in) $(out) && unzip -o $(out) resources.arsc" - + " && zip $(out) resources.arsc" + cmd: "cp $(in) $(out) && unzip -o $(out) resources.arsc -d $(genDir)" + + " && zip -j $(out) $(genDir)/resources.arsc", } java_library {