summaryrefslogtreecommitdiff
path: root/tests/zip/BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zip/BUILD')
-rw-r--r--tests/zip/BUILD49
1 files changed, 44 insertions, 5 deletions
diff --git a/tests/zip/BUILD b/tests/zip/BUILD
index 0a545ec..0727b2e 100644
--- a/tests/zip/BUILD
+++ b/tests/zip/BUILD
@@ -13,12 +13,12 @@
# limitations under the License.
# -*- coding: utf-8 -*-
+load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
+load("@rules_python//python:defs.bzl", "py_library", "py_test")
load("//pkg:mappings.bzl", "pkg_attributes", "pkg_mkdirs", "pkg_mklink")
load("//pkg:zip.bzl", "pkg_zip")
load("//tests:my_package_name.bzl", "my_package_naming")
-load("//tests/util:defs.bzl", "directory", "fake_artifact")
-load("@rules_python//python:defs.bzl", "py_library", "py_test")
-load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
+load("//tests/util:defs.bzl", "directory")
package(default_applicable_licenses = ["//:license"])
@@ -29,9 +29,10 @@ py_library(
srcs = [
"zip_test_lib.py",
],
+ imports = ["../.."],
srcs_version = "PY3",
deps = [
- "@bazel_tools//tools/python/runfiles",
+ "@rules_python//python/runfiles",
],
)
@@ -235,6 +236,40 @@ pkg_zip(
package_variables = ":my_package_variables",
)
+# Different compressions
+pkg_zip(
+ name = "test_zip_deflated_level_3",
+ srcs = [
+ "//tests:testdata/loremipsum.txt",
+ ],
+ compression_level = 3,
+ compression_type = "deflated",
+)
+
+pkg_zip(
+ name = "test_zip_bzip2",
+ srcs = [
+ "//tests:testdata/loremipsum.txt",
+ ],
+ compression_type = "bzip2",
+)
+
+pkg_zip(
+ name = "test_zip_lzma",
+ srcs = [
+ "//tests:testdata/loremipsum.txt",
+ ],
+ compression_type = "lzma",
+)
+
+pkg_zip(
+ name = "test_zip_stored",
+ srcs = [
+ "//tests:testdata/loremipsum.txt",
+ ],
+ compression_type = "stored",
+)
+
py_test(
name = "zip_test",
srcs = [
@@ -246,10 +281,14 @@ py_test(
":test-zip-strip_prefix-none.zip",
":test-zip-strip_prefix-zipcontent.zip",
":test_zip_basic.zip",
+ ":test_zip_bzip2",
+ ":test_zip_deflated_level_3",
":test_zip_empty.zip",
+ ":test_zip_lzma",
":test_zip_package_dir0.zip",
":test_zip_package_dir_substitution.zip",
":test_zip_permissions.zip",
+ ":test_zip_stored",
":test_zip_timestamp.zip",
":test_zip_tree.zip",
],
@@ -284,7 +323,7 @@ py_test(
pkg_zip(
name = "unicode_names",
- srcs = ["//tests:utf8_files"]
+ srcs = ["//tests:utf8_files"],
)
py_test(