From: Tim Kientzle Date: Mon, 26 Jan 2015 05:51:16 +0000 (-0800) Subject: Skip the --lz4 test if libarchive was compiled without the library X-Git-Tag: v3.1.900a~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa22d7ea4c52d8eb2e6572180489ab91b1d684d1;p=thirdparty%2Flibarchive.git Skip the --lz4 test if libarchive was compiled without the library and this platform does not have an lz4 executable. It seems there should be a better way to handle this.... --- diff --git a/cpio/test/test_option_lz4.c b/cpio/test/test_option_lz4.c index 5889d2262..889c14612 100644 --- a/cpio/test/test_option_lz4.c +++ b/cpio/test/test_option_lz4.c @@ -45,6 +45,12 @@ DEFINE_TEST(test_option_lz4) "without lz4 support"); return; } + if (strstr(p, "Can't initialise filter") != NULL + && !canLz4()) { + skipping("This version of bsdtar uses an external lz4 program " + "but no such program is available on this system."); + return; + } failure("--lz4 option is broken"); assertEqualInt(r, 0); return; diff --git a/tar/test/test_option_lz4.c b/tar/test/test_option_lz4.c index 3ebe343a3..e933eb4a3 100644 --- a/tar/test/test_option_lz4.c +++ b/tar/test/test_option_lz4.c @@ -45,6 +45,12 @@ DEFINE_TEST(test_option_lz4) "without lz4 support"); return; } + if (strstr(p, "Can't initialise filter") != NULL + && !canLz4()) { + skipping("This version of bsdtar uses an external lz4 program " + "but no such program is available on this system."); + return; + } failure("--lz4 option is broken"); assertEqualInt(r, 0); return;