]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Skip Zip high-compression test if zlib is not available
authorTim Kientzle <kientzle@acm.org>
Sun, 23 Oct 2016 23:23:39 +0000 (16:23 -0700)
committerTim Kientzle <kientzle@acm.org>
Sun, 23 Oct 2016 23:23:39 +0000 (16:23 -0700)
libarchive/test/test_read_format_zip_high_compression.c

index 6c8aa8eee1b2adfae11edca8f136fa1cf4161dba..42faed378f6d951fcb21f2cb1e6c91dadad44def 100644 (file)
@@ -50,6 +50,11 @@ DEFINE_TEST(test_read_format_zip_high_compression)
        size_t s;
        int64_t o;
 
+       if (archive_zlib_version() == NULL) {
+               skipping("Zip compression test requires zlib");
+               return;
+       }
+
        extract_reference_file(refname);
        p = slurpfile(&archive_size, refname);
 
@@ -82,6 +87,11 @@ DEFINE_TEST(test_read_format_zip_high_compression2)
        char *body, *body_read, *buff;
        int n;
 
+       if (archive_zlib_version() == NULL) {
+               skipping("Zip compression test requires zlib");
+               return;
+       }
+
        assert((body = malloc(body_size)) != NULL);
        assert((body_read = malloc(body_size)) != NULL);
        assert((buff = malloc(buff_size)) != NULL);