[glib: 3/9] gio/tests: skip filemonitor tests on win32




commit e014b9272a966fadef69ac283401ae1705b475df
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Mon Jan 24 02:07:28 2022 +0400

    gio/tests: skip filemonitor tests on win32
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 gio/tests/testfilemonitor.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
---
diff --git a/gio/tests/testfilemonitor.c b/gio/tests/testfilemonitor.c
index a52ade715..a47aeab38 100644
--- a/gio/tests/testfilemonitor.c
+++ b/gio/tests/testfilemonitor.c
@@ -4,6 +4,17 @@
 #include <stdlib.h>
 #include <gio/gio.h>
 
+static gboolean
+skip_win32 (void)
+{
+#ifdef G_OS_WIN32
+  g_test_skip ("FIXME, test is broken on win32");
+  return TRUE;
+#else
+  return FALSE;
+#endif
+}
+
 /* These tests were written for the inotify implementation.
  * Other implementations may require slight adjustments in
  * the tests, e.g. the length of timeouts
@@ -361,6 +372,9 @@ test_atomic_replace (Fixture       *fixture,
   GError *error = NULL;
   TestData data;
 
+  if (skip_win32 ())
+    return;
+
   data.step = 0;
   data.events = NULL;
 
@@ -466,6 +480,9 @@ test_file_changes (Fixture       *fixture,
   GError *error = NULL;
   TestData data;
 
+  if (skip_win32 ())
+    return;
+
   data.step = 0;
   data.events = NULL;
 
@@ -583,6 +600,9 @@ test_dir_monitor (Fixture       *fixture,
   GError *error = NULL;
   TestData data;
 
+  if (skip_win32 ())
+    return;
+
   data.step = 0;
   data.events = NULL;
 
@@ -680,6 +700,9 @@ test_dir_non_existent (Fixture       *fixture,
   TestData data;
   GError *error = NULL;
 
+  if (skip_win32 ())
+    return;
+
   data.step = 0;
   data.events = NULL;
 
@@ -789,6 +812,9 @@ test_cross_dir_moves (Fixture       *fixture,
   GError *error = NULL;
   TestData data[2];
 
+  if (skip_win32 ())
+    return;
+
   data[0].step = 0;
   data[0].events = NULL;
 
@@ -960,6 +986,9 @@ test_file_hard_links (Fixture       *fixture,
 
   g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=755721";);
 
+  if (skip_win32 ())
+    return;
+
 #ifdef HAVE_LINK
   g_test_message ("Running with hard link tests");
 #else  /* if !HAVE_LINK */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]