File: Skip-test-which-performs-some-unreliable-floating-point-c.patch

package info (click to toggle)
glib2.0 2.84.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 66,112 kB
  • sloc: ansic: 538,924; python: 9,661; sh: 1,612; xml: 1,482; perl: 1,222; cpp: 535; makefile: 321; javascript: 11
file content (32 lines) | stat: -rw-r--r-- 940 bytes parent folder | download | duplicates (6)
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
From: Iain Lane <laney@debian.org>
Date: Tue, 18 Mar 2014 15:43:35 +0000
Subject: Skip test which performs some unreliable floating point comparisons

[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>
Bug: https://gitlab.gnome.org/GNOME/glib/issues/820
Forwarded: no
---
 glib/tests/timer.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/glib/tests/timer.c b/glib/tests/timer.c
index 5b1b43c..c09f768 100644
--- a/glib/tests/timer.c
+++ b/glib/tests/timer.c
@@ -35,6 +35,12 @@ test_timer_basic (void)
   volatile gdouble elapsed;
   gulong micros;
 
+  if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
+    {
+      g_test_skip ("Not reliable due to floating-point rounding (glib#820)");
+      return;
+    }
+
   timer = g_timer_new ();
 
   g_timer_start (timer);