on xenial help sign in
Transition gesture tests to new macros
daff270Michał Sawicz
tests/plugins/Ubuntu/Gestures/CMakeLists.txt+13−5
@@ -16,12 +16,15 @@ export_qmlfiles(UbuntuGesturesTest .)
16
16
17add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
17add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
18
18
19−macro(add_gesture_test CLASSNAME)
19+macro(build_gesture_test CLASSNAME)
20 add_executable(${CLASSNAME}TestExec tst_${CLASSNAME}.cpp GestureTest.cpp)
20 add_executable(${CLASSNAME}TestExec tst_${CLASSNAME}.cpp GestureTest.cpp)
21 qt5_use_modules(${CLASSNAME}TestExec Test Core Qml Gui Quick)
21 qt5_use_modules(${CLASSNAME}TestExec Test Core Qml Gui Quick)
22 target_link_libraries(${CLASSNAME}TestExec UbuntuGesturesQml UbuntuGestures)
22 target_link_libraries(${CLASSNAME}TestExec UbuntuGesturesQml UbuntuGestures)
23+endmacro()
23
24
25+macro(add_gesture_unit_test CLASSNAME)
26+ build_gesture_test(${CLASSNAME})
24− add_executable_test(${CLASSNAME} ${CLASSNAME}TestExec
27+ add_unity8_unittest(${CLASSNAME} ${CLASSNAME}TestExec
25 ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
28 ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
26 DEPENDS UbuntuGesturesTest-qmlfiles
29 DEPENDS UbuntuGesturesTest-qmlfiles
27 ${ARGN}
30 ${ARGN}
@@ -29,7 +32,12 @@ macro(add_gesture_test CLASSNAME)
29endmacro()
32endmacro()
30
33
31macro(add_gesture_ui_test CLASSNAME)
34macro(add_gesture_ui_test CLASSNAME)
32− add_gesture_test(${CLASSNAME})
35+ build_gesture_test(${CLASSNAME})
36+ add_unity8_uitest(${CLASSNAME} ${CLASSNAME}TestExec
37+ ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
38+ DEPENDS UbuntuGesturesTest-qmlfiles
39+ ${ARGN}
40+ )
33 add_manual_qml_test(. ${CLASSNAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
41 add_manual_qml_test(. ${CLASSNAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
34endmacro()
42endmacro()
35
43
@@ -37,5 +45,5 @@ add_gesture_ui_test(DirectionalDragArea)
37add_gesture_ui_test(PressedOutsideNotifier)
45add_gesture_ui_test(PressedOutsideNotifier)
38add_gesture_ui_test(TouchDispatcher)
46add_gesture_ui_test(TouchDispatcher)
39add_gesture_ui_test(TouchGate)
47add_gesture_ui_test(TouchGate)
40−add_gesture_test(Damper ADD_TEST)
48+add_gesture_unit_test(Damper)
41−add_gesture_test(AxisVelocityCalculator ADD_TEST)
49+add_gesture_unit_test(AxisVelocityCalculator)
tests/plugins/Utils/CMakeLists.txt+1−1
@@ -17,4 +17,4 @@ foreach(util_test
17endforeach()
17endforeach()
18
18
19# plain qml test
19# plain qml test
20−add_unity8_qmltest(. UtilsStyle)
20+add_unity8_qmlunittest(. UtilsStyle)
tests/plugins/Wizard/CMakeLists.txt+1−1
@@ -15,4 +15,4 @@ add_executable(tst-wizard-system
15 ${CMAKE_SOURCE_DIR}/plugins/Wizard/System.cpp
15 ${CMAKE_SOURCE_DIR}/plugins/Wizard/System.cpp
16)
16)
17qt5_use_modules(tst-wizard-system Core DBus Qml Test)
17qt5_use_modules(tst-wizard-system Core DBus Qml Test)
18−add_test(NAME wizardsystemtest COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tst-wizard-system)
18+add_unity8_unittest(WizardSystem tst-wizard-system)