mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 19:55:12 +01:00
trash test: Don't rely on being able to determine mount points
If we can't find the mount point for target or tmp (as currently happens on Launchpad autobuilders, and perhaps relatedly, on a development system that uses btrfs), that's probably not great but is not really the point of this test. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
56a5cd1337
commit
13282768c7
@ -121,11 +121,40 @@ test_trash_symlinks (void)
|
||||
}
|
||||
|
||||
target_mount = g_unix_mount_for (target, NULL);
|
||||
|
||||
if (target_mount == NULL)
|
||||
{
|
||||
gchar *message;
|
||||
|
||||
message = g_strdup_printf ("Unable to determine mount point for %s",
|
||||
target);
|
||||
g_test_skip (message);
|
||||
g_free (message);
|
||||
g_free (target);
|
||||
return;
|
||||
}
|
||||
|
||||
g_assert_nonnull (target_mount);
|
||||
g_test_message ("Target: %s (mount: %s)", target, g_unix_mount_get_mount_path (target_mount));
|
||||
|
||||
tmp = g_dir_make_tmp ("test-trashXXXXXX", &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert_nonnull (tmp);
|
||||
tmp_mount = g_unix_mount_for (tmp, NULL);
|
||||
|
||||
if (tmp_mount == NULL)
|
||||
{
|
||||
gchar *message;
|
||||
|
||||
message = g_strdup_printf ("Unable to determine mount point for %s", tmp);
|
||||
g_test_skip (message);
|
||||
g_free (message);
|
||||
g_unix_mount_free (target_mount);
|
||||
g_free (target);
|
||||
g_free (tmp);
|
||||
return;
|
||||
}
|
||||
|
||||
g_assert_nonnull (tmp_mount);
|
||||
g_test_message ("Tmp: %s (mount: %s)", tmp, g_unix_mount_get_mount_path (tmp_mount));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user