mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 23:28:54 +02:00
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.
This commit is contained in:
@@ -807,6 +807,7 @@ test_cwd (void)
|
|||||||
GPtrArray *args;
|
GPtrArray *args;
|
||||||
GInputStream *stdout;
|
GInputStream *stdout;
|
||||||
gchar *result;
|
gchar *result;
|
||||||
|
const char *basename;
|
||||||
|
|
||||||
args = get_test_subprocess_args ("cwd", NULL);
|
args = get_test_subprocess_args ("cwd", NULL);
|
||||||
launcher = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE);
|
launcher = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE);
|
||||||
@@ -821,7 +822,9 @@ test_cwd (void)
|
|||||||
|
|
||||||
result = splice_to_string (stdout, error);
|
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_free (result);
|
||||||
g_object_unref (proc);
|
g_object_unref (proc);
|
||||||
|
Reference in New Issue
Block a user