From 2333cc937e08c8027ff62faceea6e383d0fc9b78 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 5 Dec 2012 12:59:49 -0500 Subject: Move TestCanStartService into a separate make target "localcheck"; so that the other tests can successfully run, and this one be used as an integration check. --- Makefile.am | 2 ++ debian/changelog | 3 +++ tests/Makefile.am | 9 +++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8fb5d77..a406d44 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,4 +40,6 @@ dist-hook: echo Failed to generate AUTHORS: not a branch >&2; \ fi +localcheck: + include $(top_srcdir)/Makefile.am.coverage diff --git a/debian/changelog b/debian/changelog index 060d8a7..d4a6e10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,9 @@ indicator-session (12.10.5-0ubuntu1) UNRELEASED; urgency=low - Hide 'start screen saver' action, if it's locked down. (LP: #1066825) - Use the same icons in the greeter as in the user session (LP: #1049244) - Test upower_proxy for NULL before using it. (LP: #1061844) + * Move TestCanStartService into a separate make target "localcheck"; so that + the other tests can successfully run, and this one be used as an + integration check. [ Sebastien Bacher ] * debian/control: diff --git a/tests/Makefile.am b/tests/Makefile.am index 088b283..9f9f961 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,6 +3,9 @@ CLEANFILES = BUILT_SOURCES = check_PROGRAMS = +localcheckdir = . +localcheck_PROGRAMS = + ### ### ### @@ -29,8 +32,10 @@ gschemas.compiled: Makefile $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --targetdir=. . -TESTS += test-service -check_PROGRAMS += test-service +localcheck: + ./test-service + +localcheck_PROGRAMS += test-service test_service_SOURCES = test-service.cc test_service_LDADD = \ $(TEST_SERVICE_LIBS) \ -- cgit v1.2.3 From 32c7a3f3a74a74543b8c33447261b103bb165f60 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Thu, 6 Dec 2012 10:05:18 -0500 Subject: - Add XS-Testsuite: autopkgtest. * debian/tests: - Add start-service test; verify that the indicator can be started from DBUS. - Add debian/tests/control. --- debian/changelog | 5 +++++ debian/control | 1 + debian/tests/control | 3 +++ debian/tests/start-service | 3 +++ 4 files changed, 12 insertions(+) create mode 100644 debian/tests/control create mode 100644 debian/tests/start-service diff --git a/debian/changelog b/debian/changelog index d4a6e10..14c76e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,11 @@ indicator-session (12.10.5-0ubuntu1) UNRELEASED; urgency=low - Remove libpackagekit-glib2-dev and libpolkit-gobject-1-dev from Build-Depends. (LP: #1085100) - Remove packagekit from Recommends + - Add XS-Testsuite: autopkgtest. + * debian/tests: + - Add start-service test; verify that the indicator can be started from + DBUS. + - Add debian/tests/control. * Automatic snapshot from revision 373 (bootstrap): - Check to make sure that create_display_proxy() succeeded before using the proxy pointer that gets returned. (LP: #1078119) diff --git a/debian/control b/debian/control index d910c9c..0432587 100644 --- a/debian/control +++ b/debian/control @@ -23,6 +23,7 @@ Homepage: https://launchpad.net/indicator-session # and sync up the code again. Vcs-Bzr: https://code.launchpad.net/~indicator-applet-developers/indicator-session/trunk.13.04 Vcs-Browser: https://bazaar.launchpad.net/~indicator-applet-developers/indicator-session/trunk.13.04/files +XS-Testsuite: autopkgtest Package: indicator-session Architecture: any diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..c1ccd70 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: start-service +Depends: dbus-test-runner, indicator-session +Restrictions: build-needed diff --git a/debian/tests/start-service b/debian/tests/start-service new file mode 100644 index 0000000..c1d59c2 --- /dev/null +++ b/debian/tests/start-service @@ -0,0 +1,3 @@ +#!/bin/sh + +dbus-test-runner -t tests/test-service -- cgit v1.2.3 From 5e037404801fcf1f852a6a3ce08f4b8db598b762 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Mon, 14 Jan 2013 14:36:28 -0500 Subject: Rename localcheck to integrationcheck; update autopkgtest test. --- Makefile.am | 2 -- debian/tests/start-service | 16 ++++++++++++---- tests/Makefile.am | 8 ++++---- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Makefile.am b/Makefile.am index a406d44..8fb5d77 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,6 +40,4 @@ dist-hook: echo Failed to generate AUTHORS: not a branch >&2; \ fi -localcheck: - include $(top_srcdir)/Makefile.am.coverage diff --git a/debian/tests/start-service b/debian/tests/start-service index 1aeef94..7227cb2 100644 --- a/debian/tests/start-service +++ b/debian/tests/start-service @@ -1,12 +1,20 @@ #!/bin/sh -dbus-daemon --fork --print-address=4 --config-file /usr/share/aptdaemon/tests/dbus.conf --print-pid=5 4>/tmp/bus-addr 5>/tmp/pid-bus +set -x +set -e -DBUS_SYSTEM_BUS_ADDRESS=`cat /tmp/bus-addr` +if [ ! -d /var/run/dbus ]; then + mkdir /var/run/dbus +fi -/usr/sbin/console-kit-daemon & +dbus-daemon --fork --print-address=4 --config-file /etc/dbus-1/system.conf --print-pid=5 4>/tmp/system-bus-addr 5>/tmp/system-bus-pid +dbus-daemon --fork --session --print-address=4 --config-file 4>/tmp/session-bus-addr + +DBUS_SYSTEM_BUS_ADDRESS=`cat /tmp/system-bus-addr` +DBUS_SESSION_BUS_ADDRESS=`cat /tmp/session-bus-addr` +/usr/sbin/console-kit-daemon & /usr/lib/accountsservice/accounts-daemon & -tests/test-service +make -C tests integrationcheck diff --git a/tests/Makefile.am b/tests/Makefile.am index 9f9f961..c117c95 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,8 +3,8 @@ CLEANFILES = BUILT_SOURCES = check_PROGRAMS = -localcheckdir = . -localcheck_PROGRAMS = +integrationcheckdir = . +integrationcheck_PROGRAMS = ### ### @@ -32,10 +32,10 @@ gschemas.compiled: Makefile $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --targetdir=. . -localcheck: +integrationcheck: ./test-service -localcheck_PROGRAMS += test-service +integrationcheck_PROGRAMS += test-service test_service_SOURCES = test-service.cc test_service_LDADD = \ $(TEST_SERVICE_LIBS) \ -- cgit v1.2.3 From d6c6804420a3c627c056cb0ffc7b6095b2f4fb47 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Tue, 15 Jan 2013 11:33:47 -0500 Subject: Add polkit to autopkgtest depends --- debian/tests/control | 2 +- debian/tests/start-service | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/tests/control b/debian/tests/control index e24f71b..d1ec14a 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,3 @@ Tests: start-service -Depends: python3-aptdaemon.test, accountsservice, consolekit, indicator-session +Depends: python3-aptdaemon.test, policykit-1, accountsservice, consolekit, indicator-session Restrictions: build-needed diff --git a/debian/tests/start-service b/debian/tests/start-service index 7227cb2..3b81bbc 100644 --- a/debian/tests/start-service +++ b/debian/tests/start-service @@ -13,6 +13,7 @@ dbus-daemon --fork --session --print-address=4 --config-file 4>/tmp/session-bus- DBUS_SYSTEM_BUS_ADDRESS=`cat /tmp/system-bus-addr` DBUS_SESSION_BUS_ADDRESS=`cat /tmp/session-bus-addr` +/usr/lib/policykit-1/polkitd 2>&1 & /usr/sbin/console-kit-daemon & /usr/lib/accountsservice/accounts-daemon & -- cgit v1.2.3 From 31a952e5ad6bdaaa7f7fdb369f1833457a0418f0 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Tue, 15 Jan 2013 17:52:32 -0500 Subject: debian/control: temporarily comment out the XS-Testsuite entry to disable autopkgtest until the tests really work properly. --- debian/changelog | 2 ++ debian/control | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 882d64a..eb8acc2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,8 @@ indicator-session (12.10.5-0ubuntu1) UNRELEASED; urgency=low * Move TestCanStartService into a separate make target "localcheck"; so that the other tests can successfully run, and this one be used as an integration check. + * debian/control: temporarily comment out the XS-Testsuite entry to disable + autopkgtest until the tests really work properly. [ Sebastien Bacher ] * debian/control: diff --git a/debian/control b/debian/control index 0432587..3131969 100644 --- a/debian/control +++ b/debian/control @@ -23,7 +23,7 @@ Homepage: https://launchpad.net/indicator-session # and sync up the code again. Vcs-Bzr: https://code.launchpad.net/~indicator-applet-developers/indicator-session/trunk.13.04 Vcs-Browser: https://bazaar.launchpad.net/~indicator-applet-developers/indicator-session/trunk.13.04/files -XS-Testsuite: autopkgtest +#XS-Testsuite: autopkgtest Package: indicator-session Architecture: any -- cgit v1.2.3 From 5dc4e9d194c9323db74750b069a8ec446a48e3ef Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 16 Jan 2013 14:03:59 -0500 Subject: Add comment in debian/tests/control for the reason why tests are disabled. --- debian/tests/control | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/tests/control b/debian/tests/control index d1ec14a..008828a 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,5 @@ -Tests: start-service +#Tests: start-service +# start-service currently disabled; it needs services running for it to pass +# and that currently can't be setup properly in a buildd. Depends: python3-aptdaemon.test, policykit-1, accountsservice, consolekit, indicator-session Restrictions: build-needed -- cgit v1.2.3