diff options
author | Ted Gould <ted@canonical.com> | 2009-10-11 12:31:22 -0400 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-11 12:31:22 -0400 |
commit | eb1fb47800188b38f06c6b5933d2362bfaace29c (patch) | |
tree | 703a2900d3a27f27f93d13a2eef3fd7756347133 /tests | |
parent | 1e668b013089c5a4027102bca75f7542917fef2d (diff) | |
parent | 3912706e8bbfb7c0d33b7dff126a8c4ad6b110d1 (diff) | |
download | libdbusmenu-eb1fb47800188b38f06c6b5933d2362bfaace29c.tar.gz libdbusmenu-eb1fb47800188b38f06c6b5933d2362bfaace29c.tar.bz2 libdbusmenu-eb1fb47800188b38f06c6b5933d2362bfaace29c.zip |
Merging in the updates to make mago work nicely.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 50 | ||||
-rw-r--r-- | tests/dbusmenu-gtk/Makefile.am | 43 | ||||
-rwxr-xr-x | tests/dbusmenu-gtk/dbusMenuTest | 2 | ||||
-rw-r--r-- | tests/dbusmenu-gtk/mago_tests/dbusmenu.py (renamed from tests/dbusmenu-gtk/dbusmenu.py.in) | 4 | ||||
-rw-r--r-- | tests/dbusmenu-gtk/mago_tests/dbusmenu.xml (renamed from tests/dbusmenu-gtk/dbusmenu.xml.in) | 20 |
5 files changed, 57 insertions, 62 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index f111054..10fe857 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,8 +1,8 @@ -SUBDIRS = dbusmenu-gtk DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf TESTS = \ + test-mago \ test-glib-layout \ test-glib-properties \ test-gtk-label \ @@ -35,7 +35,7 @@ glib_server_nomenu_LDADD = \ # Test Glib Layout ###################### -test-glib-layout: test-glib-layout-client test-glib-layout-server +test-glib-layout: test-glib-layout-client test-glib-layout-server Makefile.am @echo "#!/bin/sh" > test-glib-layout @echo $(DBUS_RUNNER) --task ./test-glib-layout-client --task-name Client --task ./test-glib-layout-server --task-name Server --ignore-return >> test-glib-layout @chmod +x test-glib-layout @@ -69,7 +69,7 @@ test_glib_layout_client_LDADD = \ # Test Glib Properties ###################### -test-glib-properties: test-glib-properties-client test-glib-properties-server +test-glib-properties: test-glib-properties-client test-glib-properties-server Makefile.am @echo "#!/bin/sh" > test-glib-properties @echo $(DBUS_RUNNER) --task ./test-glib-properties-client --task-name Client --task ./test-glib-properties-server --task-name Server --ignore-return >> test-glib-properties @chmod +x test-glib-properties @@ -117,7 +117,7 @@ test_glib_simple_items_LDADD = \ # Test GTK Label ######################### -test-gtk-label: test-gtk-label-client test-gtk-label-server test-gtk-label.json +test-gtk-label: test-gtk-label-client test-gtk-label-server test-gtk-label.json Makefile.am @echo "#!/bin/sh" > test-gtk-label @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-label-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> test-gtk-label @chmod +x test-gtk-label @@ -156,7 +156,7 @@ test_gtk_label_client_LDADD = \ # Test GTK Reorder ######################### -test-gtk-reorder: test-gtk-label-client test-gtk-reorder-server +test-gtk-reorder: test-gtk-label-client test-gtk-reorder-server Makefile.am @echo "#!/bin/sh" > test-gtk-reorder @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-reorder-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> test-gtk-reorder @chmod +x test-gtk-reorder @@ -176,6 +176,18 @@ test_gtk_reorder_server_LDADD = \ $(DBUSMENUGTK_LIBS) \ $(DBUSMENUTESTS_LIBS) +######################### +# 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 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 ######################### # Other @@ -188,7 +200,33 @@ examples_DATA = \ EXTRA_DIST = \ $(examples_DATA) \ - test-gtk-label.json + test-gtk-label.json \ + dbusmenu-gtk/dbusMenuTest \ + dbusmenu-gtk/mago_tests/dbusmenu.xml \ + dbusmenu-gtk/mago_tests/dbusmenu.py \ + dbusmenu-gtk/mago_tests/data/blank_label_2levels.json \ + dbusmenu-gtk/mago_tests/data/blank_label.json \ + dbusmenu-gtk/mago_tests/data/blank_submenus.json \ + dbusmenu-gtk/mago_tests/data/dynamic.json \ + dbusmenu-gtk/mago_tests/data/long_label.json \ + dbusmenu-gtk/mago_tests/data/no_id.json \ + dbusmenu-gtk/mago_tests/data/no_label.json \ + dbusmenu-gtk/mago_tests/data/sameid_submenus_diff_sizes.json \ + dbusmenu-gtk/mago_tests/data/sameid_submenus.json \ + dbusmenu-gtk/mago_tests/data/sameid_top_and_submenus.json \ + dbusmenu-gtk/mago_tests/data/sameid_topmenu.json \ + dbusmenu-gtk/mago_tests/data/several_submenus.json \ + dbusmenu-gtk/mago_tests/data/several_submenus_recursive.json \ + dbusmenu-gtk/mago_tests/data/several_submenus_utf8.json \ + dbusmenu-gtk/mago_tests/data/static.json \ + dbusmenu-gtk/mago_tests/data/test-gtk-label.json + +CLEANFILES = \ + dbusmenu-gtk/mago_tests/dbusmenu.xml \ + dbusmenu-gtk/mago_tests/dbusmenu.pyc + +distclean-local: + -rm -rf $(builddir)/dbusmenu-gtk/mago.results DISTCLEANFILES = \ $(TESTS) diff --git a/tests/dbusmenu-gtk/Makefile.am b/tests/dbusmenu-gtk/Makefile.am deleted file mode 100644 index 7fdd6d9..0000000 --- a/tests/dbusmenu-gtk/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ - -check: tests - -tests: mago - -mago: dbusmenu.xml dbusmenu.py - PYTHONPATH=$(builddir) mago -f dbusmenu.xml -t $(builddir)/mago.results - -dbusmenu.xml: dbusmenu.xml.in - sed -e "s|\@srcdir\@|$(srcdir)|" $< > mago_tests/$@ - -dbusmenu.py: dbusmenu.py.in - sed -e "s|\@srcdir\@|$(srcdir)|" $< > mago_tests/$@ - -EXTRA_DIST = \ - dbusmenu.xml.in \ - dbusmenu.py.in \ - dbusMenuTest \ - mago_tests/data/blank_label_2levels.json \ - mago_tests/data/blank_label.json \ - mago_tests/data/blank_submenus.json \ - mago_tests/data/dynamic.json \ - mago_tests/data/long_label.json \ - mago_tests/data/no_id.json \ - mago_tests/data/no_label.json \ - mago_tests/data/sameid_submenus_diff_sizes.json \ - mago_tests/data/sameid_submenus.json \ - mago_tests/data/sameid_top_and_submenus.json \ - mago_tests/data/sameid_topmenu.json \ - mago_tests/data/several_submenus.json \ - mago_tests/data/several_submenus_recursive.json \ - mago_tests/data/several_submenus_utf8.json \ - mago_tests/data/static.json \ - mago_tests/data/test-gtk-label.json - -CLEANFILES = \ - mago_tests/dbusmenu.xml \ - mago_tests/dbusmenu.pyc \ - mago_tests/dbusmenu.py - -distclean-local: - -rm -rf $(builddir)/mago.results - diff --git a/tests/dbusmenu-gtk/dbusMenuTest b/tests/dbusmenu-gtk/dbusMenuTest index 0815a79..55a791b 100755 --- a/tests/dbusmenu-gtk/dbusMenuTest +++ b/tests/dbusmenu-gtk/dbusMenuTest @@ -3,6 +3,6 @@ export NO_GAIL=0 export NO_AT_BRIDGE=0 -dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf --task ../test-gtk-label-client --task-name Client --task ../test-gtk-label-server --parameter ./mago_tests/$1 --task-name Server --ignore-return +dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf --task $INDICATOR_BUILD_DIR/test-gtk-label-client --task-name Client --task $INDICATOR_BUILD_DIR/test-gtk-label-server --parameter ./mago_tests/$1 --task-name Server --ignore-return diff --git a/tests/dbusmenu-gtk/dbusmenu.py.in b/tests/dbusmenu-gtk/mago_tests/dbusmenu.py index ce159e1..5e9f691 100644 --- a/tests/dbusmenu-gtk/dbusmenu.py.in +++ b/tests/dbusmenu-gtk/mago_tests/dbusmenu.py @@ -1,10 +1,10 @@ from mago.test_suite.main import SingleApplicationTestSuite from mago.application.main import Application -import ldtp, ooldtp, ldtputils +import ldtp, ooldtp, ldtputils, os.path class DbusMenuGtkApp(): - LAUNCHER = "@srcdir@/dbusMenuTest" + LAUNCHER = os.path.join(os.path.dirname(__file__), "..", "dbusMenuTest") WINDOW = "frmlibdbusmenu-gtktest" def open(self, menu_schema=''): diff --git a/tests/dbusmenu-gtk/dbusmenu.xml.in b/tests/dbusmenu-gtk/mago_tests/dbusmenu.xml index b49ee5e..d02191e 100644 --- a/tests/dbusmenu-gtk/dbusmenu.xml.in +++ b/tests/dbusmenu-gtk/mago_tests/dbusmenu.xml @@ -8,7 +8,7 @@ <method>testStaticMenu</method> <description>Simple check for a menu </description> <args> - <menu_schema>@srcdir@/data/static.json</menu_schema> + <menu_schema>data/static.json</menu_schema> <menu_item>value39</menu_item> </args> </case> @@ -16,7 +16,7 @@ <method>testStaticMenu</method> <description>Blank Label</description> <args> - <menu_schema>@srcdir@/data/blank_label.json</menu_schema> + <menu_schema>data/blank_label.json</menu_schema> <menu_item></menu_item> </args> </case> @@ -24,7 +24,7 @@ <method>testSubmenus</method> <description>Blank Submenus</description> <args> - <menu_schema>@srcdir@/data/blank_submenus.json</menu_schema> + <menu_schema>data/blank_submenus.json</menu_schema> <menu_item>value6</menu_item> <submenus></submenus> </args> @@ -33,7 +33,7 @@ <method>testStaticMenu</method> <description>Really Long Label (1000 chars)</description> <args> - <menu_schema>@srcdir@/data/long_label.json</menu_schema> + <menu_schema>data/long_label.json</menu_schema> <menu_item>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</menu_item> </args> </case> @@ -41,7 +41,7 @@ <method>testStaticMenu</method> <description>Search for a submenu that comes from a menu without ID</description> <args> - <menu_schema>@srcdir@/data/no_id.json</menu_schema> + <menu_schema>data/no_id.json</menu_schema> <menu_item>submenu_from_no_id</menu_item> </args> </case> @@ -49,7 +49,7 @@ <method>testStaticMenu</method> <description>Search for a submenu that comes from a menu with a blank label</description> <args> - <menu_schema>@srcdir@/data/blank_label_2levels.json</menu_schema> + <menu_schema>data/blank_label_2levels.json</menu_schema> <menu_item>value10</menu_item> </args> </case> @@ -57,7 +57,7 @@ <method>testStaticMenu</method> <description>Be sure that a submenu from a menu without label does not exist</description> <args> - <menu_schema>@srcdir@/data/no_label.json</menu_schema> + <menu_schema>data/no_label.json</menu_schema> <menu_item>submenu_from_no_label</menu_item> <notexists>True</notexists> </args> @@ -66,7 +66,7 @@ <method>testStaticMenu</method> <description>Check that a submenu is shown</description> <args> - <menu_schema>@srcdir@/data/several_submenus.json</menu_schema> + <menu_schema>data/several_submenus.json</menu_schema> <menu_item>value10</menu_item> </args> </case> @@ -74,7 +74,7 @@ <method>testStaticMenu</method> <description>Be sure that a submenu from a 4th level depth, is shown</description> <args> - <menu_schema>@srcdir@/data/several_submenus_recursive.json</menu_schema> + <menu_schema>data/several_submenus_recursive.json</menu_schema> <menu_item>value7001</menu_item> </args> </case> @@ -82,7 +82,7 @@ <method>testStaticMenu</method> <description>Be sure that a submenu, with a UTF-8 label, is shown</description> <args> - <menu_schema>@srcdir@/data/several_submenus_utf8.json</menu_schema> + <menu_schema>data/several_submenus_utf8.json</menu_schema> <menu_item>value5ス</menu_item> </args> </case> |