r40507 - in /desktop/experimental/glib2.0/debian: changelog patches/0001-glib-tests-collate.c-run-to-completion-when-skipping.patch patches/0002-g_test_run-return-0-if-all-tests-are-skipped-in-TAP-.patch patches/series

pochu at users.alioth.debian.org pochu at users.alioth.debian.org
Sun Feb 16 09:41:54 UTC 2014


Author: pochu
Date: Sun Feb 16 09:41:54 2014
New Revision: 40507

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=40507
Log:
* d/p/0001-glib-tests-collate.c-run-to-completion-when-skipping.patch,
  d/p/0002-g_test_run-return-0-if-all-tests-are-skipped-in-TAP-.patch:
  + Add patches from upstream to fix test suite errors.

Added:
    desktop/experimental/glib2.0/debian/patches/0001-glib-tests-collate.c-run-to-completion-when-skipping.patch
    desktop/experimental/glib2.0/debian/patches/0002-g_test_run-return-0-if-all-tests-are-skipped-in-TAP-.patch
Modified:
    desktop/experimental/glib2.0/debian/changelog
    desktop/experimental/glib2.0/debian/patches/series

Modified: desktop/experimental/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/changelog?rev=40507&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/changelog	[utf-8] (original)
+++ desktop/experimental/glib2.0/debian/changelog	[utf-8] Sun Feb 16 09:41:54 2014
@@ -11,6 +11,9 @@
     d/p/tests-move-param-implement-to-m-slow.patch,
     d/p/Fix-races-in-unix-signal-dispatch.patch:
     + Dropped, applied upstream.
+  * d/p/0001-glib-tests-collate.c-run-to-completion-when-skipping.patch,
+    d/p/0002-g_test_run-return-0-if-all-tests-are-skipped-in-TAP-.patch:
+    + Add patches from upstream to fix test suite errors.
 
  -- Emilio Pozuelo Monfort <pochu at debian.org>  Sun, 16 Feb 2014 00:45:50 +0100
 

Added: desktop/experimental/glib2.0/debian/patches/0001-glib-tests-collate.c-run-to-completion-when-skipping.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/0001-glib-tests-collate.c-run-to-completion-when-skipping.patch?rev=40507&op=file
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/0001-glib-tests-collate.c-run-to-completion-when-skipping.patch	(added)
+++ desktop/experimental/glib2.0/debian/patches/0001-glib-tests-collate.c-run-to-completion-when-skipping.patch	[utf-8] Sun Feb 16 09:41:54 2014
@@ -0,0 +1,58 @@
+From ffa5fab09a504cc6d2ff862b4cff123e27e118e1 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Date: Tue, 11 Feb 2014 15:14:33 +0000
+Subject: [PATCH 1/2] glib/tests/collate.c: run to completion when skipping all
+ tests
+
+Otherwise, we don't produce valid TAP output, and fail with:
+
+    ERROR: collate - missing test plan
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=724124
+Reviewed-by: Dan Winship <danw>
+---
+ glib/tests/collate.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/glib/tests/collate.c b/glib/tests/collate.c
+index a6fda18..24a913d 100644
+--- a/glib/tests/collate.c
++++ b/glib/tests/collate.c
+@@ -3,6 +3,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
++static gboolean missing_locale = FALSE;
++
+ typedef struct {
+   const gchar **input;
+   const gchar **sorted;
+@@ -45,6 +47,12 @@ do_collate (gboolean for_file, gboolean use_key, const CollateTest *test)
+   Line line;
+   gint i;
+ 
++  if (missing_locale)
++    {
++      g_test_skip ("no en_US locale");
++      return;
++    }
++
+   line_array = g_array_new (FALSE, FALSE, sizeof(Line));
+   g_array_set_clear_func (line_array, (GDestroyNotify)clear_line);
+ 
+@@ -253,8 +261,10 @@ main (int argc, char *argv[])
+   locale = setlocale (LC_ALL, "");
+   if (locale == NULL || strcmp (locale, "en_US") != 0)
+     {
+-      g_test_message ("No suitable locale, skipping test");
+-      return 0;
++      g_test_message ("No suitable locale, skipping tests");
++      missing_locale = TRUE;
++      /* let the tests run to completion so they show up as SKIP'd in TAP
++       * output */
+     }
+ 
+   test[0].input = input0;
+-- 
+1.9.rc1
+

Added: desktop/experimental/glib2.0/debian/patches/0002-g_test_run-return-0-if-all-tests-are-skipped-in-TAP-.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/0002-g_test_run-return-0-if-all-tests-are-skipped-in-TAP-.patch?rev=40507&op=file
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/0002-g_test_run-return-0-if-all-tests-are-skipped-in-TAP-.patch	(added)
+++ desktop/experimental/glib2.0/debian/patches/0002-g_test_run-return-0-if-all-tests-are-skipped-in-TAP-.patch	[utf-8] Sun Feb 16 09:41:54 2014
@@ -0,0 +1,46 @@
+From 0f5577de57b83841280dbd925c1b64b77bf4a828 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Date: Tue, 11 Feb 2014 15:24:34 +0000
+Subject: [PATCH 2/2] g_test_run: return 0 if all tests are skipped in TAP mode
+
+Exit status 77 is special to Automake's default test driver, but is
+treated as an error by TAP.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=724124
+Reviewed-by: Dan Winship <danw>
+---
+ glib/gtestutils.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/glib/gtestutils.c b/glib/gtestutils.c
+index 09f3adc..0b9aef9 100644
+--- a/glib/gtestutils.c
++++ b/glib/gtestutils.c
+@@ -1474,8 +1474,11 @@ g_test_get_root (void)
+  * particular code runs before or after a given test case, use
+  * g_test_add(), which lets you specify setup and teardown functions.
+  *
++ * If all tests are skipped, this function will return 0 if
++ * producing TAP output, or 77 (treated as "skip test" by Automake) otherwise.
++ *
+  * Returns: 0 on success, 1 on failure (assuming it returns at all),
+- *   77 if all tests were skipped with g_test_skip().
++ *   0 or 77 if all tests were skipped with g_test_skip()
+  *
+  * Since: 2.16
+  */
+@@ -1485,6 +1488,11 @@ g_test_run (void)
+   if (g_test_run_suite (g_test_get_root()) != 0)
+     return 1;
+ 
++  /* 77 is special to Automake's default driver, but not Automake's TAP driver
++   * or Perl's prove(1) TAP driver. */
++  if (test_tap_log)
++    return 0;
++
+   if (test_run_count > 0 && test_run_count == test_skipped_count)
+     return 77;
+   else
+-- 
+1.9.rc1
+

Modified: desktop/experimental/glib2.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/series?rev=40507&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/series	[utf-8] (original)
+++ desktop/experimental/glib2.0/debian/patches/series	[utf-8] Sun Feb 16 09:41:54 2014
@@ -16,3 +16,5 @@
 gdbus-Let-the-pending-read-finish-before-closing-the.patch
 gdbus-tests-wait-up-to-60s-for-gdbus-testserver-to-t.patch
 gdbus-connection-wait-up-to-10s-to-actually-send-a-m.patch
+0001-glib-tests-collate.c-run-to-completion-when-skipping.patch
+0002-g_test_run-return-0-if-all-tests-are-skipped-in-TAP-.patch




More information about the pkg-gnome-commits mailing list