~lightdm-team/lightdm/1.2

« back to all changes in this revision

Viewing changes to tests/src/test-runner.c

  • Committer: Robert Ancell
  • Date: 2012-01-17 04:19:57 UTC
  • Revision ID: robert.ancell@canonical.com-20120117041957-7pyyvw464gfb7c1d
Add regression test that checks it works when console kit is not avaiable

Show diffs side-by-side

added added

removed removed

Lines of Context:
651
651
 
652
652
static void
653
653
start_console_kit_daemon ()
654
 
{  
 
654
{
 
655
    service_count++;
655
656
    g_bus_own_name (G_BUS_TYPE_SYSTEM,
656
657
                    "org.freedesktop.ConsoleKit",
657
658
                    G_BUS_NAME_OWNER_FLAGS_NONE,
861
862
static void
862
863
start_accounts_service_daemon ()
863
864
{
 
865
    service_count++;
864
866
    g_bus_own_name (G_BUS_TYPE_SYSTEM,
865
867
                    "org.freedesktop.Accounts",
866
868
                    G_BUS_NAME_OWNER_FLAGS_NONE,
1064
1066
    g_string_free (passwd_data, TRUE);
1065
1067
 
1066
1068
    /* Start D-Bus services */
1067
 
    service_count = 2;
1068
 
    start_console_kit_daemon ();
1069
 
    start_accounts_service_daemon ();
 
1069
    if (!g_key_file_get_boolean (config, "test-runner-config", "disable-console-kit", NULL))
 
1070
        start_console_kit_daemon ();
 
1071
    if (!g_key_file_get_boolean (config, "test-runner-config", "disable-accounts-service", NULL))
 
1072
        start_accounts_service_daemon ();
1070
1073
 
1071
1074
    g_main_loop_run (loop);
1072
1075