[oe-commits] Ross Burton : glib-2.0: fix mapped file ptest
git at git.openembedded.org
git at git.openembedded.org
Thu Jan 16 23:38:27 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 93b4ecc263947826421d5b4fb1f99fe506b24287
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=93b4ecc263947826421d5b4fb1f99fe506b24287
Author: Ross Burton <ross.burton at intel.com>
Date: Thu Jan 16 13:31:39 2014 +0000
glib-2.0: fix mapped file ptest
The mappedfile ptest was attempting to write into directories that may not exist
on a non-Sato image. Instead, write into TMPDIR.
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
.../glib-2.0/glib-2.0/ptest-paths.patch | 30 ++++++++++++++++++++++
meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb | 1 +
2 files changed, 31 insertions(+)
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 0000000..f3be027
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch
@@ -0,0 +1,30 @@
+Instead of writing the temporary mapping files in the mappedfile test to the
+user runtime directory, write them to $TMP. The runtime directory may not
+currently exist if the test is executed on a non-desktop system and the test
+doesn't attempt to create the directory structure.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton at intel.com>
+
+diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c
+index 40e0e60..27a24be 100644
+--- a/glib/tests/mappedfile.c
++++ b/glib/tests/mappedfile.c
+@@ -81,7 +81,7 @@ test_writable (void)
+ const gchar *new = "abcdefghijklmnopqrstuvxyz";
+ gchar *tmp_copy_path;
+
+- tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL);
++ tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL);
+
+ g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error);
+ g_assert_no_error (error);
+@@ -125,7 +125,7 @@ test_writable_fd (void)
+ int fd;
+ gchar *tmp_copy_path;
+
+- tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL);
++ tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL);
+
+ g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error);
+ g_assert_no_error (error);
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 a5bfc70..9745a9e 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
@@ -12,6 +12,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://run-ptest \
file://0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch \
file://ptest-dbus.patch \
+ file://ptest-paths.patch \
"
SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
More information about the Openembedded-commits
mailing list