@@ -1,104 +0,0 @@
1−# add_qml_test macro
2−include(QmlTest)
3−
4−# There's no cmake var for v8 include path :-/
5−# so create one
6−LIST(GET Qt5Core_INCLUDE_DIRS 0 QtCoreDir0)
7−if(${Qt5Core_VERSION_STRING} VERSION_LESS "5.1.0")
8− SET(Qt5V8_PRIVATE_INCLUDE_DIR ${QtCoreDir0}/../QtV8/${Qt5Core_VERSION_STRING}/QtV8)
9−else()
10− SET(Qt5V8_PRIVATE_INCLUDE_DIR ${QtCoreDir0}/QtV8/${Qt5Core_VERSION_STRING}/QtV8)
11−endif()
12−
13−
14−include_directories(
15− SYSTEM
16− ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
17− ${Qt5Quick_INCLUDE_DIRS}
18− ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
19− ${Qt5V8_PRIVATE_INCLUDE_DIR}
20− )
21−
22−include_directories(
23− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash
24− ${CMAKE_CURRENT_BINARY_DIR}
25− )
26−
27−remove_definitions(-DQT_NO_KEYWORDS)
28−
29−add_definitions(-DTEST_DIR="plugins/Dash")
30−
31−macro(add_lvwph_test FILENAME TESTNAME)
32− add_executable(${TESTNAME}TestExec
33− ${FILENAME}test.cpp
34− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/listviewwithpageheader.cpp)
35− qt5_use_modules(${TESTNAME}TestExec Test Core Qml)
36− target_link_libraries(${TESTNAME}TestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
37− install(TARGETS ${TESTNAME}TestExec
38− DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Dash"
39− )
40−
41− add_unity8_uitest(${TESTNAME} ${TESTNAME}TestExec DEPENDS Dash-qml)
42−endmacro()
43−
44−add_lvwph_test(listviewwithpageheader ListViewWithPageHeader)
45−add_lvwph_test(listviewwithpageheadersection ListViewWithPageHeaderSection)
46−add_lvwph_test(listviewwithpageheadersectionexternalmodel ListViewWithPageHeaderSectionExternalModel)
47−
48−macro(add_dashview_try_test FILENAME TESTNAME)
49− add_executable(${TESTNAME}TestExec
50− ${FILENAME}test.cpp
51− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/${FILENAME}.cpp
52− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/abstractdashview.cpp
53− )
54− qt5_use_modules(${TESTNAME}TestExec Test Core Qml)
55− target_link_libraries(${TESTNAME}TestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
56− install(TARGETS ${TESTNAME}TestExec
57− DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Dash"
58− )
59−
60− add_unity8_uitest(${TESTNAME} ${TESTNAME}TestExec DEPENDS Dash-qml)
61−
62− add_executable(${TESTNAME}TryExec
63− ${FILENAME}try.cpp
64− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/${FILENAME}.cpp
65− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/abstractdashview.cpp
66− )
67− qt5_use_modules(${TESTNAME}TryExec Test Core Qml)
68− target_link_libraries(${TESTNAME}TryExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
69− install(TARGETS ${TESTNAME}TryExec
70− DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Dash"
71− )
72− add_manual_test(${TESTNAME} ${TESTNAME}TryExec DEPENDS Dash-qml)
73−endmacro()
74−
75−add_dashview_try_test(verticaljournal VerticalJournal)
76−add_dashview_try_test(horizontaljournal HorizontalJournal)
77−add_dashview_try_test(organicgrid OrganicGrid)
78−
79−# Install data files needed for tests
80−file(GLOB qml_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.qml)
81−foreach(qml_file ${qml_files})
82− add_qml_test_data(. "${qml_file}")
83−endforeach()
84−
85−# CardCreator test
86−add_executable(CardCreatorTestExec cardcreatortest.cpp)
87−qt5_use_modules(CardCreatorTestExec Test Core Qml)
88−target_link_libraries(CardCreatorTestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
89−install(TARGETS CardCreatorTestExec
90− DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Dash"
91−)
92−add_unity8_uitest(CardCreator CardCreatorTestExec DEPENDS Dash-qml)
93−add_qml_test_data(. cardcreator)
94−
95−# This one qml file imports a file in an arch-specific directory, so to make its
96−# import line relative, we install it into an arch-specific directory too.
97−add_qml_test_data(. cardcreatortest.qml
98− DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Dash"
99−)
100−
101−# plain qml test
102−foreach(dash_test ScopeStyle ListViewWithPageHeaderQML CardAttributes CroppedImageMinimumSourceSize)
103− add_unity8_qmltest(. ${dash_test})
104−endforeach()