summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/test/test_write_format_cpio.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2007-07-06 15:43:11 +0000
committerkientzle <kientzle@FreeBSD.org>2007-07-06 15:43:11 +0000
commit627342641db59a7eaa904ec6654e5622fb4653eb (patch)
treeb17c1fbc8f181078146027ab4987cac1af8c73a3 /lib/libarchive/test/test_write_format_cpio.c
parent8f8c5c97731ba5f5874c4278189ec2138711e819 (diff)
downloadFreeBSD-src-627342641db59a7eaa904ec6654e5622fb4653eb.zip
FreeBSD-src-627342641db59a7eaa904ec6654e5622fb4653eb.tar.gz
Make test suite work with libarchive 1.3.1: Take advantage of
ARCHIVE_VERSION_STAMP to selectively disable tests that don't apply to that version; new "skipping()" function reports skipped tests; modify final summary to report component test failures and skips. Note: I don't currently intend to MFC the test suite itself; anyone interested should just checkout and use this version of the test suite, which should work for any library version. Approved by: re (Ken Smith, blanket)
Diffstat (limited to 'lib/libarchive/test/test_write_format_cpio.c')
-rw-r--r--lib/libarchive/test/test_write_format_cpio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libarchive/test/test_write_format_cpio.c b/lib/libarchive/test/test_write_format_cpio.c
index 90bae3f..2ea40a3 100644
--- a/lib/libarchive/test/test_write_format_cpio.c
+++ b/lib/libarchive/test/test_write_format_cpio.c
@@ -25,6 +25,8 @@
#include "test.h"
__FBSDID("$FreeBSD$");
+/* The version stamp macro was introduced after cpio write support. */
+#if ARCHIVE_VERSION_STAMP >= 1009000
static void
test_format(int (*set_format)(struct archive *))
{
@@ -104,9 +106,14 @@ test_format(int (*set_format)(struct archive *))
free(buff);
}
+#endif
DEFINE_TEST(test_write_format_cpio)
{
+#if ARCHIVE_VERSION_STAMP >= 1009000
test_format(archive_write_set_format_cpio);
test_format(archive_write_set_format_cpio_newc);
+#else
+ skipping("cpio write support");
+#endif
}
OpenPOWER on IntegriCloud