* [PATCH 1/3] glib-2.0: fix handling of skipped tests
@ 2014-01-30 11:51 Ross Burton
2014-01-30 11:51 ` [PATCH 2/3] gnome-desktop-testing: upgrade to current git master Ross Burton
2014-01-30 11:51 ` [PATCH 3/3] gdk-pixbuf: enable ptest Ross Burton
0 siblings, 2 replies; 5+ messages in thread
From: Ross Burton @ 2014-01-30 11:51 UTC (permalink / raw)
To: openembedded-core
Backport a patch from upstream to fix skipped tests, essential for gdk-pixbuf to
pass without enabling all loaders.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
.../glib-2.0/glib-2.0/gtest-skip-fixes.patch | 197 ++++++++++++++++++++
meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb | 1 +
2 files changed, 198 insertions(+)
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch b/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch
new file mode 100644
index 0000000..3dba0ee
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch
@@ -0,0 +1,197 @@
+Fix the handling of skipped tests so that it follows what automake does.
+
+Upstream-Status: Backport [https://bugzilla.gnome.org/show_bug.cgi?id=720263]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/glib/gtestutils.c b/glib/gtestutils.c
+index bc7bbcf..feaafa3 100644
+--- a/glib/gtestutils.c
++++ b/glib/gtestutils.c
+@@ -607,9 +607,10 @@ static gchar *test_run_name = "";
+ static GSList **test_filename_free_list;
+ static guint test_run_forks = 0;
+ static guint test_run_count = 0;
++static guint test_skipped_count = 0;
+ static GTestResult test_run_success = G_TEST_RUN_FAILURE;
+ static gchar *test_run_msg = NULL;
+-static guint test_skip_count = 0;
++static guint test_startup_skip_count = 0;
+ static GTimer *test_user_timer = NULL;
+ static double test_user_stamp = 0;
+ static GSList *test_paths = NULL;
+@@ -765,6 +766,8 @@ g_test_log (GTestLogType lbit,
+ g_print ("Bail out!\n");
+ abort();
+ }
++ if (largs[0] == G_TEST_RUN_SKIPPED)
++ test_skipped_count++;
+ break;
+ case G_TEST_LOG_MIN_RESULT:
+ if (test_tap_log)
+@@ -869,11 +872,11 @@ parse_args (gint *argc_p,
+ {
+ gchar *equal = argv[i] + 16;
+ if (*equal == '=')
+- test_skip_count = g_ascii_strtoull (equal + 1, NULL, 0);
++ test_startup_skip_count = g_ascii_strtoull (equal + 1, NULL, 0);
+ else if (i + 1 < argc)
+ {
+ argv[i++] = NULL;
+- test_skip_count = g_ascii_strtoull (argv[i], NULL, 0);
++ test_startup_skip_count = g_ascii_strtoull (argv[i], NULL, 0);
+ }
+ argv[i] = NULL;
+ }
+@@ -1516,14 +1519,21 @@ g_test_get_root (void)
+ * g_test_run_suite() or g_test_run() may only be called once
+ * in a program.
+ *
+- * Returns: 0 on success
++ * Returns: 0 on success, 1 on failure (assuming it returns at all),
++ * 77 if all tests were skipped with g_test_skip().
+ *
+ * Since: 2.16
+ */
+ int
+ g_test_run (void)
+ {
+- return g_test_run_suite (g_test_get_root());
++ if (g_test_run_suite (g_test_get_root()) != 0)
++ return 1;
++
++ if (test_run_count > 0 && test_run_count == test_skipped_count)
++ return 77;
++ else
++ return 0;
+ }
+
+ /**
+@@ -2063,7 +2073,7 @@ test_case_run (GTestCase *tc)
+ }
+ }
+
+- if (++test_run_count <= test_skip_count)
++ if (++test_run_count <= test_startup_skip_count)
+ g_test_log (G_TEST_LOG_SKIP_CASE, test_run_name, NULL, 0, NULL);
+ else if (test_run_list)
+ {
+@@ -2117,7 +2127,8 @@ test_case_run (GTestCase *tc)
+ g_free (test_uri_base);
+ test_uri_base = old_base;
+
+- return success == G_TEST_RUN_SUCCESS;
++ return (success == G_TEST_RUN_SUCCESS ||
++ success == G_TEST_RUN_SKIPPED);
+ }
+
+ static int
+diff --git a/glib/tests/testing.c b/glib/tests/testing.c
+index 20c2e79..1025f12 100644
+--- a/glib/tests/testing.c
++++ b/glib/tests/testing.c
+@@ -575,10 +575,93 @@ test_nonfatal (void)
+ g_test_trap_assert_stdout ("*The End*");
+ }
+
++static void
++test_skip (void)
++{
++ g_test_skip ("Skipped should count as passed, not failed");
++}
++
++static void
++test_pass (void)
++{
++}
++
++static const char *argv0;
++
++static void
++test_skip_all (void)
++{
++ GPtrArray *argv;
++ GError *error = NULL;
++ int status;
++
++ argv = g_ptr_array_new ();
++ g_ptr_array_add (argv, (char *) argv0);
++ g_ptr_array_add (argv, "--GTestSubprocess");
++ g_ptr_array_add (argv, "-p");
++ g_ptr_array_add (argv, "/misc/skip");
++ g_ptr_array_add (argv, NULL);
++
++ g_spawn_sync (NULL, (char **) argv->pdata, NULL,
++ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
++ NULL, NULL, NULL, NULL, &status,
++ &error);
++ g_assert_no_error (error);
++
++ g_spawn_check_exit_status (status, &error);
++ g_assert_error (error, G_SPAWN_EXIT_ERROR, 77);
++ g_clear_error (&error);
++
++ g_ptr_array_set_size (argv, 0);
++ g_ptr_array_add (argv, (char *) argv0);
++ g_ptr_array_add (argv, "--GTestSubprocess");
++ g_ptr_array_add (argv, "-p");
++ g_ptr_array_add (argv, "/misc/skip");
++ g_ptr_array_add (argv, "-p");
++ g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip1");
++ g_ptr_array_add (argv, "-p");
++ g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip2");
++ g_ptr_array_add (argv, NULL);
++
++ g_spawn_sync (NULL, (char **) argv->pdata, NULL,
++ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
++ NULL, NULL, NULL, NULL, &status,
++ &error);
++ g_assert_no_error (error);
++
++ g_spawn_check_exit_status (status, &error);
++ g_assert_error (error, G_SPAWN_EXIT_ERROR, 77);
++ g_clear_error (&error);
++
++ g_ptr_array_set_size (argv, 0);
++ g_ptr_array_add (argv, (char *) argv0);
++ g_ptr_array_add (argv, "--GTestSubprocess");
++ g_ptr_array_add (argv, "-p");
++ g_ptr_array_add (argv, "/misc/skip");
++ g_ptr_array_add (argv, "-p");
++ g_ptr_array_add (argv, "/misc/skip-all/subprocess/pass");
++ g_ptr_array_add (argv, "-p");
++ g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip1");
++ g_ptr_array_add (argv, NULL);
++
++ g_spawn_sync (NULL, (char **) argv->pdata, NULL,
++ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
++ NULL, NULL, NULL, NULL, &status,
++ &error);
++ g_assert_no_error (error);
++
++ g_spawn_check_exit_status (status, &error);
++ g_assert_no_error (error);
++
++ g_ptr_array_unref (argv);
++}
++
+ int
+ main (int argc,
+ char *argv[])
+ {
++ argv0 = argv[0];
++
+ g_test_init (&argc, &argv, NULL);
+
+ g_test_add_func ("/random-generator/rand-1", test_rand1);
+@@ -633,5 +716,11 @@ main (int argc,
+
+ g_test_add_func ("/misc/nonfatal", test_nonfatal);
+
++ g_test_add_func ("/misc/skip", test_skip);
++ g_test_add_func ("/misc/skip-all", test_skip_all);
++ g_test_add_func ("/misc/skip-all/subprocess/skip1", test_skip);
++ g_test_add_func ("/misc/skip-all/subprocess/skip2", test_skip);
++ g_test_add_func ("/misc/skip-all/subprocess/pass", test_pass);
++
+ return g_test_run();
+ }
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
index 9745a9e..161f7da 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
@@ -13,6 +13,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch \
file://ptest-dbus.patch \
file://ptest-paths.patch \
+ file://gtest-skip-fixes.patch \
"
SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] gnome-desktop-testing: upgrade to current git master
2014-01-30 11:51 [PATCH 1/3] glib-2.0: fix handling of skipped tests Ross Burton
@ 2014-01-30 11:51 ` Ross Burton
2014-02-02 11:46 ` Richard Purdie
2014-01-30 11:51 ` [PATCH 3/3] gdk-pixbuf: enable ptest Ross Burton
1 sibling, 1 reply; 5+ messages in thread
From: Ross Burton @ 2014-01-30 11:51 UTC (permalink / raw)
To: openembedded-core
no-introspection.patch has been merged upstream.
Update license checksum as copyright dates have been updated.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
.../files/no-introspection.patch | 19 -------------------
...sting_2013.1.bb => gnome-desktop-testing_git.bb} | 12 +++++++-----
2 files changed, 7 insertions(+), 24 deletions(-)
delete mode 100644 meta/recipes-support/gnome-desktop-testing/files/no-introspection.patch
rename meta/recipes-support/gnome-desktop-testing/{gnome-desktop-testing_2013.1.bb => gnome-desktop-testing_git.bb} (60%)
diff --git a/meta/recipes-support/gnome-desktop-testing/files/no-introspection.patch b/meta/recipes-support/gnome-desktop-testing/files/no-introspection.patch
deleted file mode 100644
index 67b64f2..0000000
--- a/meta/recipes-support/gnome-desktop-testing/files/no-introspection.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Introspection is a hard requirement to build gnome-desktop-testing upstream, but
-it isn't needed anymore.
-
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index 7460c69..6249caf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -27,8 +27,6 @@ AC_SUBST(WARN_CFLAGS)
- LT_PREREQ([2.2.4])
- LT_INIT([disable-static])
-
--GOBJECT_INTROSPECTION_REQUIRE([1.34.0])
--
- PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0 >= 2.34.0])
- GIO_UNIX_CFLAGS="$GIO_UNIX_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36"
-
diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2013.1.bb b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_git.bb
similarity index 60%
rename from meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2013.1.bb
rename to meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_git.bb
index 36e13b1..be43d98 100644
--- a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2013.1.bb
+++ b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_git.bb
@@ -2,13 +2,15 @@ SUMMARY = "Test runner for GNOME-style installed tests"
HOMEPAGE = "https://wiki.gnome.org/GnomeGoals/InstalledTests"
LICENSE = "LGPLv2+"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
- file://no-introspection.patch"
-SRC_URI[md5sum] = "c6824f7bfac95bf0fcf6ed0c255979c1"
-SRC_URI[sha256sum] = "632e7224de8614a8e4b7cdf87fc32551531efa9290fba0da4dae56234c584b7b"
+SRCREV = "fbec635575013b22ed5aa853e725448057ac54bc"
+PV = "2013.1+git${SRCPV}"
+
+SRC_URI = "gitsm://git.gnome.org/${PN}"
+
+S = "${WORKDIR}/git"
LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://src/gnome-desktop-testing-runner.c;endline=19;md5=ab86a2e00ab9cbb94f008d785004b181"
+ file://src/gnome-desktop-testing-runner.c;endline=19;md5=67311a600b83fd0068dfc7e5b84ffb3f"
DEPENDS = "glib-2.0"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] gdk-pixbuf: enable ptest
2014-01-30 11:51 [PATCH 1/3] glib-2.0: fix handling of skipped tests Ross Burton
2014-01-30 11:51 ` [PATCH 2/3] gnome-desktop-testing: upgrade to current git master Ross Burton
@ 2014-01-30 11:51 ` Ross Burton
1 sibling, 0 replies; 5+ messages in thread
From: Ross Burton @ 2014-01-30 11:51 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/run-ptest | 3 +
.../gdk-pixbuf/gdk-pixbuf/tests-check.patch | 465 ++++++++++++++++++++
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb | 17 +-
3 files changed, 483 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/run-ptest
create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/tests-check.patch
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/run-ptest b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/run-ptest
new file mode 100644
index 0000000..8f90723
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/run-ptest
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+gnome-desktop-testing-runner gdk-pixbuf
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/tests-check.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/tests-check.patch
new file mode 100644
index 0000000..31f3368
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/tests-check.patch
@@ -0,0 +1,465 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 9fa240c1ad5a815d63d8aa9126954152c2607f2e Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Sat, 25 Jan 2014 21:29:34 +0000
+Subject: Make testsuite robust against disabled formats
+
+Skip tests if their file format is not supported by the
+available loaders.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=722651
+---
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index de3442e..80840c2 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -42,17 +42,57 @@ dist_installed_test_data = \
+ icc-profile.png \
+ $(wildcard $(srcdir)/test-images/*)
+
++pixbuf_icc_SOURCES = \
++ pixbuf-icc.c \
++ test-common.c \
++ test-common.h \
++ $(NULL)
++
++pixbuf_scale_SOURCES = \
++ pixbuf-scale.c \
++ test-common.c \
++ test-common.h \
++ $(NULL)
++
++pixbuf_stream_SOURCES = \
++ pixbuf-stream.c \
++ test-common.c \
++ test-common.h \
++ $(NULL)
++
++pixbuf_threads_SOURCES = \
++ pixbuf-threads.c \
++ test-common.c \
++ test-common.h \
++ $(NULL)
++
++pixbuf_icon_serialize_SOURCES = \
++ pixbuf-icon-serialize.c \
++ test-common.c \
++ test-common.h \
++ $(NULL)
++
++pixbuf_save_SOURCES = \
++ pixbuf-save.c \
++ test-common.c \
++ test-common.h \
++ $(NULL)
++
+ pixbuf_resource_SOURCES = \
+ pixbuf-resource.c \
++ test-common.c \
++ test-common.h \
+ resources.h \
+- resources.c
++ resources.c \
++ $(NULL)
+
+ BUILT_SOURCES += resources.h resources.c
+ DISTCLEANFILES += \
+ resources.h resources.c \
+ pixbuf-save-options \
+ pixbuf-randomly-modified-image \
+- pixbuf-save-roundtrip
++ pixbuf-save-roundtrip \
++ $(NULL)
+
+ EXTRA_DIST += resources.gresource.xml
+ TESTS_ENVIRONMENT += GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/loaders.cache
+diff --git a/tests/pixbuf-icc.c b/tests/pixbuf-icc.c
+index 9cb9c90..3b95b09 100644
+--- a/tests/pixbuf-icc.c
++++ b/tests/pixbuf-icc.c
+@@ -22,6 +22,7 @@
+
+ #include "config.h"
+ #include "gdk-pixbuf/gdk-pixbuf.h"
++#include "test-common.h"
+
+ static void
+ test_incremental (gconstpointer data)
+@@ -34,7 +35,12 @@ test_incremental (gconstpointer data)
+ gchar *contents;
+ gsize size;
+
+-
++ if (!format_supported (filename))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ g_file_get_contents (g_test_get_filename (G_TEST_DIST, filename, NULL), &contents, &size, &error);
+ g_assert_no_error (error);
+
+@@ -62,6 +68,12 @@ test_nonincremental (gconstpointer data)
+ GdkPixbuf *pixbuf;
+ const gchar *profile;
+
++ if (!format_supported (filename))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ pixbuf = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, filename, NULL), &error);
+ g_assert_no_error (error);
+
+diff --git a/tests/pixbuf-icon-serialize.c b/tests/pixbuf-icon-serialize.c
+index 20bf6e1..880c654 100644
+--- a/tests/pixbuf-icon-serialize.c
++++ b/tests/pixbuf-icon-serialize.c
+@@ -1,5 +1,6 @@
+ #include "config.h"
+ #include "gdk-pixbuf/gdk-pixbuf.h"
++#include "test-common.h"
+ #include <string.h>
+ #include <glib.h>
+
+@@ -13,6 +14,12 @@ test_serialize (void)
+ GIcon *icon;
+ GInputStream *stream;
+
++ if (!format_supported ("png"))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ pixbuf = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, "test-image.png", NULL), &error);
+ g_assert_no_error (error);
+ g_assert (pixbuf != NULL);
+diff --git a/tests/pixbuf-resource.c b/tests/pixbuf-resource.c
+index a747bca..aa0bed8 100644
+--- a/tests/pixbuf-resource.c
++++ b/tests/pixbuf-resource.c
+@@ -22,6 +22,7 @@
+
+ #include "config.h"
+ #include "gdk-pixbuf/gdk-pixbuf.h"
++#include "test-common.h"
+ #include <string.h>
+
+ #define compare_option(p1, p2, key) \
+@@ -77,6 +78,12 @@ test_resource (void)
+ GError *error = NULL;
+ GdkPixbuf *pixbuf, *ref;
+
++ if (!format_supported ("png"))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ path = g_test_get_filename (G_TEST_DIST, "icc-profile.png", NULL);
+ ref = gdk_pixbuf_new_from_file (path, &error);
+ g_assert_no_error (error);
+@@ -111,6 +118,12 @@ test_resource_at_scale (void)
+ GError *error = NULL;
+ GdkPixbuf *pixbuf, *ref;
+
++ if (!format_supported ("png"))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ path = g_test_get_filename (G_TEST_DIST, "icc-profile.png", NULL);
+ ref = gdk_pixbuf_new_from_file_at_scale (path, 40, 10, FALSE, &error);
+ g_assert_no_error (error);
+diff --git a/tests/pixbuf-save.c b/tests/pixbuf-save.c
+index f7df29b..78ab288 100644
+--- a/tests/pixbuf-save.c
++++ b/tests/pixbuf-save.c
+@@ -21,6 +21,7 @@
+ */
+
+ #include "gdk-pixbuf/gdk-pixbuf.h"
++#include "test-common.h"
+ #include <string.h>
+
+ #define compare_option(p1, p2, key) \
+@@ -76,6 +77,12 @@ test_save_roundtrip (void)
+ GdkPixbuf *ref;
+ GdkPixbuf *pixbuf;
+
++ if (!format_supported ("png"))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ ref = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, "test-image.png", NULL), &error);
+ g_assert_no_error (error);
+
+@@ -98,6 +105,12 @@ test_save_options (void)
+ GdkPixbuf *pixbuf;
+ GError *error = NULL;
+
++ if (!format_supported ("png"))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ ref = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 10, 10);
+ gdk_pixbuf_fill (ref, 0xff00ff00);
+
+diff --git a/tests/pixbuf-scale.c b/tests/pixbuf-scale.c
+index 4fd9fd5..d57e56a 100644
+--- a/tests/pixbuf-scale.c
++++ b/tests/pixbuf-scale.c
+@@ -22,6 +22,7 @@
+
+ #include "config.h"
+ #include "gdk-pixbuf/gdk-pixbuf.h"
++#include "test-common.h"
+
+ static void
+ test_scale (gconstpointer data)
+@@ -33,6 +34,12 @@ test_scale (gconstpointer data)
+ GdkPixbuf *pixbuf;
+ gint width, height;
+
++ if (!format_supported (filename))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ path = g_test_get_filename (G_TEST_DIST, filename, NULL);
+ ref = gdk_pixbuf_new_from_file (path, &error);
+ g_assert_no_error (error);
+diff --git a/tests/pixbuf-stream.c b/tests/pixbuf-stream.c
+index 0c2cebe..d66ce3e 100644
+--- a/tests/pixbuf-stream.c
++++ b/tests/pixbuf-stream.c
+@@ -22,6 +22,7 @@
+
+ #include "config.h"
+ #include "gdk-pixbuf/gdk-pixbuf.h"
++#include "test-common.h"
+ #include <string.h>
+
+ #define compare_option(p1, p2, key) \
+@@ -71,6 +72,12 @@ test_stream (gconstpointer data)
+ GFile *file;
+ GInputStream *stream;
+
++ if (!format_supported (filename))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ path = g_test_get_filename (G_TEST_DIST, filename, NULL);
+ ref = gdk_pixbuf_new_from_file (path, &error);
+ g_assert_no_error (error);
+@@ -116,6 +123,12 @@ test_stream_async (gconstpointer data)
+ gsize size;
+ GInputStream *stream;
+
++ if (!format_supported (filename))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ path = g_test_get_filename (G_TEST_DIST, filename, NULL);
+ ref = gdk_pixbuf_new_from_file (path, &error);
+ g_assert_no_error (error);
+@@ -138,6 +151,12 @@ test_stream_at_scale (gconstpointer data)
+ GFile *file;
+ GInputStream *stream;
+
++ if (!format_supported (filename))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ path = g_test_get_filename (G_TEST_DIST, filename, NULL);
+ ref = gdk_pixbuf_new_from_file_at_scale (path, 20, 30, TRUE, &error);
+ g_assert_no_error (error);
+@@ -167,6 +186,12 @@ test_stream_at_scale_async (gconstpointer data)
+ gsize size;
+ GInputStream *stream;
+
++ if (!format_supported (filename))
++ {
++ g_test_skip ("format not supported");
++ return;
++ }
++
+ path = g_test_get_filename (G_TEST_DIST, filename, NULL);
+ ref = gdk_pixbuf_new_from_file_at_scale (path, 40, 10, FALSE, &error);
+ g_assert_no_error (error);
+diff --git a/tests/pixbuf-threads.c b/tests/pixbuf-threads.c
+index 5eeb9dd..f2694fd 100644
+--- a/tests/pixbuf-threads.c
++++ b/tests/pixbuf-threads.c
+@@ -18,7 +18,9 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
++#include "config.h"
+ #include "gdk-pixbuf/gdk-pixbuf.h"
++#include "test-common.h"
+
+ static void
+ load_image (gpointer data,
+@@ -71,15 +73,24 @@ test_threads (void)
+
+ for (i = 0; i < iterations; i++)
+ {
+- g_thread_pool_push (pool, "valid_jpeg_test", NULL);
+- g_thread_pool_push (pool, "valid_png_test", NULL);
+- g_thread_pool_push (pool, "valid_gif_test", NULL);
+- g_thread_pool_push (pool, "valid_bmp_test", NULL);
+- g_thread_pool_push (pool, "valid_jpeg_progressive_test", NULL);
+- g_thread_pool_push (pool, "valid_xpm_test", NULL);
+- g_thread_pool_push (pool, "valid_ras_test", NULL);
+- g_thread_pool_push (pool, "valid_tga_test", NULL);
+- g_thread_pool_push (pool, "valid_tiff1_test", NULL);
++ if (format_supported ("jpeg"))
++ g_thread_pool_push (pool, "valid_jpeg_test", NULL);
++ if (format_supported ("png"))
++ g_thread_pool_push (pool, "valid_png_test", NULL);
++ if (format_supported ("gif"))
++ g_thread_pool_push (pool, "valid_gif_test", NULL);
++ if (format_supported ("bmp"))
++ g_thread_pool_push (pool, "valid_bmp_test", NULL);
++ if (format_supported ("jpeg"))
++ g_thread_pool_push (pool, "valid_jpeg_progressive_test", NULL);
++ if (format_supported ("xpm"))
++ g_thread_pool_push (pool, "valid_xpm_test", NULL);
++ if (format_supported ("ras"))
++ g_thread_pool_push (pool, "valid_ras_test", NULL);
++ if (format_supported ("tga"))
++ g_thread_pool_push (pool, "valid_tga_test", NULL);
++ if (format_supported ("tiff"))
++ g_thread_pool_push (pool, "valid_tiff1_test", NULL);
+ }
+
+ g_thread_pool_free (pool, FALSE, TRUE);
+diff --git a/tests/test-common.c b/tests/test-common.c
+new file mode 100644
+index 0000000..c7673e3
+--- /dev/null
++++ b/tests/test-common.c
+@@ -0,0 +1,65 @@
++/* -*- Mode: C; c-basic-offset: 2; -*- */
++/* GdkPixbuf library - test loaders
++ *
++ * Copyright (C) 2014 Red Hat, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * Author: Matthias Clasen
++ */
++
++#include "config.h"
++#include "test-common.h"
++#include "gdk-pixbuf/gdk-pixbuf.h"
++
++#include <string.h>
++
++gboolean
++format_supported (const gchar *filename)
++{
++ const gchar *name = NULL;
++ GSList *formats, *l;
++ gboolean retval;
++ const gchar *names[] = { "png", "jpeg", "bmp", "gif", "ras",
++ "tga", "xpm", "xbm" };
++ gint i;
++
++ for (i = 0; i < G_N_ELEMENTS (names); i++)
++ {
++ if (strstr (filename, names[i]))
++ {
++ name = names[i];
++ break;
++ }
++ }
++ if (name == NULL)
++ return FALSE;
++
++ retval = FALSE;
++ formats = gdk_pixbuf_get_formats ();
++ for (l = formats; l; l = l->next)
++ {
++ GdkPixbufFormat *format = l->data;
++
++ if (g_str_equal (gdk_pixbuf_format_get_name (format), name))
++ {
++ retval = TRUE;
++ break;
++ }
++ }
++ g_slist_free (formats);
++
++ return retval;
++}
+diff --git a/tests/test-common.h b/tests/test-common.h
+new file mode 100644
+index 0000000..32ff35a
+--- /dev/null
++++ b/tests/test-common.h
+@@ -0,0 +1,33 @@
++/* -*- Mode: C; c-basic-offset: 2; -*- */
++/* GdkPixbuf library - test loaders
++ *
++ * Copyright (C) 2014 Red Hat, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * Author: Matthias Clasen
++ */
++
++#ifndef __TEST_COMMON_H__
++
++#include <glib.h>
++
++G_BEGIN_DECLS
++
++gboolean format_supported (const gchar *filename);
++
++G_END_DECLS
++
++#endif /* __TEST_COMMON_H__ */
+--
+cgit v0.9.2
\ No newline at end of file
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb
index 187af46..85a7b43 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb
@@ -16,12 +16,14 @@ MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
file://hardcoded_libtool.patch \
file://extending-libinstall-dependencies.patch \
+ file://run-ptest \
+ file://tests-check.patch \
"
SRC_URI[md5sum] = "81161cc895eb43afd9ae7354b87e2261"
SRC_URI[sha256sum] = "c229c53f59573eab9410b53690a4b9db770312c80a4d84ecd6295aa894574494"
-inherit autotools pkgconfig gettext pixbufcache
+inherit autotools pkgconfig gettext pixbufcache ptest
LIBV = "2.10.0"
@@ -42,6 +44,7 @@ PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
EXTRA_OECONF = "\
--disable-introspection \
+ ${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-installed-tests', '--disable-installed-tests', d)} \
"
PACKAGES =+ "${PN}-xlib"
@@ -64,6 +67,11 @@ FILES_${PN}-dbg += " \
${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \
"
+FILES_${PN}-ptest += "${libdir}/gdk-pixbuf/installed-tests \
+ ${datadir}/installed-tests/gdk-pixbuf"
+
+RDEPENDS_${PN}-ptest += "gnome-desktop-testing"
+
PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
PACKAGES_DYNAMIC_class-native = ""
@@ -72,7 +80,12 @@ python populate_packages_prepend () {
loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
- d.setVar('PIXBUF_PACKAGES', ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')))
+ packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
+ d.setVar('PIXBUF_PACKAGES', packages)
+
+ # The test suite exercises all the loaders, so ensure they are all
+ # dependencies of the ptest package.
+ d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages)
}
do_install_append_class-native() {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] gnome-desktop-testing: upgrade to current git master
2014-01-30 11:51 ` [PATCH 2/3] gnome-desktop-testing: upgrade to current git master Ross Burton
@ 2014-02-02 11:46 ` Richard Purdie
2014-02-02 13:14 ` Burton, Ross
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2014-02-02 11:46 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
On Thu, 2014-01-30 at 11:51 +0000, Ross Burton wrote:
> no-introspection.patch has been merged upstream.
>
> Update license checksum as copyright dates have been updated.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
> .../files/no-introspection.patch | 19 -------------------
> ...sting_2013.1.bb => gnome-desktop-testing_git.bb} | 12 +++++++-----
> 2 files changed, 7 insertions(+), 24 deletions(-)
> delete mode 100644 meta/recipes-support/gnome-desktop-testing/files/no-introspection.patch
> rename meta/recipes-support/gnome-desktop-testing/{gnome-desktop-testing_2013.1.bb => gnome-desktop-testing_git.bb} (60%)
>
> diff --git a/meta/recipes-support/gnome-desktop-testing/files/no-introspection.patch b/meta/recipes-support/gnome-desktop-testing/files/no-introspection.patch
> deleted file mode 100644
> index 67b64f2..0000000
> --- a/meta/recipes-support/gnome-desktop-testing/files/no-introspection.patch
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -Introspection is a hard requirement to build gnome-desktop-testing upstream, but
> -it isn't needed anymore.
> -
> -Upstream-Status: Submitted
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -diff --git a/configure.ac b/configure.ac
> -index 7460c69..6249caf 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -27,8 +27,6 @@ AC_SUBST(WARN_CFLAGS)
> - LT_PREREQ([2.2.4])
> - LT_INIT([disable-static])
> -
> --GOBJECT_INTROSPECTION_REQUIRE([1.34.0])
> --
> - PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0 >= 2.34.0])
> - GIO_UNIX_CFLAGS="$GIO_UNIX_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36"
> -
> diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2013.1.bb b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_git.bb
> similarity index 60%
> rename from meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2013.1.bb
> rename to meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_git.bb
> index 36e13b1..be43d98 100644
> --- a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2013.1.bb
> +++ b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_git.bb
> @@ -2,13 +2,15 @@ SUMMARY = "Test runner for GNOME-style installed tests"
> HOMEPAGE = "https://wiki.gnome.org/GnomeGoals/InstalledTests"
> LICENSE = "LGPLv2+"
>
> -SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
> - file://no-introspection.patch"
> -SRC_URI[md5sum] = "c6824f7bfac95bf0fcf6ed0c255979c1"
> -SRC_URI[sha256sum] = "632e7224de8614a8e4b7cdf87fc32551531efa9290fba0da4dae56234c584b7b"
> +SRCREV = "fbec635575013b22ed5aa853e725448057ac54bc"
> +PV = "2013.1+git${SRCPV}"
> +
> +SRC_URI = "gitsm://git.gnome.org/${PN}"
> +
> +S = "${WORKDIR}/git"
Its rather sad to need the gitsm fetcher. That fetcher isn't mirror safe
so I'm not sure we can use it.
Regardless, this blows up on multilib builds due to PN instead of BPN.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] gnome-desktop-testing: upgrade to current git master
2014-02-02 11:46 ` Richard Purdie
@ 2014-02-02 13:14 ` Burton, Ross
0 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2014-02-02 13:14 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core@lists.openembedded.org
[-- Attachment #1: Type: text/plain, Size: 291 bytes --]
On Sunday, 2 February 2014, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> Its rather sad to need the gitsm fetcher. That fetcher isn't mirror safe
> so I'm not sure we can use it.
I've been meaning to ask Colin about tar all releases, so I'll do that now.
Ross
[-- Attachment #2: Type: text/html, Size: 540 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-02 13:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-30 11:51 [PATCH 1/3] glib-2.0: fix handling of skipped tests Ross Burton
2014-01-30 11:51 ` [PATCH 2/3] gnome-desktop-testing: upgrade to current git master Ross Burton
2014-02-02 11:46 ` Richard Purdie
2014-02-02 13:14 ` Burton, Ross
2014-01-30 11:51 ` [PATCH 3/3] gdk-pixbuf: enable ptest Ross Burton
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.