all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 3feaa75bd0e764a7b9d9bc3e781f98ac0a957d02 2906 bytes (raw)
name: gnu/packages/patches/glib-testfilemonitor-Skip-if-we-are-avoiding-flaky-tests.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
 
On powerpc64le-linux, testfilemonitor fails approximately 2 out of 3 times.
Patch obtained from:

https://sources.debian.org/patches/glib2.0/2.66.8-1/debian/testfilemonitor-Skip-if-we-are-avoiding-flaky-tests.patch/

From: Simon McVittie <smcv@debian.org>
Date: Tue, 25 Feb 2020 10:45:07 +0000
Subject: testfilemonitor: Skip if we are avoiding flaky tests

See https://gitlab.gnome.org/GNOME/glib/issues/1634

Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: no
---
 gio/tests/testfilemonitor.c | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/gio/tests/testfilemonitor.c b/gio/tests/testfilemonitor.c
index b74dc2b..79b5776 100644
--- a/gio/tests/testfilemonitor.c
+++ b/gio/tests/testfilemonitor.c
@@ -21,6 +21,12 @@ setup (Fixture       *fixture,
   gchar *path = NULL;
   GError *local_error = NULL;
 
+  if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
+    {
+      g_test_skip ("https://gitlab.gnome.org/GNOME/glib/issues/1634");
+      return;
+    }
+
   path = g_dir_make_tmp ("gio-test-testfilemonitor_XXXXXX", &local_error);
   g_assert_no_error (local_error);
 
@@ -37,7 +43,9 @@ teardown (Fixture       *fixture,
 {
   GError *local_error = NULL;
 
-  g_file_delete (fixture->tmp_dir, NULL, &local_error);
+  if (fixture->tmp_dir != NULL)
+    g_file_delete (fixture->tmp_dir, NULL, &local_error);
+
   g_assert_no_error (local_error);
   g_clear_object (&fixture->tmp_dir);
 }
@@ -360,6 +368,10 @@ test_atomic_replace (Fixture       *fixture,
   GError *error = NULL;
   TestData data;
 
+  /* respect g_test_skip() during setup() */
+  if (g_test_failed ())
+    return;
+
   data.step = 0;
   data.events = NULL;
 
@@ -465,6 +477,10 @@ test_file_changes (Fixture       *fixture,
   GError *error = NULL;
   TestData data;
 
+  /* respect g_test_skip() during setup() */
+  if (g_test_failed ())
+    return;
+
   data.step = 0;
   data.events = NULL;
 
@@ -582,6 +598,10 @@ test_dir_monitor (Fixture       *fixture,
   GError *error = NULL;
   TestData data;
 
+  /* respect g_test_skip() during setup() */
+  if (g_test_failed ())
+    return;
+
   data.step = 0;
   data.events = NULL;
 
@@ -679,6 +699,10 @@ test_dir_non_existent (Fixture       *fixture,
   TestData data;
   GError *error = NULL;
 
+  /* respect g_test_skip() during setup() */
+  if (g_test_failed ())
+    return;
+
   data.step = 0;
   data.events = NULL;
 
@@ -788,6 +812,10 @@ test_cross_dir_moves (Fixture       *fixture,
   GError *error = NULL;
   TestData data[2];
 
+  /* respect g_test_skip() during setup() */
+  if (g_test_failed ())
+    return;
+
   data[0].step = 0;
   data[0].events = NULL;
 
@@ -957,6 +985,10 @@ test_file_hard_links (Fixture       *fixture,
   GError *error = NULL;
   TestData data;
 
+  /* respect g_test_skip() during setup() */
+  if (g_test_failed ())
+    return;
+
   g_test_bug ("755721");
 
 #ifdef HAVE_LINK

debug log:

solving 3feaa75bd0e7 ...
found 3feaa75bd0e7 in https://yhetil.org/guix/20211012160312.158351-1-bauermann@kolabnow.com/

applying [1/1] https://yhetil.org/guix/20211012160312.158351-1-bauermann@kolabnow.com/
diff --git a/gnu/packages/patches/glib-testfilemonitor-Skip-if-we-are-avoiding-flaky-tests.patch b/gnu/packages/patches/glib-testfilemonitor-Skip-if-we-are-avoiding-flaky-tests.patch
new file mode 100644
index 000000000000..3feaa75bd0e7

1:31: trailing whitespace.
 
1:40: trailing whitespace.
 
1:44: trailing whitespace.
 
1:55: trailing whitespace.
 
1:62: trailing whitespace.
 
Checking patch gnu/packages/patches/glib-testfilemonitor-Skip-if-we-are-avoiding-flaky-tests.patch...
Applied patch gnu/packages/patches/glib-testfilemonitor-Skip-if-we-are-avoiding-flaky-tests.patch cleanly.
warning: squelched 10 whitespace errors
warning: 15 lines add whitespace errors.

index at:
100644 3feaa75bd0e764a7b9d9bc3e781f98ac0a957d02	gnu/packages/patches/glib-testfilemonitor-Skip-if-we-are-avoiding-flaky-tests.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.