on xenial help sign in
Run the test on qmluitests
commit7b47f47d4f8b80b3e21a795d01372309a97d6637 authorAlbert Astals <albert.astals@canonical.com> dateThu 13 Jun 2013, 17:48 (13 years ago) parent51458f2
1 file changed+8−20
tests/plugins/ListViewWithPageHeader/CMakeLists.txt+8−20
tests/plugins/ListViewWithPageHeader/CMakeLists.txt+8−20
@@ -13,24 +13,12 @@ remove_definitions(-DQT_NO_KEYWORDS)
1313add_definitions(-DLISTVIEWWITHPAGEHEADER_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}")
1414add_definitions(-DBUILT_PLUGINS_DIR="${CMAKE_BINARY_DIR}/plugins")
1515
16−macro(run_tests)
17− set(_test_list "")
18− foreach(_test ${ARGN})
19− set(testCommand ${CMAKE_CURRENT_BINARY_DIR}/${_test}Exec
20− -o ${CMAKE_BINARY_DIR}/${_test}.xml,xunitxml
21− -o -,txt)
22− add_test(NAME ${_test} COMMAND ${testCommand})
23− add_custom_target(${_test} ${testCommand})
24− add_executable(${_test}Exec ${_test}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/ListViewWithPageHeader/listviewwithpageheader.cpp)
25− qt5_use_modules(${_test}Exec Test Core Qml)
26− target_link_libraries(${_test}Exec
27− ${Qt5Gui_LIBRARIES}
28− ${Qt5Quick_LIBRARIES}
29− )
30− set(_test_list "${_test_list};${_test}")
31− endforeach()
32−endmacro(run_tests)
16+set(testCommand ${CMAKE_CURRENT_BINARY_DIR}/listviewwithpageheadertestExec
17+ -o ${CMAKE_BINARY_DIR}/listviewwithpageheadertest.xml,xunitxml
18+ -o -,txt)
19+add_custom_target(testlistviewwithpageheader ${testCommand})
20+add_dependencies(qmluitests testlistviewwithpageheader)
3321
34−run_tests(
35− listviewwithpageheadertest
36− )
22+add_executable(listviewwithpageheadertestExec listviewwithpageheadertest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/ListViewWithPageHeader/listviewwithpageheader.cpp)
23+qt5_use_modules(listviewwithpageheadertestExec Test Core Qml)
24+target_link_libraries(listviewwithpageheadertestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})