summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-11-29 04:12:26 +0000
committerColin Walters <walters@verbum.org>2013-11-29 04:12:26 +0000
commit7a90c201f7212a410ed871d7decab23e8b63d0e9 (patch)
tree523f9ab8f56d962793c2550dee4ee11d3036dab5
parent4c3b009992f585ce00cafc8cd38941eb646df8e5 (diff)
downloadglib-7a90c201f7212a410ed871d7decab23e8b63d0e9.tar.gz
tests/gsubprocess: Only compare basename of /tmp
Otherwise, we break in Continuous where /tmp == /sysroot/tmp, and something in the execve() or the kernel will do realpath() for us.
-rw-r--r--gio/tests/gsubprocess.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gio/tests/gsubprocess.c b/gio/tests/gsubprocess.c
index 6dfc6b302..f7298bc51 100644
--- a/gio/tests/gsubprocess.c
+++ b/gio/tests/gsubprocess.c
@@ -807,6 +807,7 @@ test_cwd (void)
GPtrArray *args;
GInputStream *stdout;
gchar *result;
+ const char *basename;
args = get_test_subprocess_args ("cwd", NULL);
launcher = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE);
@@ -821,7 +822,9 @@ test_cwd (void)
result = splice_to_string (stdout, error);
- g_assert_cmpstr (result, ==, "/tmp" LINEEND);
+ basename = g_strrstr (result, "/");
+ g_assert (basename != NULL);
+ g_assert_cmpstr (basename, ==, "/tmp" LINEEND);
g_free (result);
g_object_unref (proc);