15
15
# Authored by: Thomas Voss <thomas.voss@canonical.com>
17
18
qt5_wrap_cpp(MOCS test_harness.h)
20
21
app_hub_communication_default_source
21
app_hub_communication_default_source.cpp
26
22
app_hub_communication_known_sources
27
app_hub_communication_known_sources.cpp
32
23
app_hub_communication_stores
33
app_hub_communication_stores.cpp
38
24
app_hub_communication_transfer
39
app_hub_communication_transfer.cpp
44
25
app_hub_communication_paste
45
app_hub_communication_paste.cpp
50
26
app_hub_communication_handler
51
app_hub_communication_handler.cpp
34
${GTEST_BOTH_LIBRARIES}
38
foreach(test ${TESTS})
39
# set the sources per test
47
foreach(test ${TESTS})
48
# set targets, linked libs and test
49
add_executable(${test}
52
qt5_use_modules(${test} Core Gui DBus Test)
54
target_link_libraries(${test}
58
add_test(NAME ${test} COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/${test})
60
SET_TESTS_PROPERTIES(${test}
61
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
83
qt5_use_modules(app_hub_communication_default_source Core Gui DBus Test)
84
qt5_use_modules(app_hub_communication_known_sources Core Gui DBus Test)
85
qt5_use_modules(app_hub_communication_stores Core Gui DBus Test)
86
qt5_use_modules(app_hub_communication_transfer Core Gui DBus Test)
87
qt5_use_modules(app_hub_communication_paste Core Gui DBus Test)
88
qt5_use_modules(app_hub_communication_handler Core Gui DBus Test)
89
qt5_use_modules(test_utils Core Test)
90
75
qt5_use_modules(test_hook Core Gui DBus Test)
91
qt5_use_modules(mimedata_test Core Test)
93
target_link_libraries(app_hub_communication_stores content-hub gmock gtest gtest_main)
94
target_link_libraries(app_hub_communication_default_source content-hub gmock gtest gtest_main)
95
target_link_libraries(app_hub_communication_known_sources content-hub gmock gtest gtest_main)
96
target_link_libraries(app_hub_communication_stores content-hub gmock gtest gtest_main)
97
target_link_libraries(app_hub_communication_transfer content-hub gmock gtest gtest_main)
98
target_link_libraries(app_hub_communication_paste content-hub gmock gtest gtest_main)
99
target_link_libraries(app_hub_communication_handler content-hub gmock gtest gtest_main)
100
target_link_libraries(test_utils content-hub gmock gtest gtest_main)
101
target_link_libraries(test_types content-hub gmock gtest gtest_main)
102
target_link_libraries(test_hook content-hub gmock gtest gtest_main ${GSETTINGS_LDFLAGS})
103
target_link_libraries(mimedata_test content-hub gmock gtest gtest_main)
105
add_test(NAME app_hub_communication_default_source COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/app_hub_communication_default_source)
106
add_test(NAME app_hub_communication_known_sources COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/app_hub_communication_known_sources)
107
add_test(NAME app_hub_communication_stores COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/app_hub_communication_stores)
108
add_test(NAME app_hub_communication_transfer COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/app_hub_communication_transfer)
109
add_test(NAME app_hub_communication_paste COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/app_hub_communication_paste)
110
add_test(NAME app_hub_communication_handler COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/app_hub_communication_handler)
111
add_test(NAME test_utils COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/test_utils)
112
add_test(NAME test_types COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/test_types)
76
target_link_libraries(test_hook content-hub ${GTEST_ALL_LIBRARIES} ${GSETTINGS_LDFLAGS})
113
77
add_test(NAME test_hook COMMAND dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/test_hook)
114
add_test(NAME mimedata_test COMMAND mimedata_test)
116
SET_TESTS_PROPERTIES(app_hub_communication_stores
117
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
118
SET_TESTS_PROPERTIES(app_hub_communication_default_source
119
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
120
SET_TESTS_PROPERTIES(app_hub_communication_known_sources
121
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
122
SET_TESTS_PROPERTIES(app_hub_communication_transfer
123
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
124
SET_TESTS_PROPERTIES(app_hub_communication_paste
125
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
126
SET_TESTS_PROPERTIES(app_hub_communication_handler
127
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
128
SET_TESTS_PROPERTIES(test_utils
129
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
130
SET_TESTS_PROPERTIES(test_types
131
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
132
79
SET_TESTS_PROPERTIES(test_hook
133
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
134
SET_TESTS_PROPERTIES(mimedata_test
135
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
80
PROPERTIES ENVIRONMENT "CONTENT_HUB_TESTING=1")
137
82
set_target_properties(