guix/gnu/packages/patches/glib-tests-timer.patch
宋文武 7c951767c0 gnu: glib: Disable tests in build phases instead of patches.
* gnu/packages/glib.scm (glib)[sources]: Remove glib-tests-desktop.patch,
glib-tests-prlimit.patch and glib-tests-gapplicatiotn.patch.
[arguments]: Add 'disable-falling-tests' phase.
* gnu/packages/patches/glib-tests-timer.patch: Adjust accordingly.
* gnu/packages/patches/glib-tests-desktop.patch,
  gnu/packages/patches/glib-tests-gapplication.patch,
  gnu/packages/patches/glib-tests-prlimit.patch: Remove files.
* gnu-system.am (dist_patch_DATA): Remove them.
2016-04-16 11:44:24 +02:00

16 lines
604 B
Diff

* On i686 floating-point roundoff errors could sometimes cause this check to
fail depending on the elapsed microseconds. Improve rounding by adding a
fractional bit.
--- glib-2.40.0/glib/tests/timer.c 2014-03-05 08:05:42.000000000 -0600
+++ glib-2.40.0/glib/tests/timer.c 2014-07-10 16:33:12.746862822 -0500
@@ -35,7 +35,7 @@
elapsed = g_timer_elapsed (timer, &micros);
g_assert_cmpfloat (elapsed, <, 1.0);
- g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6)) % 1000000);
+ g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6 + 0.5)) % 1000000);
g_timer_destroy (timer);
}