From bddc559713ed3e8d790231139b21c8277931b5d0 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 16 Jul 2014 11:43:57 +0200 Subject: Remove polkit tests Complete the polkit dependency removal by also dropping it from the self tests. Unbreaks build and up-self-test again. --- README | 1 - src/Makefile.am | 2 -- src/up-self-test.c | 26 -------------------------- 3 files changed, 29 deletions(-) diff --git a/README b/README index 1a82032..64c1f25 100644 --- a/README +++ b/README @@ -9,7 +9,6 @@ Requirements: dbus-1 >= 1.0 dbus-glib-1 >= 0.76 gudev-1.0 >= 001 - polkit-gobject-1 >= 0.91 libusb UPower is an abstraction for enumerating power devices, diff --git a/src/Makefile.am b/src/Makefile.am index 2de5e6d..784a3c8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -136,8 +136,6 @@ check_PROGRAMS = \ up_self_test_SOURCES = \ up-self-test.c \ - up-polkit.h \ - up-polkit.c \ up-config.h \ up-config.c \ up-daemon.h \ diff --git a/src/up-self-test.c b/src/up-self-test.c index ecf1ff9..da10d7d 100644 --- a/src/up-self-test.c +++ b/src/up-self-test.c @@ -32,7 +32,6 @@ #include "up-device-list.h" #include "up-history.h" #include "up-native.h" -#include "up-polkit.h" #include "up-wakeups.h" gchar *history_dir = NULL; @@ -65,12 +64,6 @@ up_test_daemon_func (void) { UpDaemon *daemon; - /* needs polkit, which only listens to the system bus */ - if (!g_file_test (DBUS_SYSTEM_SOCKET, G_FILE_TEST_EXISTS)) { - puts("No system D-BUS running, skipping test"); - return; - } - daemon = up_daemon_new (); g_assert (daemon != NULL); @@ -281,24 +274,6 @@ up_test_history_func (void) rmdir (history_dir); } -static void -up_test_polkit_func (void) -{ - UpPolkit *polkit; - - /* polkit only listens to the system bus */ - if (!g_file_test (DBUS_SYSTEM_SOCKET, G_FILE_TEST_EXISTS)) { - puts("No system D-BUS running, skipping test"); - return; - } - - polkit = up_polkit_new (); - g_assert (polkit != NULL); - - /* unref */ - g_object_unref (polkit); -} - static void up_test_wakeups_func (void) { @@ -331,7 +306,6 @@ main (int argc, char **argv) g_test_add_func ("/power/device_list", up_test_device_list_func); g_test_add_func ("/power/history", up_test_history_func); g_test_add_func ("/power/native", up_test_native_func); - g_test_add_func ("/power/polkit", up_test_polkit_func); g_test_add_func ("/power/wakeups", up_test_wakeups_func); g_test_add_func ("/power/daemon", up_test_daemon_func); -- cgit v1.2.1