]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Skip the --lz4 test if libarchive was compiled without the library
authorTim Kientzle <kientzle@acm.org>
Mon, 26 Jan 2015 05:51:16 +0000 (21:51 -0800)
committerTim Kientzle <kientzle@acm.org>
Mon, 26 Jan 2015 05:51:16 +0000 (21:51 -0800)
and this platform does not have an lz4 executable.

It seems there should be a better way to handle this.... <sigh>

cpio/test/test_option_lz4.c
tar/test/test_option_lz4.c

index 5889d22629812ff79f712de3b719849cf4b23927..889c1461271aa8be82b962ed424f7932d86c696f 100644 (file)
@@ -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;
index 3ebe343a3beb15fd6114790aca1e044cd0f4de90..e933eb4a351843c211fe84bb22cc5f2be1a68ec9 100644 (file)
@@ -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;