aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore1
-rw-r--r--configure.ac1
-rw-r--r--tests/Makefile.am45
-rw-r--r--tests/dbusmenu-gtk/Makefile.am8
-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
6 files changed, 54 insertions, 25 deletions
diff --git a/.bzrignore b/.bzrignore
index 8988241..398d2da 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -51,3 +51,4 @@ tests/test-gtk-reorder
tools/dbusmenu-dumper
libdbusmenu-[0-9].[0-9].[0-9].tar.gz
libdbusmenu-[0-9].[0-9].[0-9].tar.gz.asc
+tests/test-mago
diff --git a/configure.ac b/configure.ac
index bf492dc..3b19cea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,7 +108,6 @@ libdbusmenu-qt/Makefile
libdbusmenu-qt/dbusmenu-qt.pc
tools/Makefile
tests/Makefile
-tests/dbusmenu-gtk/Makefile
])
###########################
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f111054..b93f90b 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,15 @@ 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 PYTHONPATH=$(srcdir)/dbusmenu-gtk/maga_tests:$(PYTHONPATH) mago -f dbusmenu.xml -t $(builddir)/mago.results >> test-mago
+ @chmod +x test-mago
#########################
# Other
@@ -188,7 +197,31 @@ examples_DATA = \
EXTRA_DIST = \
$(examples_DATA) \
- test-gtk-label.json
+ test-gtk-label.json \
+ dbusmenu-gtk/dbusMenuTest \
+ 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
index 7fdd6d9..1d4a09f 100644
--- a/tests/dbusmenu-gtk/Makefile.am
+++ b/tests/dbusmenu-gtk/Makefile.am
@@ -3,15 +3,12 @@ check: tests
tests: mago
-mago: dbusmenu.xml dbusmenu.py
+mago: dbusmenu.xml mago_tests/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 \
@@ -35,8 +32,7 @@ EXTRA_DIST = \
CLEANFILES = \
mago_tests/dbusmenu.xml \
- mago_tests/dbusmenu.pyc \
- mago_tests/dbusmenu.py
+ mago_tests/dbusmenu.pyc
distclean-local:
-rm -rf $(builddir)/mago.results
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>