diff options
author | kientzle <kientzle@FreeBSD.org> | 2007-07-06 15:43:11 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2007-07-06 15:43:11 +0000 |
commit | 627342641db59a7eaa904ec6654e5622fb4653eb (patch) | |
tree | b17c1fbc8f181078146027ab4987cac1af8c73a3 /lib/libarchive/test/test_write_disk.c | |
parent | 8f8c5c97731ba5f5874c4278189ec2138711e819 (diff) | |
download | FreeBSD-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_disk.c')
-rw-r--r-- | lib/libarchive/test/test_write_disk.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libarchive/test/test_write_disk.c b/lib/libarchive/test/test_write_disk.c index a2d95bb..6b28830 100644 --- a/lib/libarchive/test/test_write_disk.c +++ b/lib/libarchive/test/test_write_disk.c @@ -25,6 +25,8 @@ #include "test.h" __FBSDID("$FreeBSD$"); +#if ARCHIVE_VERSION_STAMP >= 1009000 + #define UMASK 022 static void create(struct archive_entry *ae, const char *msg) @@ -48,9 +50,13 @@ static void create(struct archive_entry *ae, const char *msg) st.st_mode, archive_entry_mode(ae)); assert(st.st_mode == (archive_entry_mode(ae) & ~UMASK)); } +#endif DEFINE_TEST(test_write_disk) { +#if ARCHIVE_VERSION_STAMP < 1009000 + skipping("archive_write_disk interface"); +#else struct archive_entry *ae; /* Force the umask to something predictable. */ @@ -90,4 +96,5 @@ DEFINE_TEST(test_write_disk) archive_entry_set_mode(ae, S_IFREG | 0744); create(ae, "Test creating a file over an existing dir."); archive_entry_free(ae); +#endif } |