4 #include <glib-object.h>
8 static GKeyFile *config;
11 main (int argc, char **argv)
13 #if !defined(GLIB_VERSION_2_36)
17 status_connect (NULL, NULL);
19 config = g_key_file_new ();
20 g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);
22 if (!g_key_file_get_boolean (config, "test-plymouth-config", "enabled", NULL))
25 if (argc == 2 && strcmp (argv[1], "--ping") == 0)
27 if (g_key_file_get_boolean (config, "test-plymouth-config", "active", NULL))
29 status_notify ("PLYMOUTH PING ACTIVE=TRUE");
34 status_notify ("PLYMOUTH PING ACTIVE=FALSE");
38 if (argc == 2 && strcmp (argv[1], "--has-active-vt") == 0)
40 if (g_key_file_get_boolean (config, "test-plymouth-config", "has-active-vt", NULL))
42 status_notify ("PLYMOUTH HAS-ACTIVE-VT=TRUE");
47 status_notify ("PLYMOUTH HAS-ACTIVE-VT=FALSE");
51 if (argc == 2 && strcmp (argv[1], "deactivate") == 0)
52 status_notify ("PLYMOUTH DEACTIVATE");
53 if (argc == 2 && strcmp (argv[1], "quit") == 0)
54 status_notify ("PLYMOUTH QUIT RETAIN-SPLASH=FALSE");
55 if (argc == 3 && strcmp (argv[1], "quit") == 0 && strcmp (argv[2], "--retain-splash") == 0)
56 status_notify ("PLYMOUTH QUIT RETAIN-SPLASH=TRUE");