mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Fix test_find_program on FreeBSD
On FreeBSD /home is generally a symlink to /usr/home, so the relative resolves to /usr/bin instead of /bin and `sh` can only be found in /bin on FreeBSD. Fix this by resolving symlinks in the CWD first.
This commit is contained in:
parent
d1ba2b421f
commit
25ae9f59e8
@ -451,7 +451,9 @@ test_find_program (void)
|
||||
g_assert (res != NULL);
|
||||
g_free (res);
|
||||
|
||||
cwd = g_get_current_dir ();
|
||||
/* Resolve any symlinks in the CWD as that breaks the test e.g.
|
||||
* with the FreeBSD /home/ -> /usr/home symlink. */
|
||||
cwd = realpath (".", NULL);
|
||||
absolute_path = g_find_program_in_path ("sh");
|
||||
relative_path = g_strdup (absolute_path);
|
||||
for (i = 0; cwd[i] != '\0'; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user