From: Tim Kientzle Date: Sun, 23 Oct 2016 23:23:39 +0000 (-0700) Subject: Skip Zip high-compression test if zlib is not available X-Git-Tag: v3.2.2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76bf634ad64652093c625905e53a1e194f511290;p=thirdparty%2Flibarchive.git Skip Zip high-compression test if zlib is not available --- diff --git a/libarchive/test/test_read_format_zip_high_compression.c b/libarchive/test/test_read_format_zip_high_compression.c index 6c8aa8eee..42faed378 100644 --- a/libarchive/test/test_read_format_zip_high_compression.c +++ b/libarchive/test/test_read_format_zip_high_compression.c @@ -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);