mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gio/tests/meson: Add appinfo-test and apps as appinfo tests dependency
We need to make sure that such binaries are built and available at test time or we may fail some tests requiring them (directly or through desktop file). As per this, and because now generated desktop files are available both at build and install time, don't skip some tests we were used to, but actually enforce they are running.
This commit is contained in:
parent
a1a0a9d75a
commit
e1e4084ecb
@ -56,12 +56,7 @@ test_launch (void)
|
||||
|
||||
path = g_test_get_filename (G_TEST_BUILT, "appinfo-test.desktop", NULL);
|
||||
appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
|
||||
|
||||
if (appinfo == NULL)
|
||||
{
|
||||
g_test_skip ("appinfo-test binary not installed");
|
||||
return;
|
||||
}
|
||||
g_assert_true (G_IS_APP_INFO (appinfo));
|
||||
|
||||
test_launch_for_app_info (appinfo);
|
||||
g_object_unref (appinfo);
|
||||
@ -220,12 +215,7 @@ test_show_in (void)
|
||||
|
||||
path = g_test_get_filename (G_TEST_BUILT, "appinfo-test.desktop", NULL);
|
||||
appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
|
||||
|
||||
if (appinfo == NULL)
|
||||
{
|
||||
g_test_skip ("appinfo-test binary not installed");
|
||||
return;
|
||||
}
|
||||
g_assert_true (G_IS_APP_INFO (appinfo));
|
||||
|
||||
g_assert_true (g_app_info_should_show (appinfo));
|
||||
g_object_unref (appinfo);
|
||||
|
@ -687,6 +687,7 @@ run_apps (const gchar *command,
|
||||
argv[2] = g_strdup (arg);
|
||||
argv[3] = NULL;
|
||||
|
||||
g_assert_true (g_file_test (argv[0], G_FILE_TEST_IS_EXECUTABLE));
|
||||
envp = g_get_environ ();
|
||||
|
||||
if (with_usr)
|
||||
@ -1084,12 +1085,7 @@ test_launch_as_manager (void)
|
||||
|
||||
path = g_test_get_filename (G_TEST_BUILT, "appinfo-test.desktop", NULL);
|
||||
appinfo = g_desktop_app_info_new_from_filename (path);
|
||||
|
||||
if (appinfo == NULL)
|
||||
{
|
||||
g_test_skip ("appinfo-test binary not installed");
|
||||
return;
|
||||
}
|
||||
g_assert_true (G_IS_APP_INFO (appinfo));
|
||||
|
||||
context = g_object_new (test_launch_context_get_type (), NULL);
|
||||
g_signal_connect (context, "launch-started",
|
||||
@ -1147,12 +1143,7 @@ test_launch_as_manager_fail (void)
|
||||
|
||||
path = g_test_get_filename (G_TEST_BUILT, "appinfo-test.desktop", NULL);
|
||||
appinfo = g_desktop_app_info_new_from_filename (path);
|
||||
|
||||
if (appinfo == NULL)
|
||||
{
|
||||
g_test_skip ("appinfo-test binary not installed");
|
||||
return;
|
||||
}
|
||||
g_assert_true (G_IS_APP_INFO (appinfo));
|
||||
|
||||
context = g_object_new (test_launch_context_get_type (), NULL);
|
||||
g_signal_connect (context, "launch-started",
|
||||
|
@ -256,10 +256,12 @@ if host_machine.system() != 'windows'
|
||||
gio_tests += {
|
||||
'appinfo' : {
|
||||
'install' : false,
|
||||
'extra_programs' : ['appinfo-test'],
|
||||
},
|
||||
'desktop-app-info' : {
|
||||
'install' : false,
|
||||
'depends' : gio_launch_desktop,
|
||||
'extra_programs' : ['apps', 'appinfo-test'],
|
||||
},
|
||||
}
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user