diff options
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 311 |
1 files changed, 302 insertions, 9 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index f1b50bc..61b3e69 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,19 +1,33 @@ DBUS_RUNNER=dbus-test-runner +CLEANFILES= +DISTCLEANFILES= +EXTRA_DIST = + TESTS = \ test-glib-objects-test \ + test-glib-events \ test-glib-layout \ test-glib-properties \ test-glib-proxy \ test-glib-simple-items \ test-glib-submenu \ + test-json \ + test-gtk-objects-test \ test-gtk-label \ - test-gtk-reorder + test-gtk-shortcut \ + test-gtk-shortcut-python \ + test-gtk-reorder \ + test-gtk-submenu \ + test-gtk-parser-test \ + test-glib-simple-items.py check_PROGRAMS = \ glib-server-nomenu \ test-glib-objects \ + test-glib-events-client \ + test-glib-events-server \ test-glib-layout-client \ test-glib-layout-server \ test-glib-properties-client \ @@ -21,15 +35,63 @@ check_PROGRAMS = \ test-glib-proxy-client \ test-glib-proxy-server \ test-glib-proxy-proxy \ + test-gtk-objects \ test-glib-submenu-client \ test-glib-submenu-server \ test-gtk-label-client \ test-gtk-label-server \ + test-gtk-shortcut-client \ + test-gtk-shortcut-server \ test-glib-simple-items \ - test-gtk-reorder-server + test-gtk-reorder-server \ + test-json-client \ + test-json-server \ + test-gtk-submenu-server \ + test-gtk-submenu-client \ + test-gtk-parser XVFB_RUN=". $(srcdir)/run-xvfb.sh" +# for the GI tests, prefer/use the typelibs from the local build tree +TESTS_ENVIRONMENT = env GI_TYPELIB_PATH=$(top_builddir)/libdbusmenu-glib:$(top_builddir)/libdbusmenu-gtk:$(GI_TYPELIB_PATH) + +###################### +# JSON Loader lib +###################### + +lib_LTLIBRARIES = libdbusmenu-jsonloader.la + +libdbusmenu_jsonloaderincludedir=$(includedir)/libdbusmenu-0.4/libdbusmenu-jsonloader/ + +libdbusmenu_jsonloaderinclude_HEADERS = \ + json-loader.h + +libdbusmenu_jsonloader_la_SOURCES = \ + json-loader.h \ + json-loader.c + +libdbusmenu_jsonloader_la_LDFLAGS = \ + -version-info $(LIBDBUSMENU_CURRENT):$(LIBDBUSMENU_REVISION):$(LIBDBUSMENU_AGE) \ + -no-undefined \ + -export-symbols-regex "^[^_].*" + +libdbusmenu_jsonloader_la_CFLAGS = \ + $(DBUSMENUGLIB_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + -I $(srcdir)/.. \ + -Wall \ + -Werror \ + -DG_DISABLE_DEPRECATED \ + -DG_LOG_DOMAIN="\"LIBDBUSMENU-JSONLOADER\"" + +libdbusmenu_jsonloader_la_LIBADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + $(DBUSMENUGLIB_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +pkgconfig_DATA = dbusmenu-jsonloader-0.4.pc +pkgconfigdir = $(libdir)/pkgconfig + ###################### # Test GLib server ###################### @@ -79,6 +141,78 @@ test_glib_layout_client_LDADD = \ $(DBUSMENUGLIB_LIBS) ###################### +# Test Glib Events +###################### + +test-glib-events: test-glib-events-client test-glib-events-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(DBUS_RUNNER) --task ./test-glib-events-client --task-name Client --task ./test-glib-events-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +test_glib_events_server_SOURCES = \ + test-glib-events-server.c + +test_glib_events_server_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_glib_events_server_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + $(DBUSMENUGLIB_LIBS) + +test_glib_events_client_SOURCES = \ + test-glib-events-client.c + +test_glib_events_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_glib_events_client_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + $(DBUSMENUGLIB_LIBS) + +###################### +# Test JSON +###################### + +test-json: test-json-client test-json-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --parameter $(top_builddir)/tools/dbusmenu-dumper --parameter test-json-01.output.json --ignore-return --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json --ignore-return >> $@ + @echo diff $(srcdir)/test-json-01.json test-json-01.output.json \> /dev/null >> $@ + @chmod +x $@ + +CLEANFILES += test-json-01.output.json + +test_json_server_SOURCES = \ + test-json-server.c + +test_json_server_CFLAGS = \ + -I $(srcdir)/.. \ + -I $(srcdir) \ + $(DBUSMENUGLIB_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + -Wall -Werror + +test_json_server_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + libdbusmenu-jsonloader.la \ + $(DBUSMENUTESTS_LIBS) \ + $(DBUSMENUGLIB_LIBS) + +test_json_client_SOURCES = \ + test-json-client.c + +test_json_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_json_client_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + $(DBUSMENUTESTS_LIBS) \ + $(DBUSMENUGLIB_LIBS) + +###################### # Test Glib Submenu ###################### @@ -119,7 +253,7 @@ OBJECT_XML_REPORT = test-glib-objects.xml test-glib-objects-test: test-glib-objects Makefile.am @echo "#!/bin/bash" > $@ - @echo $(DBUS_RUNNER) --task gtester --parameter --verbose --parameter -k --parameter -o --parameter $(OBJECT_XML_REPORT) --parameter ./test-glib-objects >> $@ + @echo $(DBUS_RUNNER) --task gtester --task-name test --parameter --verbose --parameter -k --parameter -o --parameter $(OBJECT_XML_REPORT) --parameter ./test-glib-objects >> $@ @chmod +x $@ test_glib_objects_SOURCES = \ @@ -133,6 +267,8 @@ test_glib_objects_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGLIB_LIBS) +DISTCLEANFILES += $(OBJECT_XML_REPORT) + ###################### # Test Glib Properties ###################### @@ -231,6 +367,68 @@ test_glib_simple_items_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGLIB_LIBS) +EXTRA_DIST += test-glib-simple-items.py + +###################### +# Test GTK Object +###################### + +GTK_OBJECT_XML_REPORT = test-gtk-objects.xml + +test-gtk-objects-test: test-gtk-objects Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task gtester --task-name test --parameter --verbose --parameter -k --parameter -o --parameter $(GTK_OBJECT_XML_REPORT) --parameter ./test-gtk-objects >> $@ + @chmod +x $@ + +test_gtk_objects_SOURCES = \ + test-gtk-objects.c + +test_gtk_objects_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGLIB_CFLAGS) \ + $(DBUSMENUGTK_CFLAGS) \ + -DSRCDIR="\"$(srcdir)\"" \ + -Wall -Werror + +test_gtk_objects_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGLIB_LIBS) \ + $(DBUSMENUGTK_LIBS) + +DISTCLEANFILES += $(GTK_OBJECT_XML_REPORT) + +###################### +# Test GTK Parser +###################### + +GTK_PARSER_XML_REPORT = test-gtk-parser.xml + +test-gtk-parser-test: test-gtk-parser Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo gtester --verbose -k -o $(GTK_PARSER_XML_REPORT) ./test-gtk-parser >> $@ + @chmod +x $@ + +test_gtk_parser_SOURCES = \ + test-gtk-parser.c + +test_gtk_parser_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGLIB_CFLAGS) \ + $(DBUSMENUGTK_CFLAGS) \ + -DSRCDIR="\"$(srcdir)\"" \ + -Wall -Werror + +test_gtk_parser_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGLIB_LIBS) \ + $(DBUSMENUGTK_LIBS) + +DISTCLEANFILES += $(GTK_PARSER_XML_REPORT) + ######################### # Test GTK Label ######################### @@ -253,6 +451,7 @@ test_gtk_label_server_CFLAGS = \ test_gtk_label_server_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + libdbusmenu-jsonloader.la \ $(DBUSMENUGTK_LIBS) \ $(DBUSMENUTESTS_LIBS) @@ -272,6 +471,59 @@ test_gtk_label_client_LDADD = \ $(DBUSMENUTESTS_LIBS) ######################### +# Test GTK Shortcut +######################### + +test-gtk-shortcut: test-gtk-shortcut-client test-gtk-shortcut-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +test_gtk_shortcut_server_SOURCES = \ + test-gtk-shortcut-server.c + +test_gtk_shortcut_server_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_shortcut_server_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +test_gtk_shortcut_client_SOURCES = \ + test-gtk-shortcut-client.c + +test_gtk_shortcut_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_shortcut_client_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +######################### +# Test GTK Shortcut Python +######################### + +test-gtk-shortcut-python: test-gtk-shortcut-server test-gtk-shortcut-client.py Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task $(srcdir)/test-gtk-shortcut-client.py --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +EXTRA_DIST += test-gtk-shortcut-client.py +CLEANFILES += test-gtk-shortcut-client.pyc + +######################### # Test GTK Reorder ######################### @@ -297,6 +549,46 @@ test_gtk_reorder_server_LDADD = \ $(DBUSMENUTESTS_LIBS) ######################### +# Test GTK Submenu +######################### + +test-gtk-submenu: test-gtk-submenu-client test-gtk-submenu-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-submenu-client --task-name Client --task ./test-gtk-submenu-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +test_gtk_submenu_server_SOURCES = \ + test-gtk-submenu-server.c + +test_gtk_submenu_server_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_submenu_server_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +test_gtk_submenu_client_SOURCES = \ + test-gtk-submenu-client.c + +test_gtk_submenu_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_submenu_client_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +######################### # Test Mago ######################### @@ -325,10 +617,11 @@ jsondir = $(datadir)/${PACKAGE}/json/ json_DATA = \ test-gtk-label.json -EXTRA_DIST = \ +EXTRA_DIST += \ $(examples_DATA) \ run-xvfb.sh \ $(json_DATA) \ + test-gtk-objects.jpg \ dbusmenu-gtk/dbusMenuTest \ dbusmenu-gtk/mago_tests/dbusmenu.xml \ dbusmenu-gtk/mago_tests/dbusmenu.py \ @@ -347,15 +640,15 @@ EXTRA_DIST = \ 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 + dbusmenu-gtk/mago_tests/data/test-gtk-label.json \ + test-json-01.json -CLEANFILES = \ +CLEANFILES += \ dbusmenu-gtk/mago_tests/dbusmenu.pyc distclean-local: -rm -rf $(builddir)/mago.results -DISTCLEANFILES = \ - $(TESTS) \ - $(OBJECT_XML_REPORT) +DISTCLEANFILES += \ + $(filter-out %.py, $(TESTS)) |