]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Skip match_time tests when running on Windows, since the ctime can't be set
authorZack Weger <ZWeger@StrozFriedberg.com>
Fri, 12 Oct 2018 15:36:44 +0000 (11:36 -0400)
committerJoel Uckelman <juckelman@strozfriedberg.co.uk>
Wed, 1 Jun 2022 10:51:59 +0000 (11:51 +0100)
libarchive/test/test_archive_match_time.c

index c6864b3265e40ebe2b82fb35373d93e0f767baf6..23754a1538b18664c5e846d628d328513981146b 100644 (file)
@@ -321,6 +321,11 @@ test_newer_ctime_than_file_mbs(void)
        struct archive_entry *ae;
        struct archive *m;
 
+#if defined(_WIN32) && !defined(__CYGWIN__)
+        skipping("Can't set ctime on Windows");
+        return;
+#endif
+
        if (!assert((m = archive_match_new()) != NULL))
                return;
        if (!assert((ae = archive_entry_new()) != NULL)) {
@@ -435,6 +440,11 @@ test_newer_ctime_than_file_wcs(void)
        struct archive_entry *ae;
        struct archive *m;
 
+#if defined(_WIN32) && !defined(__CYGWIN__)
+        skipping("Can't set ctime on Windows");
+        return;
+#endif
+
        if (!assert((m = archive_match_new()) != NULL))
                return;
        if (!assert((ae = archive_entry_new()) != NULL)) {
@@ -782,6 +792,11 @@ test_older_ctime_than_file_mbs(void)
        struct archive_entry *ae;
        struct archive *m;
 
+#if defined(_WIN32) && !defined(__CYGWIN__)
+        skipping("Can't set ctime on Windows");
+        return;
+#endif
+
        if (!assert((m = archive_match_new()) != NULL))
                return;
        if (!assert((ae = archive_entry_new()) != NULL)) {
@@ -897,6 +912,11 @@ test_older_ctime_than_file_wcs(void)
        struct archive_entry *ae;
        struct archive *m;
 
+#if defined(_WIN32) && !defined(__CYGWIN__)
+        skipping("Can't set ctime on Windows");
+        return;
+#endif
+
        if (!assert((m = archive_match_new()) != NULL))
                return;
        if (!assert((ae = archive_entry_new()) != NULL)) {
@@ -1073,6 +1093,11 @@ test_ctime_between_files_mbs(void)
        struct archive_entry *ae;
        struct archive *m;
 
+#if defined(_WIN32) && !defined(__CYGWIN__)
+        skipping("Can't set ctime on Windows");
+        return;
+#endif
+
        if (!assert((m = archive_match_new()) != NULL))
                return;
        if (!assert((ae = archive_entry_new()) != NULL)) {
@@ -1132,6 +1157,11 @@ test_ctime_between_files_wcs(void)
        struct archive_entry *ae;
        struct archive *m;
 
+#if defined(_WIN32) && !defined(__CYGWIN__)
+        skipping("Can't set ctime on Windows");
+        return;
+#endif
+
        if (!assert((m = archive_match_new()) != NULL))
                return;
        if (!assert((ae = archive_entry_new()) != NULL)) {