diff options
author | 2017-05-04 17:44:51 -0400 | |
---|---|---|
committer | 2017-05-04 19:04:18 -0400 | |
commit | 4008ee22db08dbe97cbddb712ca9684a1e81b5bc (patch) | |
tree | 1294c450a41b1d866de27fd0ed733dd0e692e825 /tools | |
parent | 4b7aae4907dc3fa24659444c28ee984c8a519d36 (diff) |
Stop using zip and unzip in android shell tests.
Also, open source two more tests.
RELNOTES: None
PiperOrigin-RevId: 155129416
Diffstat (limited to 'tools')
-rw-r--r-- | tools/android/BUILD | 39 | ||||
-rwxr-xr-x | tools/android/zip_manifest_creator_test.sh | 8 |
2 files changed, 42 insertions, 5 deletions
diff --git a/tools/android/BUILD b/tools/android/BUILD index d883031882..19155c29f5 100644 --- a/tools/android/BUILD +++ b/tools/android/BUILD @@ -18,6 +18,23 @@ py_test( ) py_binary( + name = "build_incremental_dexmanifest", + srcs = [":build_incremental_dexmanifest.py"], +) + +sh_test( + name = "build_incremental_dexmanifest_test", + srcs = [ + "build_incremental_dexmanifest_test.sh", + ], + args = ["$(location //tools/zip:zipper)"], + data = [ + ":build_incremental_dexmanifest", + "//tools/zip:zipper", + ], +) + +py_binary( name = "build_split_manifest", srcs = ["build_split_manifest.py"], deps = [ @@ -52,6 +69,22 @@ py_test( ) py_binary( + name = "strip_resources", + srcs = ["strip_resources.py"], + deps = ["//third_party/py/gflags"], +) + +sh_test( + name = "strip_resources_test", + srcs = ["strip_resources_test.sh"], + args = ["$(location //tools/zip:zipper)"], + data = [ + ":strip_resources", + "//tools/zip:zipper", + ], +) + +py_binary( name = "aar_native_libs_zip_creator", srcs = [ "aar_native_libs_zip_creator.py", @@ -97,7 +130,11 @@ sh_test( name = "zip_manifest_creator_test", size = "small", srcs = ["zip_manifest_creator_test.sh"], - data = [":zip_manifest_creator"], + args = ["$(location //tools/zip:zipper)"], + data = [ + ":zip_manifest_creator", + "//tools/zip:zipper", + ], ) py_binary( diff --git a/tools/android/zip_manifest_creator_test.sh b/tools/android/zip_manifest_creator_test.sh index d102b1ab2f..001056ed8c 100755 --- a/tools/android/zip_manifest_creator_test.sh +++ b/tools/android/zip_manifest_creator_test.sh @@ -14,8 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +set -eux + export RUNFILES=${RUNFILES:-$($(cd $(dirname ${BASH_SOURCE[0]})); pwd)} CUT="$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)/zip_manifest_creator" +ZIPPER=$(pwd)/$1 cd $TEST_TMPDIR touch classes.jar @@ -24,10 +27,7 @@ mkdir -p res/values touch res/values/bar.xml touch res/values/baz.xml -zip -q foo.zip classes.jar -zip -q foo.zip AndroidManifest.xml -zip -q foo.zip res/values/bar.xml -zip -q foo.zip res/values/baz.xml +$ZIPPER c foo.zip classes.jar AndroidManifest.xml res/values/* $CUT 'res/.*' foo.zip actual.manifest |