From 4cdbbb71476d5f3b6979f6cd43acf3b1ea1f1004 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 19 Nov 2009 17:01:38 -0600 Subject: Trying to do the xvfb stuff as a shell script to get included. Simpler, and works with autotest. --- tests/Makefile.am | 48 ++++++++++++++---------------------------------- 1 file changed, 14 insertions(+), 34 deletions(-) (limited to 'tests/Makefile.am') diff --git a/tests/Makefile.am b/tests/Makefile.am index 9d17a03..3443073 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,8 +4,11 @@ DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.c TESTS = \ test-glib-layout \ test-glib-properties \ - test-gtk-label \ test-glib-simple-items \ + test-mago + +GTK_TESTS = \ + test-gtk-label \ test-gtk-reorder check_PROGRAMS = \ @@ -19,28 +22,7 @@ check_PROGRAMS = \ test-glib-simple-items \ test-gtk-reorder-server -check-local: test-mago-xvfb - -###################### -# Xvfb server stuff -###################### - -XVFB = Xvfb -ac -noreset -screen 0 800x600x16 -XIDS = 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 \ - 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 \ - 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 \ - 1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 \ - 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 \ - 9995 9996 9997 9998 9999 -XVFB_START = \ - ${XVFB} -help 2>/dev/null 1>&2 \ - && XID=`for id in $(XIDS) ; do test -e /tmp/.X$$id-lock || { echo $$id; exit 0; }; done; exit 1` \ - && { ${XVFB} :$$XID -screen 0 800x600x16 -nolisten tcp -auth /dev/null >/dev/null 2>&1 & \ - trap "kill -15 $$! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } \ - || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \ - && DISPLAY=:$$XID && export DISPLAY -# call as: $(XVFB_START) && someprogram - +XVFB_RUN=". run-xvfb.sh" ###################### # Test GLib server @@ -206,18 +188,16 @@ test_gtk_reorder_server_LDADD = \ # Test Mago ######################### -test-mago-xvfb: test-mago - $(XVFB_START) && ./test-mago - test-mago: test-gtk-label-client test-gtk-label-server $(srcdir)/dbusmenu-gtk/mago_tests/dbusmenu.xml Makefile.am - @echo "#!/bin/sh" > test-mago - @echo cd $(srcdir)/dbusmenu-gtk >> test-mago - @echo /usr/lib/at-spi/at-spi-registryd & >> test-mago - @echo echo Mago Results dir: $(abs_builddir)/mago.results >> test-mago - @echo echo PYTHONPATH=$(abs_srcdir)/dbusmenu-gtk/mago_tests >> test-mago - @echo export INDICATOR_BUILD_DIR=$(abs_builddir) >> test-mago - @echo PYTHONPATH=$(abs_srcdir)/dbusmenu-gtk/mago_tests mago -f dbusmenu.xml -t $(abs_builddir)/mago.results --log-level=debug >> test-mago - @chmod +x test-mago + @echo "#!/bin/sh" > $@ + @echo $(XVFB_RUN) >> $@ + @echo cd $(srcdir)/dbusmenu-gtk >> $@ + @echo /usr/lib/at-spi/at-spi-registryd \& >> $@ + @echo echo Mago Results dir: $(abs_builddir)/mago.results >> $@ + @echo echo PYTHONPATH=$(abs_srcdir)/dbusmenu-gtk/mago_tests >> $@ + @echo export INDICATOR_BUILD_DIR=$(abs_builddir) >> $@ + @echo PYTHONPATH=$(abs_srcdir)/dbusmenu-gtk/mago_tests mago -f dbusmenu.xml -t $(abs_builddir)/mago.results --log-level=debug >> $@ + @chmod +x $@ ######################### # Other -- cgit v1.2.3