diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
commit | c527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch) | |
tree | bb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-core/glib-2.0/glib-2.0 | |
download | poky-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0')
12 files changed, 612 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch new file mode 100644 index 0000000000..9b87d9d547 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 0167c3340d8201dca8e9031b61703bbc5ed6ce33 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jan Schmidt <thaytan@noraisin.net> | ||
3 | Date: Wed, 25 Sep 2013 19:22:26 +1000 | ||
4 | Subject: [PATCH] gio: Fix -Werror format string errors from mismatched ints. | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | --- | ||
9 | gio/gdbusmessage.c | 8 ++++---- | ||
10 | gio/gdbusprivate.c | 4 ++-- | ||
11 | 2 files changed, 6 insertions(+), 6 deletions(-) | ||
12 | |||
13 | diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c | ||
14 | index ac233a3..ad77aa6 100644 | ||
15 | --- a/gio/gdbusmessage.c | ||
16 | +++ b/gio/gdbusmessage.c | ||
17 | @@ -3468,10 +3468,10 @@ g_dbus_message_print (GDBusMessage *message, | ||
18 | statbuf.st_mode); | ||
19 | g_string_append_printf (fs, "%s" "ino=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "", | ||
20 | (guint64) statbuf.st_ino); | ||
21 | - g_string_append_printf (fs, "%s" "uid=%d", fs->len > 0 ? "," : "", | ||
22 | - statbuf.st_uid); | ||
23 | - g_string_append_printf (fs, "%s" "gid=%d", fs->len > 0 ? "," : "", | ||
24 | - statbuf.st_gid); | ||
25 | + g_string_append_printf (fs, "%s" "uid=%u", fs->len > 0 ? "," : "", | ||
26 | + (guint) statbuf.st_uid); | ||
27 | + g_string_append_printf (fs, "%s" "gid=%u", fs->len > 0 ? "," : "", | ||
28 | + (guint) statbuf.st_gid); | ||
29 | g_string_append_printf (fs, "%s" "rdev=%d:%d", fs->len > 0 ? "," : "", | ||
30 | major (statbuf.st_rdev), minor (statbuf.st_rdev)); | ||
31 | g_string_append_printf (fs, "%s" "size=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "", | ||
32 | diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c | ||
33 | index 0e5bef2..785a0c0 100644 | ||
34 | --- a/gio/gdbusprivate.c | ||
35 | +++ b/gio/gdbusprivate.c | ||
36 | @@ -2155,7 +2155,7 @@ write_message_print_transport_debug (gssize bytes_written, | ||
37 | _g_dbus_debug_print_lock (); | ||
38 | g_print ("========================================================================\n" | ||
39 | "GDBus-debug:Transport:\n" | ||
40 | - " >>>> WROTE %" G_GSIZE_FORMAT " bytes of message with serial %d and\n" | ||
41 | + " >>>> WROTE %" G_GSSIZE_FORMAT " bytes of message with serial %d and\n" | ||
42 | " size %" G_GSIZE_FORMAT " from offset %" G_GSIZE_FORMAT " on a %s\n", | ||
43 | bytes_written, | ||
44 | g_dbus_message_get_serial (data->message), | ||
45 | @@ -2206,7 +2206,7 @@ read_message_print_transport_debug (gssize bytes_read, | ||
46 | _g_dbus_debug_print_lock (); | ||
47 | g_print ("========================================================================\n" | ||
48 | "GDBus-debug:Transport:\n" | ||
49 | - " <<<< READ %" G_GSIZE_FORMAT " bytes of message with serial %d and\n" | ||
50 | + " <<<< READ %" G_GSSIZE_FORMAT " bytes of message with serial %d and\n" | ||
51 | " size %d to offset %" G_GSIZE_FORMAT " from a %s\n", | ||
52 | bytes_read, | ||
53 | serial, | ||
54 | -- | ||
55 | 1.8.3.1 | ||
56 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch new file mode 100644 index 0000000000..3aac35a5d3 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 55253b55b9c65f3e0efbbe03cbab2a4c4014a16b Mon Sep 17 00:00:00 2001 | ||
2 | From: Song.Li <Song.Li@windriver.com> | ||
3 | Date: Thu, 5 Jul 2012 15:09:41 +0800 | ||
4 | Subject: [PATCH] add -march=i486 into CFLAGS automatically | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | glib configure will check if current gcc need -march=i486, | ||
9 | when gcc need -march=i486 but CFLAGS don't have, | ||
10 | glib configure will abort and advise the user to add -march=i486 or later. | ||
11 | This will break the build process,it's not good for automatic build system. | ||
12 | so change this to adding -march=i485 automatically when it is needed. | ||
13 | --- | ||
14 | configure.ac | 6 ++++-- | ||
15 | 1 files changed, 4 insertions(+), 2 deletions(-) | ||
16 | |||
17 | Index: glib-2.36.0/configure.ac | ||
18 | =================================================================== | ||
19 | --- glib-2.36.0.orig/configure.ac | ||
20 | +++ glib-2.36.0/configure.ac | ||
21 | @@ -2378,7 +2378,7 @@ dnl | ||
22 | dnl Note that the atomic ops are only available with GCC on x86 when | ||
23 | dnl using -march=i486 or higher. If we detect that the atomic ops are | ||
24 | dnl not available but would be available given the right flags, we want | ||
25 | -dnl to abort and advise the user to fix their CFLAGS. It's better to do | ||
26 | +dnl to add -march=i486 automatically to fix their CFLAGS. It's better to do | ||
27 | dnl that then to silently fall back on emulated atomic ops just because | ||
28 | dnl the user had the wrong build environment. | ||
29 | |||
30 | @@ -2401,7 +2401,8 @@ AC_CACHE_CHECK([for lock-free atomic int | ||
31 | AC_TRY_COMPILE([], | ||
32 | [volatile int atomic = 2;\ | ||
33 | __sync_bool_compare_and_swap (&atomic, 2, 3);], | ||
34 | - [AC_MSG_ERROR([GLib must be build with -march=i486 or later.])], | ||
35 | + [AC_MSG_WARN([GLib must be build with -march=i486 or later.]) | ||
36 | + SAVE_CFLAGS="${SAVE_CFLAGS} -march=i486"], | ||
37 | []) | ||
38 | CFLAGS="${SAVE_CFLAGS}" | ||
39 | fi | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch new file mode 100644 index 0000000000..1d69a3f290 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 1c5718648d49e795efee91c220a2bf9386c184f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 28 Apr 2012 18:24:50 +0200 | ||
4 | Subject: [PATCH] configure: use $host_alias-libtool instead of libtool | ||
5 | directly | ||
6 | |||
7 | Poky renames libtool to $host_alias-libtool. | ||
8 | ./$host_alias-libtool isn't created until after configure runs with | ||
9 | libtool >= 2.2.2 | ||
10 | so we can't call # it at this point. We can safely assume a version is | ||
11 | available | ||
12 | from PATH though | ||
13 | |||
14 | Rebased to glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com> | ||
15 | Rebased to glib-2.32.1 by Martin Jansa <Martin.Jansa@gmail.com> | ||
16 | |||
17 | Upstream-Status: Inappropriate [configuration] | ||
18 | |||
19 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
20 | --- | ||
21 | configure.ac | 8 ++++---- | ||
22 | 1 files changed, 4 insertions(+), 4 deletions(-) | ||
23 | |||
24 | diff --git a/configure.ac b/configure.ac | ||
25 | index a6478c6..9a93d60 100644 | ||
26 | --- a/configure.ac | ||
27 | +++ b/configure.ac | ||
28 | @@ -1470,7 +1470,7 @@ if test x"$glib_native_win32" = xyes; then | ||
29 | G_MODULE_LDFLAGS= | ||
30 | else | ||
31 | export SED | ||
32 | - G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` | ||
33 | + G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` | ||
34 | fi | ||
35 | dnl G_MODULE_IMPL= don't reset, so cmd-line can override | ||
36 | G_MODULE_NEED_USCORE=0 | ||
37 | @@ -1535,9 +1535,9 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then | ||
38 | LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" | ||
39 | dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness | ||
40 | echo "void glib_plugin_test(void) { }" > plugin.c | ||
41 | - ${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \ | ||
42 | + ${SHELL} ./$host_alias-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \ | ||
43 | ${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1 | ||
44 | - ${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \ | ||
45 | + ${SHELL} ./$host_alias-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \ | ||
46 | ${LDFLAGS} -module -o plugin.la -export-dynamic \ | ||
47 | -shrext ".o" -avoid-version plugin.lo \ | ||
48 | -rpath /dont/care >/dev/null 2>&1 | ||
49 | @@ -1614,7 +1614,7 @@ fi | ||
50 | |||
51 | AC_MSG_CHECKING(for the suffix of module shared libraries) | ||
52 | export SED | ||
53 | -shrext_cmds=`./libtool --config | grep '^shrext_cmds='` | ||
54 | +shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='` | ||
55 | eval $shrext_cmds | ||
56 | module=yes eval std_shrext=$shrext_cmds | ||
57 | # chop the initial dot | ||
58 | -- | ||
59 | 1.7.8.6 | ||
60 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch new file mode 100644 index 0000000000..1571112b0e --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | Rename 'rand' variable to avoid conflict. | ||
2 | |||
3 | Upstream-Status: pending | ||
4 | Signed-off-by: Björn Stenberg <bjst@enea.com> | ||
5 | |||
6 | diff -u glib-2.34.3/tests/refcount/signals.c~ glib-2.34.3/tests/refcount/signals.c | ||
7 | --- glib-2.34.3/tests/refcount/signals.c 2012-11-26 17:52:48.000000000 +0100 | ||
8 | +++ glib-2.34.3/tests/refcount/signals.c 2013-02-08 14:24:10.052477546 +0100 | ||
9 | @@ -9,7 +9,7 @@ | ||
10 | #define MY_IS_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_TYPE ((tclass), G_TYPE_TEST)) | ||
11 | #define MY_TEST_GET_CLASS(test) (G_TYPE_INSTANCE_GET_CLASS ((test), G_TYPE_TEST, GTestClass)) | ||
12 | |||
13 | -static GRand *rand; | ||
14 | +static GRand *grand; | ||
15 | |||
16 | typedef struct _GTest GTest; | ||
17 | typedef struct _GTestClass GTestClass; | ||
18 | @@ -84,7 +84,7 @@ | ||
19 | NULL | ||
20 | }; | ||
21 | |||
22 | - rand = g_rand_new(); | ||
23 | + grand = g_rand_new(); | ||
24 | |||
25 | test_type = g_type_register_static (G_TYPE_OBJECT, "GTest", | ||
26 | &test_info, 0); | ||
27 | @@ -218,7 +218,7 @@ | ||
28 | static void | ||
29 | my_test_do_prop (GTest * test) | ||
30 | { | ||
31 | - test->value = g_rand_int (rand); | ||
32 | + test->value = g_rand_int (grand); | ||
33 | g_object_notify (G_OBJECT (test), "test-prop"); | ||
34 | } | ||
35 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch b/meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch new file mode 100644 index 0000000000..720ea6c328 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | Upstream-Status: Submitted | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From a047a0270ee5faf1d9d6080cbc613defdf52baea Mon Sep 17 00:00:00 2001 | ||
5 | From: Ross Burton <ross.burton@intel.com> | ||
6 | Date: Tue, 4 Feb 2014 13:15:08 +0000 | ||
7 | Subject: [PATCH] gio/tests: fix race when generating code | ||
8 | |||
9 | There is a race condition in the makefile that can result in build failures like this in parallel builds: | ||
10 | |||
11 | | ./gdbus-test-codegen-generated.h:7:0: error: unterminated #ifndef | ||
12 | | #ifndef __GDBUS_TEST_CODEGEN_GENERATED_H__ | ||
13 | |||
14 | This is because a rule like this: | ||
15 | |||
16 | x.c x.h: prerequisites | ||
17 | @commands | ||
18 | |||
19 | doesn't consider x.c and x.h together. Instead, it expands to two rules, one to | ||
20 | generate x.c and one to generate x.h, which happen to run the same commands. In | ||
21 | the worst case they execute in parallel, overwriting each other's output. | ||
22 | |||
23 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
24 | |||
25 | https://bugzilla.gnome.org/show_bug.cgi?id=723616 | ||
26 | --- | ||
27 | gio/tests/Makefile.am | 4 +++- | ||
28 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
29 | |||
30 | diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am | ||
31 | index 0beb239..270faf6 100644 | ||
32 | --- a/gio/tests/Makefile.am | ||
33 | +++ b/gio/tests/Makefile.am | ||
34 | @@ -436,7 +436,7 @@ gmenumodel_SOURCES = $(gdbus_sessionbus_sources) gmenumode | ||
35 | gnotification_SOURCES = $(gdbus_sessionbus_sources) gnotification.c gnotification-server.h gnotification-server.c | ||
36 | |||
37 | gdbus-test-codegen.o: gdbus-test-codegen-generated.h | ||
38 | -gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen | ||
39 | +gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen | ||
40 | $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \ | ||
41 | UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \ | ||
42 | $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \ | ||
43 | @@ -455,6 +455,8 @@ gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml | ||
44 | --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \ | ||
45 | $(srcdir)/test-codegen.xml \ | ||
46 | $(NULL) | ||
47 | +gdbus-test-codegen-generated.c: gdbus-test-codegen-generated.h | ||
48 | + @: # Generated as side-effect of .h | ||
49 | |||
50 | EXTRA_DIST += test-codegen.xml | ||
51 | CLEANFILES += gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml | ||
52 | -- | ||
53 | 1.7.10.4 | ||
54 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch new file mode 100644 index 0000000000..9759d11e3c --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | configure.ac: change readlink -f to -m | ||
2 | |||
3 | Change "readlink -f" to "readlink -m" since $libdir/$with_runtime_libdir | ||
4 | may not exist. | ||
5 | |||
6 | This patch should go to the upstream, I will send it sooner. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
11 | --- | ||
12 | configure.ac | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | --- a/configure.ac | ||
17 | +++ b/configure.ac | ||
18 | @@ -271,7 +271,7 @@ AC_ARG_WITH(runtime-libdir, | ||
19 | [], | ||
20 | [with_runtime_libdir=""]) | ||
21 | GLIB_RUNTIME_LIBDIR="$with_runtime_libdir" | ||
22 | -ABS_GLIB_RUNTIME_LIBDIR="`readlink -f $libdir/$with_runtime_libdir`" | ||
23 | +ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`" | ||
24 | AC_SUBST(GLIB_RUNTIME_LIBDIR) | ||
25 | AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR) | ||
26 | AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"]) | ||
27 | -- | ||
28 | 1.8.1.2 | ||
29 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch new file mode 100644 index 0000000000..ee435111fc --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | # an very old patch cherry-picked in every glib-2.0 patch directory. The earliest container | ||
2 | # for it is 2.6.5 in OE. The earliest commit for it is c8e5702127e507e82e6f68a4b8c546803accea9d | ||
3 | # in OE side which ports from previous bitkeeper SCM. In OE side it's only used til 2.12.4. | ||
4 | # | ||
5 | # keep it since it's always cleaner to not hardcode destination path. Use @datadir@ is more | ||
6 | # portable here. mark for upstream | ||
7 | # | ||
8 | # by Kevin Tian <kevin.tian@intel.com>, 06/25/2010 | ||
9 | # Rebased by Dongxiao Xu <dongxiao.xu@intel.com>, 11/16/2010 | ||
10 | |||
11 | Upstream-Status: Inappropriate [configuration] | ||
12 | |||
13 | diff -ruN glib-2.27.3-orig/glib-gettextize.in glib-2.27.3/glib-gettextize.in | ||
14 | --- glib-2.27.3-orig/glib-gettextize.in 2009-04-01 07:04:20.000000000 +0800 | ||
15 | +++ glib-2.27.3/glib-gettextize.in 2010-11-16 12:55:06.874605916 +0800 | ||
16 | @@ -52,7 +52,7 @@ | ||
17 | datadir=@datadir@ | ||
18 | datarootdir=@datarootdir@ | ||
19 | |||
20 | -gettext_dir=$prefix/share/glib-2.0/gettext | ||
21 | +gettext_dir=@datadir@/glib-2.0/gettext | ||
22 | |||
23 | while test $# -gt 0; do | ||
24 | case "$1" in | ||
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 0000000000..3dba0ee31b --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch | |||
@@ -0,0 +1,197 @@ | |||
1 | Fix the handling of skipped tests so that it follows what automake does. | ||
2 | |||
3 | Upstream-Status: Backport [https://bugzilla.gnome.org/show_bug.cgi?id=720263] | ||
4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
5 | |||
6 | diff --git a/glib/gtestutils.c b/glib/gtestutils.c | ||
7 | index bc7bbcf..feaafa3 100644 | ||
8 | --- a/glib/gtestutils.c | ||
9 | +++ b/glib/gtestutils.c | ||
10 | @@ -607,9 +607,10 @@ static gchar *test_run_name = ""; | ||
11 | static GSList **test_filename_free_list; | ||
12 | static guint test_run_forks = 0; | ||
13 | static guint test_run_count = 0; | ||
14 | +static guint test_skipped_count = 0; | ||
15 | static GTestResult test_run_success = G_TEST_RUN_FAILURE; | ||
16 | static gchar *test_run_msg = NULL; | ||
17 | -static guint test_skip_count = 0; | ||
18 | +static guint test_startup_skip_count = 0; | ||
19 | static GTimer *test_user_timer = NULL; | ||
20 | static double test_user_stamp = 0; | ||
21 | static GSList *test_paths = NULL; | ||
22 | @@ -765,6 +766,8 @@ g_test_log (GTestLogType lbit, | ||
23 | g_print ("Bail out!\n"); | ||
24 | abort(); | ||
25 | } | ||
26 | + if (largs[0] == G_TEST_RUN_SKIPPED) | ||
27 | + test_skipped_count++; | ||
28 | break; | ||
29 | case G_TEST_LOG_MIN_RESULT: | ||
30 | if (test_tap_log) | ||
31 | @@ -869,11 +872,11 @@ parse_args (gint *argc_p, | ||
32 | { | ||
33 | gchar *equal = argv[i] + 16; | ||
34 | if (*equal == '=') | ||
35 | - test_skip_count = g_ascii_strtoull (equal + 1, NULL, 0); | ||
36 | + test_startup_skip_count = g_ascii_strtoull (equal + 1, NULL, 0); | ||
37 | else if (i + 1 < argc) | ||
38 | { | ||
39 | argv[i++] = NULL; | ||
40 | - test_skip_count = g_ascii_strtoull (argv[i], NULL, 0); | ||
41 | + test_startup_skip_count = g_ascii_strtoull (argv[i], NULL, 0); | ||
42 | } | ||
43 | argv[i] = NULL; | ||
44 | } | ||
45 | @@ -1516,14 +1519,21 @@ g_test_get_root (void) | ||
46 | * g_test_run_suite() or g_test_run() may only be called once | ||
47 | * in a program. | ||
48 | * | ||
49 | - * Returns: 0 on success | ||
50 | + * Returns: 0 on success, 1 on failure (assuming it returns at all), | ||
51 | + * 77 if all tests were skipped with g_test_skip(). | ||
52 | * | ||
53 | * Since: 2.16 | ||
54 | */ | ||
55 | int | ||
56 | g_test_run (void) | ||
57 | { | ||
58 | - return g_test_run_suite (g_test_get_root()); | ||
59 | + if (g_test_run_suite (g_test_get_root()) != 0) | ||
60 | + return 1; | ||
61 | + | ||
62 | + if (test_run_count > 0 && test_run_count == test_skipped_count) | ||
63 | + return 77; | ||
64 | + else | ||
65 | + return 0; | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | @@ -2063,7 +2073,7 @@ test_case_run (GTestCase *tc) | ||
70 | } | ||
71 | } | ||
72 | |||
73 | - if (++test_run_count <= test_skip_count) | ||
74 | + if (++test_run_count <= test_startup_skip_count) | ||
75 | g_test_log (G_TEST_LOG_SKIP_CASE, test_run_name, NULL, 0, NULL); | ||
76 | else if (test_run_list) | ||
77 | { | ||
78 | @@ -2117,7 +2127,8 @@ test_case_run (GTestCase *tc) | ||
79 | g_free (test_uri_base); | ||
80 | test_uri_base = old_base; | ||
81 | |||
82 | - return success == G_TEST_RUN_SUCCESS; | ||
83 | + return (success == G_TEST_RUN_SUCCESS || | ||
84 | + success == G_TEST_RUN_SKIPPED); | ||
85 | } | ||
86 | |||
87 | static int | ||
88 | diff --git a/glib/tests/testing.c b/glib/tests/testing.c | ||
89 | index 20c2e79..1025f12 100644 | ||
90 | --- a/glib/tests/testing.c | ||
91 | +++ b/glib/tests/testing.c | ||
92 | @@ -575,10 +575,93 @@ test_nonfatal (void) | ||
93 | g_test_trap_assert_stdout ("*The End*"); | ||
94 | } | ||
95 | |||
96 | +static void | ||
97 | +test_skip (void) | ||
98 | +{ | ||
99 | + g_test_skip ("Skipped should count as passed, not failed"); | ||
100 | +} | ||
101 | + | ||
102 | +static void | ||
103 | +test_pass (void) | ||
104 | +{ | ||
105 | +} | ||
106 | + | ||
107 | +static const char *argv0; | ||
108 | + | ||
109 | +static void | ||
110 | +test_skip_all (void) | ||
111 | +{ | ||
112 | + GPtrArray *argv; | ||
113 | + GError *error = NULL; | ||
114 | + int status; | ||
115 | + | ||
116 | + argv = g_ptr_array_new (); | ||
117 | + g_ptr_array_add (argv, (char *) argv0); | ||
118 | + g_ptr_array_add (argv, "--GTestSubprocess"); | ||
119 | + g_ptr_array_add (argv, "-p"); | ||
120 | + g_ptr_array_add (argv, "/misc/skip"); | ||
121 | + g_ptr_array_add (argv, NULL); | ||
122 | + | ||
123 | + g_spawn_sync (NULL, (char **) argv->pdata, NULL, | ||
124 | + G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, | ||
125 | + NULL, NULL, NULL, NULL, &status, | ||
126 | + &error); | ||
127 | + g_assert_no_error (error); | ||
128 | + | ||
129 | + g_spawn_check_exit_status (status, &error); | ||
130 | + g_assert_error (error, G_SPAWN_EXIT_ERROR, 77); | ||
131 | + g_clear_error (&error); | ||
132 | + | ||
133 | + g_ptr_array_set_size (argv, 0); | ||
134 | + g_ptr_array_add (argv, (char *) argv0); | ||
135 | + g_ptr_array_add (argv, "--GTestSubprocess"); | ||
136 | + g_ptr_array_add (argv, "-p"); | ||
137 | + g_ptr_array_add (argv, "/misc/skip"); | ||
138 | + g_ptr_array_add (argv, "-p"); | ||
139 | + g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip1"); | ||
140 | + g_ptr_array_add (argv, "-p"); | ||
141 | + g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip2"); | ||
142 | + g_ptr_array_add (argv, NULL); | ||
143 | + | ||
144 | + g_spawn_sync (NULL, (char **) argv->pdata, NULL, | ||
145 | + G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, | ||
146 | + NULL, NULL, NULL, NULL, &status, | ||
147 | + &error); | ||
148 | + g_assert_no_error (error); | ||
149 | + | ||
150 | + g_spawn_check_exit_status (status, &error); | ||
151 | + g_assert_error (error, G_SPAWN_EXIT_ERROR, 77); | ||
152 | + g_clear_error (&error); | ||
153 | + | ||
154 | + g_ptr_array_set_size (argv, 0); | ||
155 | + g_ptr_array_add (argv, (char *) argv0); | ||
156 | + g_ptr_array_add (argv, "--GTestSubprocess"); | ||
157 | + g_ptr_array_add (argv, "-p"); | ||
158 | + g_ptr_array_add (argv, "/misc/skip"); | ||
159 | + g_ptr_array_add (argv, "-p"); | ||
160 | + g_ptr_array_add (argv, "/misc/skip-all/subprocess/pass"); | ||
161 | + g_ptr_array_add (argv, "-p"); | ||
162 | + g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip1"); | ||
163 | + g_ptr_array_add (argv, NULL); | ||
164 | + | ||
165 | + g_spawn_sync (NULL, (char **) argv->pdata, NULL, | ||
166 | + G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, | ||
167 | + NULL, NULL, NULL, NULL, &status, | ||
168 | + &error); | ||
169 | + g_assert_no_error (error); | ||
170 | + | ||
171 | + g_spawn_check_exit_status (status, &error); | ||
172 | + g_assert_no_error (error); | ||
173 | + | ||
174 | + g_ptr_array_unref (argv); | ||
175 | +} | ||
176 | + | ||
177 | int | ||
178 | main (int argc, | ||
179 | char *argv[]) | ||
180 | { | ||
181 | + argv0 = argv[0]; | ||
182 | + | ||
183 | g_test_init (&argc, &argv, NULL); | ||
184 | |||
185 | g_test_add_func ("/random-generator/rand-1", test_rand1); | ||
186 | @@ -633,5 +716,11 @@ main (int argc, | ||
187 | |||
188 | g_test_add_func ("/misc/nonfatal", test_nonfatal); | ||
189 | |||
190 | + g_test_add_func ("/misc/skip", test_skip); | ||
191 | + g_test_add_func ("/misc/skip-all", test_skip_all); | ||
192 | + g_test_add_func ("/misc/skip-all/subprocess/skip1", test_skip); | ||
193 | + g_test_add_func ("/misc/skip-all/subprocess/skip2", test_skip); | ||
194 | + g_test_add_func ("/misc/skip-all/subprocess/pass", test_pass); | ||
195 | + | ||
196 | return g_test_run(); | ||
197 | } | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch b/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch new file mode 100644 index 0000000000..0db8fd1609 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | Fix dbus-appinfo from attempting to use the session's bus, and hanging if there | ||
2 | isn't one present. | ||
3 | |||
4 | Upstream-Status: Backport | ||
5 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
6 | |||
7 | From 940fa98290812789d095d93ff1c550cd86fb2428 Mon Sep 17 00:00:00 2001 | ||
8 | From: Xavier Claessens <xavier.claessens@collabora.co.uk> | ||
9 | Date: Mon, 28 Oct 2013 21:18:54 +0000 | ||
10 | Subject: Tests: add session_bus_run() and use it where possible | ||
11 | |||
12 | This is to avoid having again the subtil bug in dbus-appinfo.c: | ||
13 | session_bus_down() was called before g_test_run() so the test was | ||
14 | running on the user's dbus session. | ||
15 | |||
16 | https://bugzilla.gnome.org/show_bug.cgi?id=697348 | ||
17 | --- | ||
18 | diff --git a/gio/tests/dbus-appinfo.c b/gio/tests/dbus-appinfo.c | ||
19 | index ca11e98..7698429 100644 | ||
20 | --- a/gio/tests/dbus-appinfo.c | ||
21 | +++ b/gio/tests/dbus-appinfo.c | ||
22 | @@ -280,11 +280,7 @@ main (int argc, char **argv) | ||
23 | { | ||
24 | g_test_init (&argc, &argv, NULL); | ||
25 | |||
26 | - session_bus_up (); | ||
27 | - | ||
28 | g_test_add_func ("/appinfo/dbusappinfo", test_dbus_appinfo); | ||
29 | |||
30 | - session_bus_down (); | ||
31 | - | ||
32 | - return g_test_run (); | ||
33 | + return session_bus_run (); | ||
34 | } | ||
35 | diff --git a/gio/tests/gdbus-sessionbus.c b/gio/tests/gdbus-sessionbus.c | ||
36 | index 68c4449..13c2edb 100644 | ||
37 | --- a/gio/tests/gdbus-sessionbus.c | ||
38 | +++ b/gio/tests/gdbus-sessionbus.c | ||
39 | @@ -47,3 +47,14 @@ session_bus_down (void) | ||
40 | g_clear_object (&singleton); | ||
41 | } | ||
42 | |||
43 | +gint | ||
44 | +session_bus_run (void) | ||
45 | +{ | ||
46 | + gint ret; | ||
47 | + | ||
48 | + session_bus_up (); | ||
49 | + ret = g_test_run (); | ||
50 | + session_bus_down (); | ||
51 | + | ||
52 | + return ret; | ||
53 | +} | ||
54 | diff --git a/gio/tests/gdbus-sessionbus.h b/gio/tests/gdbus-sessionbus.h | ||
55 | index 7ef3abd..284cd00 100644 | ||
56 | --- a/gio/tests/gdbus-sessionbus.h | ||
57 | +++ b/gio/tests/gdbus-sessionbus.h | ||
58 | @@ -30,6 +30,7 @@ G_BEGIN_DECLS | ||
59 | void session_bus_up (void); | ||
60 | void session_bus_stop (void); | ||
61 | void session_bus_down (void); | ||
62 | +gint session_bus_run (void); | ||
63 | |||
64 | G_END_DECLS | ||
65 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch b/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch new file mode 100644 index 0000000000..f3be02770c --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Instead of writing the temporary mapping files in the mappedfile test to the | ||
2 | user runtime directory, write them to $TMP. The runtime directory may not | ||
3 | currently exist if the test is executed on a non-desktop system and the test | ||
4 | doesn't attempt to create the directory structure. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
8 | |||
9 | diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c | ||
10 | index 40e0e60..27a24be 100644 | ||
11 | --- a/glib/tests/mappedfile.c | ||
12 | +++ b/glib/tests/mappedfile.c | ||
13 | @@ -81,7 +81,7 @@ test_writable (void) | ||
14 | const gchar *new = "abcdefghijklmnopqrstuvxyz"; | ||
15 | gchar *tmp_copy_path; | ||
16 | |||
17 | - tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL); | ||
18 | + tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL); | ||
19 | |||
20 | g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error); | ||
21 | g_assert_no_error (error); | ||
22 | @@ -125,7 +125,7 @@ test_writable_fd (void) | ||
23 | int fd; | ||
24 | gchar *tmp_copy_path; | ||
25 | |||
26 | - tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL); | ||
27 | + tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL); | ||
28 | |||
29 | g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error); | ||
30 | g_assert_no_error (error); | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest new file mode 100644 index 0000000000..130ae09b6c --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | gnome-desktop-testing-runner glib | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch b/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch new file mode 100644 index 0000000000..2a154fdd4a --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Fix DATADIRNAME on uclibc/Linux | ||
2 | |||
3 | translation files are always installed under PREFIX/share/locale in uclibc | ||
4 | based systems therefore lets set DATADIRNAME to "share". | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Upstream-Status: Pending | ||
8 | Index: glib-2.38.2/m4macros/glib-gettext.m4 | ||
9 | =================================================================== | ||
10 | --- glib-2.38.2.orig/m4macros/glib-gettext.m4 2013-11-07 07:29:13.000000000 -0800 | ||
11 | +++ glib-2.38.2/m4macros/glib-gettext.m4 2014-03-15 14:51:54.712135644 -0700 | ||
12 | @@ -239,7 +239,7 @@ | ||
13 | [CATOBJEXT=.mo | ||
14 | DATADIRNAME=lib]) | ||
15 | ;; | ||
16 | - *-*-openbsd*) | ||
17 | + *-*-openbsd* | *-*-linux-uclibc*) | ||
18 | CATOBJEXT=.mo | ||
19 | DATADIRNAME=share | ||
20 | ;; | ||