~afrantzis/unity8/power-state-change-reason-snap-decision

« back to all changes in this revision

Viewing changes to tests/plugins/Ubuntu/Gestures/CMakeLists.txt

  • Committer: CI Train Bot
  • Author(s): Albert Astals Cid, Michał Sawicz
  • Date: 2015-09-22 12:57:02 UTC
  • mfrom: (1752.8.47 origin/autopkgtests)
  • Revision ID: ci-train-bot@canonical.com-20150922125702-wboqbqanpto9l9s2
Add DEP-8 test for all our UI and unit tests

Some refactoring was needed:
- added a basic Ubuntu.Web mock
- made plugin path an environment, not a compiled-in bit
- moved Unity.Application resources into .qrc

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
export_qmlfiles(UbuntuGesturesTest .)
16
16
 
17
 
add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
18
 
add_definitions(-DTESTS_UTILS_MODULES_DIR="${CMAKE_BINARY_DIR}/tests/utils/modules")
19
 
 
20
17
macro(build_gesture_test CLASSNAME)
21
18
    add_executable(${CLASSNAME}TestExec tst_${CLASSNAME}.cpp GestureTest.cpp TestItem.cpp)
22
19
    qt5_use_modules(${CLASSNAME}TestExec Test Core Qml Gui Quick)
26
23
macro(add_gesture_unit_test CLASSNAME)
27
24
    build_gesture_test(${CLASSNAME})
28
25
    add_unity8_unittest(${CLASSNAME} ${CLASSNAME}TestExec
29
 
        ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
 
26
        ENVIRONMENT LD_LIBRARY_PATH=${UNITY_PLUGINPATH}/Ubuntu/Gestures
30
27
        DEPENDS UbuntuGesturesTest-qmlfiles
31
28
        ${ARGN}
32
29
    )
35
32
macro(add_gesture_ui_test CLASSNAME)
36
33
    build_gesture_test(${CLASSNAME})
37
34
    add_unity8_uitest(${CLASSNAME} ${CLASSNAME}TestExec
38
 
        ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
 
35
        ENVIRONMENT LD_LIBRARY_PATH=${UNITY_PLUGINPATH}/Ubuntu/Gestures
39
36
        DEPENDS UbuntuGesturesTest-qmlfiles
40
37
        ${ARGN}
41
38
    )
42
 
    add_manual_qml_test(. ${CLASSNAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins
43
 
                                                    ${CMAKE_BINARY_DIR}/tests/utils/modules)
 
39
    add_manual_qml_test(. ${CLASSNAME} IMPORT_PATHS ${UNITY_PLUGINPATH})
44
40
endmacro()
45
41
 
46
42
add_gesture_ui_test(DirectionalDragArea)