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
|
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Thu, 27 Sep 2012 11:22:56 +0200
Subject: Disable some tests on slow architectures which keep failing the
tests
[smcv: Modified to use g_test_skip() instead of omitting those test cases
completely, and allow them to be re-enabled with a Debian-specific
environment variable]
Co-authored-by: Simon McVittie <smcv@debian.org>
Forwarded: no
---
gio/tests/socket.c | 8 ++++++++
glib/tests/mainloop.c | 24 ++++++++++++++++++++++++
glib/tests/timeout.c | 9 +++++++++
3 files changed, 41 insertions(+)
diff --git a/gio/tests/socket.c b/gio/tests/socket.c
index 9b3adb4..e34b0d0 100644
--- a/gio/tests/socket.c
+++ b/gio/tests/socket.c
@@ -1111,6 +1111,14 @@ test_timed_wait (void)
gint64 start_time;
gint poll_duration;
+#if defined(__arm__)
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
+ {
+ g_test_skip ("Not reliable on older ARM hardware");
+ return;
+ }
+#endif
+
data = create_server (G_SOCKET_FAMILY_IPV4, echo_server_thread, FALSE, &error);
if (error != NULL)
{
diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c
index cf114fd..9beefd3 100644
--- a/glib/tests/mainloop.c
+++ b/glib/tests/mainloop.c
@@ -168,6 +168,14 @@ test_timeouts (void)
GMainLoop *loop;
GSource *source;
+#if defined(__arm__)
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
+ {
+ g_test_skip ("Not reliable on older ARM hardware");
+ return;
+ }
+#endif
+
a = b = c = 0;
ctx = g_main_context_new ();
@@ -451,6 +459,14 @@ test_child_sources (void)
GMainLoop *loop;
GSource *parent, *child_b, *child_c, *end;
+#if defined(__arm__)
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
+ {
+ g_test_skip ("Not reliable on older ARM hardware");
+ return;
+ }
+#endif
+
ctx = g_main_context_new ();
loop = g_main_loop_new (ctx, FALSE);
@@ -529,6 +545,14 @@ test_recursive_child_sources (void)
GMainLoop *loop;
GSource *parent, *child_b, *child_c, *end;
+#if defined(__arm__)
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
+ {
+ g_test_skip ("Not reliable on older ARM hardware");
+ return;
+ }
+#endif
+
ctx = g_main_context_new ();
loop = g_main_loop_new (ctx, FALSE);
diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c
index ce7dd09..d2729ae 100644
--- a/glib/tests/timeout.c
+++ b/glib/tests/timeout.c
@@ -89,6 +89,15 @@ test_func (gpointer data)
static void
test_rounding (void)
{
+
+#if defined(__arm__)
+ if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
+ {
+ g_test_skip ("Not reliable on older ARM hardware");
+ return;
+ }
+#endif
+
loop = g_main_loop_new (NULL, FALSE);
last_time = g_get_monotonic_time ();
|