diff options
author | Robert Tari <robert@tari.in> | 2021-05-14 17:25:41 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-05-14 17:25:41 +0200 |
commit | 763acdea57d43c9a5dd063879a050c76b72c26dc (patch) | |
tree | 0dfc1c8c031490d2f3ad3d0605ac0e764b669e42 /tests | |
parent | 025c376068f63d8c2aa5899a3c0b1b827370da28 (diff) | |
parent | 173f104d15f5bd7478eed303c43e8426fb6d67a8 (diff) | |
download | libayatana-indicator-763acdea57d43c9a5dd063879a050c76b72c26dc.tar.gz libayatana-indicator-763acdea57d43c9a5dd063879a050c76b72c26dc.tar.bz2 libayatana-indicator-763acdea57d43c9a5dd063879a050c76b72c26dc.zip |
Merge branch 'sunweaver-pr/bring-back-gtk2-builds'
Attributes GH PR #44: https://github.com/AyatanaIndicators/libayatana-indicator/pull/44
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 190 | ||||
-rw-r--r-- | tests/Makefile.am | 528 | ||||
-rw-r--r-- | tests/run-xvfb.sh | 8 |
3 files changed, 55 insertions, 671 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bb9c0f4..4c24321 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,121 +1,39 @@ -# dummy-indicator-blank - -set_source_files_properties(dummy-indicator-blank.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("dummy-indicator-blank" SHARED dummy-indicator-blank.c) -target_include_directories("dummy-indicator-blank" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("dummy-indicator-blank" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# dummy-indicator-entry-func - -set_source_files_properties(dummy-indicator-entry-func.h PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("dummy-indicator-entry-func" SHARED dummy-indicator-entry-func.c) -target_include_directories("dummy-indicator-entry-func" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("dummy-indicator-entry-func" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# dummy-indicator-null - -set_source_files_properties(dummy-indicator-null.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("dummy-indicator-null" SHARED dummy-indicator-null.c) -target_include_directories("dummy-indicator-null" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("dummy-indicator-null" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# dummy-indicator-signaller - -set_source_files_properties(dummy-indicator-signaler.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("dummy-indicator-signaler" SHARED dummy-indicator-signaler.c) -target_include_directories("dummy-indicator-signaler" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("dummy-indicator-signaler" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# dummy-indicator-simple - -set_source_files_properties(dummy-indicator-simple.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("dummy-indicator-simple" SHARED dummy-indicator-simple.c) -target_include_directories("dummy-indicator-simple" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("dummy-indicator-simple" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# dummy-indicator-visible - -set_source_files_properties(dummy-indicator-visible.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("dummy-indicator-visible" SHARED dummy-indicator-visible.c) -target_include_directories("dummy-indicator-visible" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("dummy-indicator-visible" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-manager-connect - -set_source_files_properties(service-manager-connect.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-manager-connect" SHARED service-manager-connect.c) -target_include_directories("service-manager-connect" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-manager-connect" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-manager-connect-service - -set_source_files_properties(service-manager-connect-service.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-manager-connect-service" SHARED service-manager-connect-service.c) -target_include_directories("service-manager-connect-service" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-manager-connect-service" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-manager-no-connect - -set_source_files_properties(service-manager-no-connect.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-manager-no-connect" SHARED service-manager-no-connect.c) -target_include_directories("service-manager-no-connect" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-manager-no-connect" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-manager-nostart-connect - -set_source_files_properties(service-manager-nostart-connect.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-manager-nostart-connect" SHARED service-manager-nostart-connect.c) -target_include_directories("service-manager-nostart-connect" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-manager-nostart-connect" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-shutdown-timeout - -set_source_files_properties(service-shutdown-timeout.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-shutdown-timeout" SHARED service-shutdown-timeout.c) -target_include_directories("service-shutdown-timeout" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-shutdown-timeout" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-version-bad-service - -set_source_files_properties(service-version-bad-service.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-version-bad-service" SHARED service-version-bad-service.c) -target_include_directories("service-version-bad-service" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-version-bad-service" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-version-good-service - -set_source_files_properties(service-version-good-service.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-version-good-service" SHARED service-version-good-service.c) -target_include_directories("service-version-good-service" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-version-good-service" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-version-manager - -set_source_files_properties(service-version-manager.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-version-manager" SHARED service-version-manager.c) -target_include_directories("service-version-manager" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-version-manager" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-version-multiwatch-manager - -set_source_files_properties(service-version-multiwatch-manager.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-version-multiwatch-manager" SHARED service-version-multiwatch-manager.c) -target_include_directories("service-version-multiwatch-manager" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-version-multiwatch-manager" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-version-multiwatch-manager-impolite - -set_source_files_properties(service-version-multiwatch-manager-impolite.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-version-multiwatch-manager-impolite" SHARED service-version-multiwatch-manager-impolite.c) -target_include_directories("service-version-multiwatch-manager-impolite" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-version-multiwatch-manager-impolite" PUBLIC "${CMAKE_SOURCE_DIR}/src") - -# service-version-multiwatch-service - -set_source_files_properties(service-version-multiwatch-service.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("service-version-multiwatch-service" SHARED service-version-multiwatch-service.c) -target_include_directories("service-version-multiwatch-service" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("service-version-multiwatch-service" PUBLIC "${CMAKE_SOURCE_DIR}/src") +if (FLAVOUR_GTK3) + # libayatana-indicator3.so + set (ayatana_indicator_gtkver "ayatana-indicator3") +else() + # libayatana-indicator.so + set (ayatana_indicator_gtkver "ayatana-indicator") +endif() + +function(add_test_helper_by_name name) + set (TEST_HELPER_NAME ${name}) + set_source_files_properties(${TEST_HELPER_NAME}.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) + add_library("${TEST_HELPER_NAME}" SHARED ${TEST_HELPER_NAME}.c) + target_include_directories("${TEST_HELPER_NAME}" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) + target_include_directories("${TEST_HELPER_NAME}" PUBLIC "${CMAKE_SOURCE_DIR}/src") + target_link_libraries("${TEST_HELPER_NAME}" ${PROJECT_DEPS_LIBRARIES} -l${ayatana_indicator_gtkver}) + target_link_directories("${TEST_HELPER_NAME}" PUBLIC "${CMAKE_BINARY_DIR}/src") + add_dependencies("${TEST_HELPER_NAME}" "${ayatana_indicator_gtkver}") +endfunction() + +add_test_helper_by_name(dummy-indicator-blank) +add_test_helper_by_name(dummy-indicator-entry-func) +add_test_helper_by_name(dummy-indicator-null) +add_test_helper_by_name(dummy-indicator-signaler) +add_test_helper_by_name(dummy-indicator-simple) +add_test_helper_by_name(dummy-indicator-visible) +add_test_helper_by_name(service-manager-connect) +add_test_helper_by_name(service-manager-connect-service) +add_test_helper_by_name(service-manager-no-connect) +add_test_helper_by_name(service-manager-nostart-connect) +add_test_helper_by_name(service-shutdown-timeout) +add_test_helper_by_name(service-version-bad-service) +add_test_helper_by_name(service-version-good-service) +add_test_helper_by_name(service-version-manager) +add_test_helper_by_name(service-version-multiwatch-manager) +add_test_helper_by_name(service-version-multiwatch-manager-impolite) +add_test_helper_by_name(service-version-multiwatch-service) # test-desktop-shortcuts @@ -125,24 +43,11 @@ target_compile_definitions("test-desktop-shortcuts" PUBLIC BUILD_DIR="${CMAKE_CU target_compile_definitions("test-desktop-shortcuts" PUBLIC SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}") target_include_directories("test-desktop-shortcuts" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-desktop-shortcuts" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-desktop-shortcuts" ${PROJECT_DEPS_LIBRARIES} -layatana-indicator3) +target_link_libraries("test-desktop-shortcuts" ${PROJECT_DEPS_LIBRARIES} -l${ayatana_indicator_gtkver}) target_link_directories("test-desktop-shortcuts" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-desktop-shortcuts" "ayatana-indicator3") +add_dependencies("test-desktop-shortcuts" "${ayatana_indicator_gtkver}") add_test("test-desktop-shortcuts" "test-desktop-shortcuts") -# test-indicator-ng - -set_source_files_properties(test-indicator-ng.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_executable("test-indicator-ng" test-indicator-ng.c) -target_compile_definitions("test-indicator-ng" PUBLIC BUILD_DIR="${CMAKE_CURRENT_BINARY_DIR}") -target_compile_definitions("test-indicator-ng" PUBLIC SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}") -target_include_directories("test-indicator-ng" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("test-indicator-ng" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-indicator-ng" ${PROJECT_DEPS_LIBRARIES} -layatana-indicator3) -target_link_directories("test-indicator-ng" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-indicator-ng" "ayatana-indicator3") -add_test("test-indicator-ng" "test-indicator-ng") - # test-loader set_source_files_properties(test-loader.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) @@ -150,7 +55,22 @@ add_executable("test-loader" test-loader.c) target_compile_definitions("test-loader" PUBLIC BUILD_DIR="${CMAKE_CURRENT_BINARY_DIR}") target_include_directories("test-loader" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-loader" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-loader" ${PROJECT_DEPS_LIBRARIES} -layatana-indicator3) +target_link_libraries("test-loader" ${PROJECT_DEPS_LIBRARIES} -l${ayatana_indicator_gtkver}) target_link_directories("test-loader" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-loader" "ayatana-indicator3") +add_dependencies("test-loader" "${ayatana_indicator_gtkver}") add_test("test-loader" "test-loader") + +# test-indicator-ng + +if (FLAVOUR_GTK3) + set_source_files_properties(test-indicator-ng.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) + add_executable("test-indicator-ng" test-indicator-ng.c) + target_compile_definitions("test-indicator-ng" PUBLIC BUILD_DIR="${CMAKE_CURRENT_BINARY_DIR}") + target_compile_definitions("test-indicator-ng" PUBLIC SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}") + target_include_directories("test-indicator-ng" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) + target_include_directories("test-indicator-ng" PUBLIC "${CMAKE_SOURCE_DIR}/src") + target_link_libraries("test-indicator-ng" ${PROJECT_DEPS_LIBRARIES} -l${ayatana_indicator_gtkver}) + target_link_directories("test-indicator-ng" PUBLIC "${CMAKE_BINARY_DIR}/src") + add_dependencies("test-indicator-ng" "${ayatana_indicator_gtkver}") + add_test("test-indicator-ng" "test-indicator-ng") +endif() diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 476de28..0000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,528 +0,0 @@ -if USE_GTK3 -INDICATOR_LIB = -layatana-indicator3 -else -INDICATOR_LIB = -layatana-indicator -GTK_DISABLE_DEPRECATED = -DGTK_DISABLE_DEPRECATED -endif - -TESTS = -DISTCLEANFILES = -XFAIL_TESTS = - -check_PROGRAMS = - -lib_LTLIBRARIES = \ - libdummy-indicator-blank.la \ - libdummy-indicator-null.la \ - libdummy-indicator-signaler.la \ - libdummy-indicator-simple.la \ - libdummy-indicator-visible.la \ - libdummy-indicator-entry-func.la - -DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf -XVFB_RUN=". $(srcdir)/run-xvfb.sh" - -EXTRA_DIST = \ - run-xvfb.sh \ - session.conf.in \ - service-manager-connect.service.in \ - service-version-bad.service.in \ - service-version-good.service.in \ - org.ayatana.indicator.test.service.in - -############################# -# Test Loader -############################# - -check_PROGRAMS += test-loader - -test_loader_SOURCES = \ - test-loader.c - -test_loader_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) \ - -DBUILD_DIR="\"$(builddir)\"" - -test_loader_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -############################# -# Test Desktop Shortcuts -############################# - -check_PROGRAMS += test-desktop-shortcuts - -test_desktop_shortcuts_SOURCES = \ - test-desktop-shortcuts.c - -test_desktop_shortcuts_CFLAGS = \ - -Wall \ - -DSRCDIR="\"$(srcdir)\"" \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) \ - -DBUILD_DIR="\"$(abs_builddir)\"" - -test_desktop_shortcuts_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -DS_XML_REPORT = desktop-shortcuts-check-results.xml -DS_HTML_REPORT = desktop-shortcuts-check-results.html - -test-desktop-shortcuts-tester: test-desktop-shortcuts Makefile.am - @echo "#!/bin/bash" > $@ - @echo $(XVFB_RUN) >> $@ - @echo gtester -k --verbose -o=$(XML_REPORT) ./test-desktop-shortcuts >> $@ - @chmod +x $@ - -TESTS += test-desktop-shortcuts-tester -DISTCLEANFILES += test-desktop-shortcuts-tester \ - test-desktop-shortcuts-touch-test \ - $(DS_XML_REPORT) \ - $(DS_HTML_REPORT) -EXTRA_DIST += test-well-formed.desktop - -############################# -# Dummy Indicator Blank -############################# - -libdummy_indicator_blank_la_SOURCES = \ - dummy-indicator-blank.c - -libdummy_indicator_blank_la_CFLAGS = \ - -Wall \ - $(GTK_DISABLE_DEPRECATED) \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -libdummy_indicator_blank_la_LIBADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -libdummy_indicator_blank_la_LDFLAGS = \ - -module \ - -avoid-version - -############################# -# Dummy Indicator NULL -############################# - -libdummy_indicator_null_la_SOURCES = \ - dummy-indicator-null.c - -libdummy_indicator_null_la_CFLAGS = \ - -Wall \ - $(GTK_DISABLE_DEPRECATED) \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -libdummy_indicator_null_la_LIBADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -libdummy_indicator_null_la_LDFLAGS = \ - -module \ - -avoid-version - -############################# -# Dummy Indicator Signaler -############################# - -libdummy_indicator_signaler_la_SOURCES = \ - dummy-indicator-signaler.c - -libdummy_indicator_signaler_la_CFLAGS = \ - -Wall \ - $(GTK_DISABLE_DEPRECATED) \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -libdummy_indicator_signaler_la_LIBADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -libdummy_indicator_signaler_la_LDFLAGS = \ - -module \ - -avoid-version - -############################# -# Dummy Indicator Simple -############################# - -libdummy_indicator_simple_la_SOURCES = \ - dummy-indicator-simple.c - -libdummy_indicator_simple_la_CFLAGS = \ - -Wall \ - $(GTK_DISABLE_DEPRECATED) \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -libdummy_indicator_simple_la_LIBADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -libdummy_indicator_simple_la_LDFLAGS = \ - -module \ - -avoid-version - -############################# -# Dummy Indicator Entry Func -############################# - -libdummy_indicator_entry_func_la_SOURCES = \ - dummy-indicator-entry-func.c \ - dummy-indicator-entry-func.h - -libdummy_indicator_entry_func_la_CFLAGS = \ - -Wall \ - $(GTK_DISABLE_DEPRECATED) \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -libdummy_indicator_entry_func_la_LIBADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -libdummy_indicator_entry_func_la_LDFLAGS = \ - -module \ - -avoid-version - -############################# -# Dummy Indicator Visible -############################# - -libdummy_indicator_visible_la_SOURCES = \ - dummy-indicator-visible.c - -libdummy_indicator_visible_la_CFLAGS = \ - -Wall \ - $(GTK_DISABLE_DEPRECATED) \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -libdummy_indicator_visible_la_LIBADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -libdummy_indicator_visible_la_LDFLAGS = \ - -module \ - -avoid-version - -############################# -# Service Shutdown Timeout -############################# - -check_PROGRAMS += service-shutdown-timeout - -service_shutdown_timeout_SOURCES = \ - service-shutdown-timeout.c - -service_shutdown_timeout_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_shutdown_timeout_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -service-shutdown-timeout-tester: service-shutdown-timeout Makefile - @echo "#!/bin/sh" > service-shutdown-timeout-tester - @echo $(DBUS_RUNNER) --task ./service-shutdown-timeout >> service-shutdown-timeout-tester - @chmod +x service-shutdown-timeout-tester - -TESTS += service-shutdown-timeout-tester -DISTCLEANFILES += service-shutdown-timeout-tester - -############################# -# Service Manager No Connect -############################# - -check_PROGRAMS += service-manager-no-connect - -service_manager_no_connect_SOURCES = \ - service-manager-no-connect.c - -service_manager_no_connect_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_manager_no_connect_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -service-manager-no-connect-tester: service-manager-no-connect Makefile.am - @echo "#!/bin/sh" > service-manager-no-connect-tester - @echo $(DBUS_RUNNER) --task ./service-manager-no-connect >> service-manager-no-connect-tester - @chmod +x service-manager-no-connect-tester - -TESTS += service-manager-no-connect-tester -DISTCLEANFILES += service-manager-no-connect-tester - -############################# -# Service Manager Connect -############################# - -session.conf: $(srcdir)/session.conf.in Makefile.am - sed -e "s|\@servicedir\@|$(abs_builddir)|" $< > $@ - -service-manager-connect.service: $(srcdir)/service-manager-connect.service.in Makefile.am - sed -e "s|\@builddir\@|$(abs_builddir)|" $< > $@ - -check_PROGRAMS += service-manager-connect - -service_manager_connect_SOURCES = \ - service-manager-connect.c - -service_manager_connect_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_manager_connect_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -check_PROGRAMS += service-manager-connect-service - -service_manager_connect_service_SOURCES = \ - service-manager-connect-service.c - -service_manager_connect_service_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_manager_connect_service_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -service-manager-connect-tester: service-manager-connect service-manager-connect-service session.conf service-manager-connect.service Makefile.am - @echo "#!/bin/sh" > service-manager-connect-tester - @echo dbus-test-runner --dbus-config $(builddir)/session.conf --task ./service-manager-connect >> service-manager-connect-tester - @chmod +x service-manager-connect-tester - -TESTS += service-manager-connect-tester -DISTCLEANFILES += service-manager-connect-tester session.conf service-manager-connect.service - -############################# -# Service Versions -############################# - -service-version-good.service: $(srcdir)/service-version-good.service.in Makefile.am - sed -e "s|\@builddir\@|$(abs_builddir)|" $< > $@ - -service-version-bad.service: $(srcdir)/service-version-bad.service.in Makefile.am - sed -e "s|\@builddir\@|$(abs_builddir)|" $< > $@ - -check_PROGRAMS += service-version-manager - -service_version_manager_SOURCES = \ - service-version-values.h \ - service-version-manager.c - -service_version_manager_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_version_manager_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -check_PROGRAMS += service-version-bad-service - -service_version_bad_service_SOURCES = \ - service-version-values.h \ - service-version-bad-service.c - -service_version_bad_service_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_version_bad_service_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -check_PROGRAMS += service-version-good-service - -service_version_good_service_SOURCES = \ - service-version-values.h \ - service-version-good-service.c - -service_version_good_service_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_version_good_service_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -service-version-tester: service-version-manager service-version-bad-service service-version-good-service session.conf service-version-bad.service service-version-good.service Makefile.am - @echo "#!/bin/sh" > $@ - @echo dbus-test-runner --dbus-config $(builddir)/session.conf --task ./service-version-manager >> $@ - @chmod +x $@ - -TESTS += service-version-tester -DISTCLEANFILES += service-version-tester service-version-bad.service service-version-good.service - -############################# -# Service Versions -############################# - -check_PROGRAMS += service-version-multiwatch-manager - -service_version_multiwatch_manager_SOURCES = \ - service-version-values.h \ - service-version-multiwatch-manager.c - -service_version_multiwatch_manager_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_version_multiwatch_manager_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -check_PROGRAMS += service-version-multiwatch-manager-impolite - -service_version_multiwatch_manager_impolite_SOURCES = \ - service-version-values.h \ - service-version-multiwatch-manager-impolite.c - -service_version_multiwatch_manager_impolite_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_version_multiwatch_manager_impolite_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -check_PROGRAMS += service-version-multiwatch-service - -service_version_multiwatch_service_SOURCES = \ - service-version-values.h \ - service-version-multiwatch-service.c - -service_version_multiwatch_service_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_version_multiwatch_service_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -service-version-multiwatch-tester: service-version-multiwatch-manager service-version-multiwatch-service service-version-multiwatch-manager-impolite Makefile.am - @echo "#!/bin/sh" > $@ - @echo dbus-test-runner --task ./service-version-multiwatch-service --task-name Service --task ./service-version-multiwatch-manager --task-name Manager1 --task ./service-version-multiwatch-manager --task-name Manager2 --task ./service-version-multiwatch-manager --task-name Manager3 --task ./service-version-multiwatch-manager --task-name Manager4 --task ./service-version-multiwatch-manager --task-name Manager5 --task ./service-version-multiwatch-manager-impolite --task-name Impolite1 --task ./service-version-multiwatch-manager-impolite --task-name Impolite2 --task ./service-version-multiwatch-manager-impolite --task-name Impolite3 >> $@ - @chmod +x $@ - -TESTS += service-version-multiwatch-tester -DISTCLEANFILES += service-version-multiwatch-tester - -############################# -# Service Manager Shutdown -############################# - -check_PROGRAMS += service-manager-nostart-connect - -service_manager_nostart_connect_SOURCES = \ - service-manager-nostart-connect.c - -service_manager_nostart_connect_CFLAGS = \ - -Wall \ - $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) - -service_manager_nostart_connect_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - -service-manager-connect-nostart-tester: service-manager-nostart-connect service-manager-connect-service Makefile.am - @echo "#!/bin/sh" > $@ - @echo dbus-test-runner --task ./service-manager-nostart-connect --task ./service-manager-connect-service >> $@ - @chmod +x $@ - -TESTS += service-manager-connect-nostart-tester -DISTCLEANFILES += service-manager-connect-nostart-tester - -############################# -# Test stuff -############################# - -XML_REPORT = loader-check-results.xml -HTML_REPORT = loader-check-results.html - -loader-tester: test-loader libdummy-indicator-null.la libdummy-indicator-simple.la libdummy-indicator-entry-func.la Makefile - @echo "#!/bin/bash" > loader-tester - @echo $(XVFB_RUN) >> $@ - @echo gtester -k --verbose -o=$(XML_REPORT) ./test-loader >> loader-tester - @chmod +x loader-tester - -TESTS += loader-tester -DISTCLEANFILES += loader-tester - -DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT) - -############################# -# Indicator-ng -############################# - -if USE_GTK3 - -org.ayatana.indicator.test.service: org.ayatana.indicator.test.service.in Makefile.am - sed -e "s|\@builddir\@|$(abs_builddir)|" $< > $@ - -check_PROGRAMS += test-indicator-ng - -test_indicator_ng_SOURCES = test-indicator-ng.c - -test_indicator_ng_CFLAGS = \ - $(LIBINDICATOR_CFLAGS) \ - -I$(top_srcdir) \ - -DSRCDIR="\"$(srcdir)\"" \ - -DBUILD_DIR="\"$(abs_builddir)\"" \ - -Wall - -test_indicator_ng_LDADD = \ - $(LIBINDICATOR_LIBS) \ - -L$(top_builddir)/src/.libs \ - $(INDICATOR_LIB) - - -test-indicator-ng-dbus-runner: test-indicator-ng Makefile.am - @echo "#!/bin/sh" > $@ - @echo $(DBUS_RUNNER) --task ./test-indicator-ng >> $@ - @chmod +x $@ - -test-indicator-ng-tester: test-indicator-ng-dbus-runner Makefile.am - @echo "#!/bin/bash" > $@ - @echo $(XVFB_RUN) >> $@ - @echo gtester -k --verbose -o=$(XML_REPORT) ./test-indicator-ng-dbus-runner >> $@ - @chmod +x $@ - -TESTS += test-indicator-ng-tester -DISTCLEANFILES += test-indicator-ng-tester test-indicator-ng-dbus-runner test-indicator-ng - -# Mock indicator service -check_PROGRAMS += indicator-test-service - -indicator_test_service_SOURCES = indicator-test-service.c -indicator_test_service_CFLAGS = $(LIBINDICATOR_CFLAGS) -indicator_test_service_LDADD = $(LIBINDICATOR_LIBS) - -EXTRA_indicator_test_service_DEPENDENCIES = org.ayatana.indicator.test.service - -DISTCLEANFILES += indicator-test-service org.ayatana.indicator.test.service - -endif diff --git a/tests/run-xvfb.sh b/tests/run-xvfb.sh deleted file mode 100644 index 63b6f0d..0000000 --- a/tests/run-xvfb.sh +++ /dev/null @@ -1,8 +0,0 @@ -if [ "$DISPLAY" == "" ]; then -Xvfb -ac -noreset -screen 0 800x600x16 -help 2>/dev/null 1>&2 -XID=`for id in 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 ; do test -e /tmp/.X$id-lock || { echo $id; exit 0; }; done; exit 1` -{ Xvfb -ac -noreset -screen 0 800x600x16 :$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 -echo Setting display: $DISPLAY -fi |