From 8a0649a9f1fe4914149a86f42f5e503be8edd87f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 12 Jul 2010 13:55:08 -0500 Subject: Adding in setting the environment variable to adjust the timeout to be twice as long for slow systems. --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index 867d4de..f2bdbb2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -118,6 +118,7 @@ test_approver_LDADD = \ test-approver-tester: test-approver Makefile.am @echo "#!/bin/bash" > $@ + @echo export INDICATOR_SERVICE_SHUTDOWN_TIMEOUT=1000 >> $@ @echo . $(srcdir)/run-xvfb.sh >> $@ @echo $(DBUS_RUNNER) --task $(builddir)/test-approver --task-name Approver --task $(top_builddir)/src/indicator-application-service --task-name Service --ignore-return >> $@ @chmod +x $@ -- cgit v1.2.3 From 930a79ae19c29e718b9fb49246baba58f9c32875 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 12 Jul 2010 13:57:47 -0500 Subject: Add a fail timeout so this test can't block. --- tests/test-approver.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test-approver.c b/tests/test-approver.c index 30beb30..bc25761 100644 --- a/tests/test-approver.c +++ b/tests/test-approver.c @@ -136,6 +136,14 @@ check_for_service (gpointer user_data) return TRUE; } +gboolean +fail_timeout (gpointer user_data) +{ + g_debug("Failure timeout initiated."); + g_main_loop_quit(main_loop); + return FALSE; +} + int main (int argc, char ** argv) { @@ -156,6 +164,7 @@ main (int argc, char ** argv) bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); g_timeout_add(100, check_for_service, NULL); + g_timeout_add_seconds(2, fail_timeout, NULL); main_loop = g_main_loop_new(NULL, FALSE); g_main_loop_run(main_loop); -- cgit v1.2.3 From e1dc7c00dd8f0d94f84dbd4fe626ea365a2543db Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 12 Jul 2010 13:58:37 -0500 Subject: Ignoring the tester script --- .bzrignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.bzrignore b/.bzrignore index ad46d0c..cbf5964 100644 --- a/.bzrignore +++ b/.bzrignore @@ -110,3 +110,4 @@ bindings/mono/policy.appindicator-sharp.dll src/notification-approver-client.h src/notification-approver-server.h tests/test-approver +tests/test-approver-tester -- cgit v1.2.3