diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-11-15 19:44:55 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-11-15 19:44:55 +0100 |
| commit | d8886be4c7b8d9c1cc3b76b0fa46dd1f443a205d (patch) | |
| tree | 8c1f8bff588bb1494472c6337af0b80aa3f32f8d /tests/CMakeLists.txt | |
| parent | 15205f0079d36eeeba511d715255d885699cec20 (diff) | |
| parent | 9e83449ca1069115a9cd80e3d6e24ce6ddfb309b (diff) | |
Merging with trunk
(bzr r2846.1.45)
Diffstat (limited to 'tests/CMakeLists.txt')
| -rw-r--r-- | tests/CMakeLists.txt | 140 |
1 files changed, 87 insertions, 53 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0b3b43d0b..567d9673b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -112,52 +112,73 @@ if (GTEST_SRC_DIR AND # The actual test executable (xless) - do not put anything that requires X in here - add_executable(test-gtest-xless - test_main_xless.cpp - test_animator.cpp - test_launcher_model.cpp - test_glib_object.cpp - test_glib_object_utils.cpp - test_glib_object_utils.h - test_glib_signals.cpp - test_glib_signals_utils.cpp - test_glib_signals_utils.h - test_glib_source.cpp - test_glib_variant.cpp - test_grabhandle.cpp - test_desktop_utilities.cpp - test_hud_private.cpp - test_indicator.cpp - test_indicator_appmenu.cpp - test_indicator_entry.cpp - test_indicators.cpp - test_introspection.cpp - test_favorite_store.cpp - test_favorite_store_gsettings.cpp - test_favorite_store_private.cpp - test_home_lens.cpp - test_launcher_entry_remote.cpp - test_layout_system.cpp - test_model_iterator.cpp - test_pointer_barrier.cpp - test_previews.cpp - test_shortcut_model.cpp - test_shortcut_private.cpp - test_showdesktop_handler.cpp - test_ubus.cpp - test_unityshell_private.cpp - ${CMAKE_CURRENT_BINARY_DIR}/test_glib_signals_utils_marshal.cpp - ${UNITY_SRC}/DebugDBusInterface.cpp - ${UNITY_SRC}/XPathQueryPart.cpp - ${UNITY_SRC}/UnityshellPrivate.cpp - ${UNITY_SRC}/UnityShowdesktopHandler.cpp - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle.cpp - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-group.cpp - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-impl-factory.cpp - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-texture.cpp - ) - target_link_libraries(test-gtest-xless gtest unity-shared unity-shared-standalone ${GMOCK_LIB} ${GMOCK_MAIN_LIB} ${LIBS} launcher-lib shortcuts-lib hud-lib) + set (GTEST_XLESS_SOURCES + test_main_xless.cpp + test_animator.cpp + test_launcher_model.cpp + test_glib_object.cpp + test_glib_object_utils.cpp + test_glib_object_utils.h + test_glib_signals.cpp + test_glib_signals_utils.cpp + test_glib_signals_utils.h + test_glib_source.cpp + test_glib_variant.cpp + test_grabhandle.cpp + test_desktop_utilities.cpp + test_indicator.cpp + test_indicator_appmenu.cpp + test_indicator_entry.cpp + test_indicators.cpp + test_introspection.cpp + test_favorite_store.cpp + test_favorite_store_gsettings.cpp + test_favorite_store_private.cpp + test_home_lens.cpp + test_launcher_entry_remote.cpp + test_layout_system.cpp + test_model_iterator.cpp + test_previews.cpp + test_ubus.cpp + test_unityshell_private.cpp + ${CMAKE_CURRENT_BINARY_DIR}/test_glib_signals_utils_marshal.cpp + ${UNITY_SRC}/UnityshellPrivate.cpp + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle.cpp + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-group.cpp + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-impl-factory.cpp + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-texture.cpp + ) + + set (GTEST_XLESS_LIBS + gtest + unity-shared + unity-shared-standalone + launcher-lib + ${GMOCK_LIB} + ${GMOCK_MAIN_LIB} + ${LIBS} + ) + + if (ENABLE_X_SUPPORT) + set (GTEST_XLESS_SOURCES + test_hud_private.cpp + test_pointer_barrier.cpp + test_shortcut_model.cpp + test_shortcut_private.cpp + ${LAUNCHER_SOURCES} + ) + set (GTEST_XLESS_LIBS + ${GTEST_XLESS_LIBS} + shortcuts-lib + hud-lib + ) + endif () + + add_executable(test-gtest-xless ${GTEST_XLESS_SOURCES}) + + target_link_libraries(test-gtest-xless ${GTEST_XLESS_LIBS}) + add_test(UnityGTestXless test-gtest-xless) add_dependencies(test-gtest-xless unity-core-${UNITY_API_VERSION} gtest) @@ -180,6 +201,7 @@ if (GTEST_SRC_DIR AND add_test(UnityGTestDBus test-gtest-dbus) add_dependencies(test-gtest-dbus unity-core-${UNITY_API_VERSION} test-gtest-service gtest) +if (ENABLE_X_SUPPORT) # Tests that require X add_executable(test-gtest test_main.cpp @@ -216,6 +238,7 @@ if (GTEST_SRC_DIR AND test_shortcut_controller.cpp test_single_monitor_launcher_icon.cpp test_expo_launcher_icon.cpp + test_showdesktop_handler.cpp test_switcher_controller.cpp test_switcher_model.cpp test_texture_cache.cpp @@ -228,17 +251,20 @@ if (GTEST_SRC_DIR AND bamf-mock-application.c gmockmount.c gmockvolume.c + ${UNITY_SRC}/UnityShowdesktopHandler.cpp ${CMAKE_SOURCE_DIR}/plugins/unityshell/src/WindowMinimizeSpeedController.cpp ) target_link_libraries(test-gtest gtest gmock unity-shared ${LIBS} launcher-lib unity-shared-standalone shortcuts-lib previews-lib hud-lib switcher-lib dash-lib panel-lib) add_test(UnityGTest test-gtest) add_dependencies(test-gtest unity-core-${UNITY_API_VERSION} gtest gmock) - +endif (ENABLE_X_SUPPORT) endif (GTEST_SRC_DIR AND GMOCK_LIB AND GMOCK_MAIN_LIB) -add_subdirectory (test-gestures) +if(ENABLE_X_SUPPORT) + add_subdirectory (test-gestures) +endif() # # check target @@ -246,10 +272,12 @@ add_subdirectory (test-gestures) set (TEST_RESULT_DIR ${CMAKE_BINARY_DIR}/tests) set (TEST_RESULT_XML ${TEST_RESULT_DIR}/test-results.xml) set (TEST_RESULT_HTML ${TEST_RESULT_DIR}/test-results.html) -set (GTEST_TEST_COMMAND ./test-gtest) +if (ENABLE_X_SUPPORT) + set (GTEST_TEST_COMMAND ./test-gtest) + set (GTEST_TEST_COMMAND_GESTURES ./test-gestures/test-gestures) +endif (ENABLE_X_SUPPORT) set (GTEST_TEST_COMMAND_XLESS ./test-gtest-xless) set (GTEST_TEST_COMMAND_DBUS dbus-test-runner --task ./test-gtest-service --task ./test-gtest-dbus) -set (GTEST_TEST_COMMAND_GESTURES ./test-gestures/test-gestures) set (TEST_COMMAND gtester --verbose -k --g-fatal-warnings -o=${TEST_RESULT_XML} ./test-unit @@ -266,10 +294,16 @@ set (TEST_COMMAND_HEADLESS && echo "Warning, DBus test cases are disabled!!") if (GTEST_SRC_DIR) - add_custom_target (check COMMAND ${TEST_COMMAND} DEPENDS test-unit test-gtest test-gtest-xless test-gtest-dbus test-gestures) - add_custom_target (check-headless COMMAND ${TEST_COMMAND_HEADLESS} DEPENDS test-gtest-xless test-gtest-dbus test-gestures) + if (ENABLE_X_SUPPORT) + add_custom_target (check COMMAND ${TEST_COMMAND} DEPENDS test-unit test-gtest test-gtest-xless test-gtest-dbus test-gestures) + add_custom_target (check-headless COMMAND ${TEST_COMMAND_HEADLESS} DEPENDS test-gtest-xless test-gtest-dbus test-gestures) + add_custom_target (gcheck COMMAND ${DBUS_TEST_COMMAND} DEPENDS test-gtest test-gtest-xless) + else () + add_custom_target (check COMMAND ${TEST_COMMAND} DEPENDS test-unit test-gtest-xless test-gtest-dbus) + add_custom_target (check-headless COMMAND ${TEST_COMMAND_HEADLESS} DEPENDS test-gtest-xless test-gtest-dbus) + add_custom_target (gcheck COMMAND ${DBUS_TEST_COMMAND} DEPENDS test-gtest-xless) + endif () add_custom_target (check-report COMMAND ${TEST_UNIT_COMMAND} && gtester-report ${TEST_RESULT_XML} > ${TEST_RESULT_HTML}) - add_custom_target (gcheck COMMAND ${DBUS_TEST_COMMAND} DEPENDS test-gtest test-gtest-xless) else (GTEST_SRC_DIR) add_custom_target (check COMMAND ${TEST_COMMAND} DEPENDS test-unit) endif (GTEST_SRC_DIR) |
