testlibrary: Skip launch test is bwrap is not supported

tingping/wmclass
Alexander Larsson 2016-08-29 12:32:31 +02:00
parent e18ab46977
commit 6e37155a3e
1 changed files with 14 additions and 0 deletions

View File

@ -270,6 +270,20 @@ test_install_launch_uninstall (void)
g_autoptr(GMainLoop) loop = NULL;
guint quit_id;
gboolean res;
const char *bwrap = g_getenv ("FLATPAK_BWRAP");
if (bwrap != NULL)
{
gint exit_code = 0;
char *argv[] = { (char *)bwrap, "--ro-bind", "/", "/", "/bin/true", NULL };
g_spawn_sync (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL, &exit_code, &error);
g_assert_no_error (error);
if (exit_code != 0)
{
g_test_skip ("bwrap not supported");
return;
}
}
inst = flatpak_installation_new_user (NULL, &error);
g_assert_no_error (error);