From ba24704988964a1f211e82e87cbe8aca29641979 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 18 Aug 2009 11:52:09 -0500 Subject: Deleting everything only leaving libindicator --- tests/Makefile.am | 141 -------------------------------- tests/test-interests-client.c | 63 -------------- tests/test-interests-server.c | 45 ---------- tests/test-interests-server1.c | 41 ---------- tests/test-interests-server2.c | 41 ---------- tests/test-interests-server3.c | 41 ---------- tests/test-interests-server4.c | 41 ---------- tests/test-interests-server5.c | 41 ---------- tests/test-simple-client.c | 30 ------- tests/test-simple-server.c | 39 --------- tests/test-thousand-indicators-client.c | 34 -------- tests/test-thousand-indicators-server.c | 43 ---------- tests/test_interests | 5 -- tests/test_interests_multi | 5 -- tests/test_simple | 5 -- tests/test_thousand_indicators | 5 -- 16 files changed, 620 deletions(-) delete mode 100644 tests/Makefile.am delete mode 100644 tests/test-interests-client.c delete mode 100644 tests/test-interests-server.c delete mode 100644 tests/test-interests-server1.c delete mode 100644 tests/test-interests-server2.c delete mode 100644 tests/test-interests-server3.c delete mode 100644 tests/test-interests-server4.c delete mode 100644 tests/test-interests-server5.c delete mode 100644 tests/test-simple-client.c delete mode 100644 tests/test-simple-server.c delete mode 100644 tests/test-thousand-indicators-client.c delete mode 100644 tests/test-thousand-indicators-server.c delete mode 100755 tests/test_interests delete mode 100755 tests/test_interests_multi delete mode 100755 tests/test_simple delete mode 100755 tests/test_thousand_indicators (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 03bd980..0000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,141 +0,0 @@ - -TESTS = \ - test_simple \ - test_interests \ - test_interests_multi \ - test_thousand_indicators - -libexec_PROGRAMS = \ - test-interests-client \ - test-interests-server \ - test-interests-server1 \ - test-interests-server2 \ - test-interests-server3 \ - test-interests-server4 \ - test-interests-server5 \ - test-thousand-indicators-client \ - test-thousand-indicators-server \ - test-simple-client \ - test-simple-server - -EXTRA_DIST = \ - $(TESTS) - -test_simple: test-simple-client test-simple-server - -test_simple_client_SOURCES = \ - test-simple-client.c - -test_simple_client_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_simple_client_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_simple_server_SOURCES = \ - test-simple-server.c - -test_simple_server_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_simple_server_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_interests: test-interests-client test-interests-server - -test_interests_client_SOURCES = \ - test-interests-client.c - -test_interests_client_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_interests_client_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_interests_server_SOURCES = \ - test-interests-server.c - -test_interests_server_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_interests_server_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_interests_multi: test-interests-client test-interests-server1 test-interests-server2 test-interests-server3 test-interests-server4 test-interests-server5 - -test_interests_server1_SOURCES = \ - test-interests-server1.c - -test_interests_server1_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_interests_server1_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_interests_server2_SOURCES = \ - test-interests-server2.c - -test_interests_server2_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_interests_server2_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_interests_server3_SOURCES = \ - test-interests-server3.c - -test_interests_server3_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_interests_server3_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_interests_server4_SOURCES = \ - test-interests-server4.c - -test_interests_server4_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_interests_server4_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_interests_server5_SOURCES = \ - test-interests-server5.c - -test_interests_server5_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_interests_server5_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_thousand_indicators: test-thousand-indicators-client test-thousand-indicators-server - -test_thousand_indicators_client_SOURCES = \ - test-thousand-indicators-client.c - -test_thousand_indicators_client_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_thousand_indicators_client_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -test_thousand_indicators_server_SOURCES = \ - test-thousand-indicators-server.c - -test_thousand_indicators_server_CFLAGS = \ - $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. - -test_thousand_indicators_server_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - diff --git a/tests/test-interests-client.c b/tests/test-interests-client.c deleted file mode 100644 index bde3b26..0000000 --- a/tests/test-interests-client.c +++ /dev/null @@ -1,63 +0,0 @@ - -#include -#include "libindicate/indicator.h" -#include "libindicate/server.h" -#include "libindicate/interests.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; -static gboolean interests[INDICATE_INTEREST_LAST] = {0}; - -static gboolean -check_interests (void) -{ - guint i; - for (i = INDICATE_INTEREST_NONE + 1; i < INDICATE_INTEREST_LAST; i++) { - if (!interests[i]) { - return FALSE; - } - } - - return TRUE; -} - -static void -interest_added (IndicateServer * server, IndicateInterests interest) -{ - g_debug("Oh, someone is interested in my for: %d", interest); - interests[interest] = TRUE; - - if (check_interests()) { - g_main_loop_quit(mainloop); - } - - return; -} - -static gboolean -done_timeout_cb (gpointer data) -{ - g_debug("All interests not set"); - passed = FALSE; - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateIndicator * indicator = indicate_indicator_new(); - indicate_indicator_show(indicator); - - IndicateServer * server = indicate_server_ref_default(); - g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_ADDED, G_CALLBACK(interest_added), NULL); - - g_timeout_add_seconds(2, done_timeout_cb, indicator); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-interests-server.c b/tests/test-interests-server.c deleted file mode 100644 index e1433d8..0000000 --- a/tests/test-interests-server.c +++ /dev/null @@ -1,45 +0,0 @@ - -#include -#include "libindicate/listener.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; - -static void -server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) -{ - g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); - - gint i; - for (i = INDICATE_INTEREST_NONE - 2; i < INDICATE_INTEREST_LAST + 2; i++) { - g_debug("Indicating Interests: %d", i); - indicate_listener_server_show_interest(listener, server, i); - } - - return; -} - -static gboolean -failed_cb (gpointer data) -{ - g_debug("Done indicatating interest"); - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateListener * listener = indicate_listener_ref_default(); - - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); - - g_timeout_add_seconds(2, failed_cb, NULL); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-interests-server1.c b/tests/test-interests-server1.c deleted file mode 100644 index e0d77f3..0000000 --- a/tests/test-interests-server1.c +++ /dev/null @@ -1,41 +0,0 @@ - -#include -#include "libindicate/listener.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; - -static void -server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) -{ - g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); - #define INTEREST 1 - g_debug("Setting Interest: %d", INTEREST); - indicate_listener_server_show_interest(listener, server, INTEREST); - return; -} - -static gboolean -failed_cb (gpointer data) -{ - g_debug("Done indicatating interest"); - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateListener * listener = indicate_listener_ref_default(); - - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); - - g_timeout_add_seconds(2, failed_cb, NULL); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-interests-server2.c b/tests/test-interests-server2.c deleted file mode 100644 index 0416c21..0000000 --- a/tests/test-interests-server2.c +++ /dev/null @@ -1,41 +0,0 @@ - -#include -#include "libindicate/listener.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; - -static void -server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) -{ - g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); - #define INTEREST 2 - g_debug("Setting Interest: %d", INTEREST); - indicate_listener_server_show_interest(listener, server, INTEREST); - return; -} - -static gboolean -failed_cb (gpointer data) -{ - g_debug("Done indicatating interest"); - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateListener * listener = indicate_listener_ref_default(); - - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); - - g_timeout_add_seconds(2, failed_cb, NULL); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-interests-server3.c b/tests/test-interests-server3.c deleted file mode 100644 index 7d889b1..0000000 --- a/tests/test-interests-server3.c +++ /dev/null @@ -1,41 +0,0 @@ - -#include -#include "libindicate/listener.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; - -static void -server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) -{ - g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); - #define INTEREST 3 - g_debug("Setting Interest: %d", INTEREST); - indicate_listener_server_show_interest(listener, server, INTEREST); - return; -} - -static gboolean -failed_cb (gpointer data) -{ - g_debug("Done indicatating interest"); - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateListener * listener = indicate_listener_ref_default(); - - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); - - g_timeout_add_seconds(2, failed_cb, NULL); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-interests-server4.c b/tests/test-interests-server4.c deleted file mode 100644 index 50e6db1..0000000 --- a/tests/test-interests-server4.c +++ /dev/null @@ -1,41 +0,0 @@ - -#include -#include "libindicate/listener.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; - -static void -server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) -{ - g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); - #define INTEREST 4 - g_debug("Setting Interest: %d", INTEREST); - indicate_listener_server_show_interest(listener, server, INTEREST); - return; -} - -static gboolean -failed_cb (gpointer data) -{ - g_debug("Done indicatating interest"); - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateListener * listener = indicate_listener_ref_default(); - - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); - - g_timeout_add_seconds(2, failed_cb, NULL); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-interests-server5.c b/tests/test-interests-server5.c deleted file mode 100644 index d415716..0000000 --- a/tests/test-interests-server5.c +++ /dev/null @@ -1,41 +0,0 @@ - -#include -#include "libindicate/listener.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; - -static void -server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) -{ - g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); - #define INTEREST 5 - g_debug("Setting Interest: %d", INTEREST); - indicate_listener_server_show_interest(listener, server, INTEREST); - return; -} - -static gboolean -failed_cb (gpointer data) -{ - g_debug("Done indicatating interest"); - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateListener * listener = indicate_listener_ref_default(); - - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); - - g_timeout_add_seconds(2, failed_cb, NULL); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-simple-client.c b/tests/test-simple-client.c deleted file mode 100644 index f8db55a..0000000 --- a/tests/test-simple-client.c +++ /dev/null @@ -1,30 +0,0 @@ - -#include -#include "libindicate/indicator.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; - -static gboolean -done_timeout_cb (gpointer data) -{ - g_debug("All done."); - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateIndicator * indicator = indicate_indicator_new(); - indicate_indicator_show(indicator); - - g_timeout_add_seconds(2, done_timeout_cb, indicator); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-simple-server.c b/tests/test-simple-server.c deleted file mode 100644 index 0a04e85..0000000 --- a/tests/test-simple-server.c +++ /dev/null @@ -1,39 +0,0 @@ - -#include -#include "libindicate/listener.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; - -static void -server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) -{ - g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); - g_main_loop_quit(mainloop); -} - -static gboolean -failed_cb (gpointer data) -{ - g_debug("Failed to get a server in 5 seconds."); - passed = FALSE; - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateListener * listener = indicate_listener_ref_default(); - - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); - - g_timeout_add_seconds(5, failed_cb, NULL); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-thousand-indicators-client.c b/tests/test-thousand-indicators-client.c deleted file mode 100644 index 0ac7305..0000000 --- a/tests/test-thousand-indicators-client.c +++ /dev/null @@ -1,34 +0,0 @@ - -#include -#include "libindicate/indicator.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; - -static gboolean -done_timeout_cb (gpointer data) -{ - g_debug("All done."); - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - int i; - for (i = 0; i < 1000; i++) { - /* Memory leak :) */ - IndicateIndicator * indicator = indicate_indicator_new(); - indicate_indicator_show(indicator); - } - - g_timeout_add_seconds(2, done_timeout_cb, NULL); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test-thousand-indicators-server.c b/tests/test-thousand-indicators-server.c deleted file mode 100644 index 285e56b..0000000 --- a/tests/test-thousand-indicators-server.c +++ /dev/null @@ -1,43 +0,0 @@ - -#include -#include "libindicate/listener.h" - -static gboolean passed = TRUE; -static GMainLoop * mainloop = NULL; -static guint indicator_count = 0; - -static void -indicator_added (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) -{ - g_debug("Indicator Added: %s %d %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type); - indicator_count++; - if (indicator_count == 1000) { - g_main_loop_quit(mainloop); - } -} - -static gboolean -failed_cb (gpointer data) -{ - g_debug("Failed to get a server in 5 seconds."); - passed = FALSE; - g_main_loop_quit(mainloop); - return FALSE; -} - -int -main (int argc, char * argv) -{ - g_type_init(); - - IndicateListener * listener = indicate_listener_ref_default(); - - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added), NULL); - - g_timeout_add_seconds(5, failed_cb, NULL); - - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); - - return !passed; -} diff --git a/tests/test_interests b/tests/test_interests deleted file mode 100755 index 750a789..0000000 --- a/tests/test_interests +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -DBUS_RUNNER="dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf" - -${DBUS_RUNNER} --task ./test-interests-client --task-name Client --task ./test-interests-server --task-name Server diff --git a/tests/test_interests_multi b/tests/test_interests_multi deleted file mode 100755 index 4dbdee8..0000000 --- a/tests/test_interests_multi +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -DBUS_RUNNER="dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf" - -${DBUS_RUNNER} --task ./test-interests-client --task-name Client --task ./test-interests-server1 --task-name Server1 --task ./test-interests-server2 --task-name Server2 --task ./test-interests-server3 --task-name Server3 --task ./test-interests-server4 --task-name Server4 --task ./test-interests-server5 --task-name Server5 diff --git a/tests/test_simple b/tests/test_simple deleted file mode 100755 index 1b0dc4c..0000000 --- a/tests/test_simple +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -DBUS_RUNNER="dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf" - -${DBUS_RUNNER} --task ./test-simple-client --task-name Client --task ./test-simple-server --task-name Server diff --git a/tests/test_thousand_indicators b/tests/test_thousand_indicators deleted file mode 100755 index fb1079d..0000000 --- a/tests/test_thousand_indicators +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -DBUS_RUNNER="dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf" - -${DBUS_RUNNER} --task ./test-thousand-indicators-client --task-name Client --task ./test-thousand-indicators-server --task-name Server -- cgit v1.2.3