@@ -40,12 +40,7 @@ qt5_use_modules(listviewwithpageheadertestsectionexternalmodelExec Test Core Qml
4040target_link_libraries(listviewwithpageheadertestsectionexternalmodelExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
4141add_custom_target(testlistviewwithpageheadersectionexternalmodel ${CMAKE_CURRENT_BINARY_DIR}/listviewwithpageheadertestsectionexternalmodelExec -o ${CMAKE_BINARY_DIR}/testlistviewwithpageheadersectionexternalmodel.xml,xunitxml -o -,txt)
4242
43−macro(add_dashview_try_test FILENAME)
44− # Capitalite the first letter for the test/try name targets
45− string(SUBSTRING ${FILENAME} 0 1 FIRST_LETTER)
46− string(TOUPPER ${FIRST_LETTER} FIRST_LETTER)
47− string(REGEX REPLACE "^.(.*)" "${FIRST_LETTER}\\1" CUSTOM_TARGET_NAME "${FILENAME}")
48−
43+macro(add_dashview_try_test FILENAME TESTNAME)
4944 add_executable(${FILENAME}testExec
5045 ${FILENAME}test.cpp
5146 ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/${FILENAME}.cpp
@@ -53,9 +48,9 @@ macro(add_dashview_try_test FILENAME)
5348 )
5449 qt5_use_modules(${FILENAME}testExec Test Core Qml)
5550 target_link_libraries(${FILENAME}testExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
56− add_custom_target(test${CUSTOM_TARGET_NAME}
51+ add_custom_target(test${TESTNAME}
5752 ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}testExec
58− -o ${CMAKE_BINARY_DIR}/test${CUSTOM_TARGET_NAME}.xml,xunitxml
53+ -o ${CMAKE_BINARY_DIR}/test${TESTNAME}.xml,xunitxml
5954 -o -,txt
6055 DEPENDS ${FILENAME}testExec DashViews-qml
6156 )
@@ -67,15 +62,15 @@ macro(add_dashview_try_test FILENAME)
6762 )
6863 qt5_use_modules(${FILENAME}tryExec Test Core Qml)
6964 target_link_libraries(${FILENAME}tryExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
70− add_custom_target(try${CUSTOM_TARGET_NAME}
65+ add_custom_target(try${TESTNAME}
7166 ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}tryExec
7267 DEPENDS ${FILENAME}tryExec DashViews-qml
7368 )
7469endmacro()
7570
76−add_dashview_try_test(verticaljournal)
77−add_dashview_try_test(horizontaljournal)
78−add_dashview_try_test(organicgrid)
71+add_dashview_try_test(verticaljournal VerticalJournal)
72+add_dashview_try_test(horizontaljournal HorizontalJournal)
73+add_dashview_try_test(organicgrid OrganicGrid)
7974
8075set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
8176add_qml_test(. listviewwithpageheaderqml IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
@@ -84,6 +79,6 @@ add_dependencies(qmluitests testlistviewwithpageheader)
8479add_dependencies(qmluitests testlistviewwithpageheadersection)
8580add_dependencies(qmluitests testlistviewwithpageheadersectionexternalmodel)
8681add_dependencies(qmluitests testlistviewwithpageheaderqml)
87−add_dependencies(qmluitests testVerticaljournal)
88−add_dependencies(qmluitests testHorizontaljournal)
89−add_dependencies(qmluitests testOrganicgrid)
82+add_dependencies(qmluitests testVerticalJournal)
83+add_dependencies(qmluitests testHorizontalJournal)
84+add_dependencies(qmluitests testOrganicGrid)