~ci-train-bot/unity8/unity8-ubuntu-zesty-2167

« back to all changes in this revision

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

  • Committer: Michał Sawicz
  • Date: 2013-06-05 22:03:08 UTC
  • Revision ID: michal.sawicz@canonical.com-20130605220308-yny8fv3futtr04fg
Inital unity8 commit.

Previous history can be found at https://code.launchpad.net/~unity-team/unity/phablet

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
########## tst_DirectionalDragArea
 
2
 
 
3
include_directories(
 
4
    ${CMAKE_SOURCE_DIR}/plugins/Ubuntu/Gestures
 
5
    ${CMAKE_CURRENT_BINARY_DIR}
 
6
    )
 
7
 
 
8
set(testCommand
 
9
      LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
 
10
      ${CMAKE_CURRENT_BINARY_DIR}/DirectionalDragAreaTestExec
 
11
      -o ${CMAKE_BINARY_DIR}/DirectionalDragAreaTest.xml,xunitxml
 
12
      -o -,txt)
 
13
 
 
14
add_custom_target(DirectionalDragAreaTest ${testCommand})
 
15
add_dependencies(qmluitests DirectionalDragAreaTest)
 
16
add_dependencies(DirectionalDragAreaTest DirectionalDragAreaTestExec UbutunGesturesTestQmlFiles)
 
17
 
 
18
add_executable(DirectionalDragAreaTestExec tst_DirectionalDragArea.cpp)
 
19
qt5_use_modules(DirectionalDragAreaTestExec Test Core Qml Gui Quick)
 
20
target_link_libraries(DirectionalDragAreaTestExec UbuntuGestureQml)
 
21
 
 
22
add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
 
23
 
 
24
file(GLOB qmlFiles *.qml)
 
25
add_custom_target(UbuntuGesturesTestQmlFiles ALL
 
26
    COMMAND cp ${qmlFiles} ${CMAKE_CURRENT_BINARY_DIR}
 
27
    DEPENDS ${qmlFiles}
 
28
)
 
29
 
 
30
macro(add_gesture_test CLASSNAME)
 
31
    set(testCommand
 
32
         ${CLASSNAME}TestExec -o ${CMAKE_BINARY_DIR}/test${CLASSNAME}.xml,xunitxml -o -,txt)
 
33
 
 
34
    add_test(NAME test${CLASSNAME} COMMAND ${testCommand})
 
35
 
 
36
    set_tests_properties(test${CLASSNAME} PROPERTIES
 
37
        ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures)
 
38
 
 
39
    add_executable(${CLASSNAME}TestExec tst_${CLASSNAME}.cpp)
 
40
    qt5_use_modules(${CLASSNAME}TestExec Test Core)
 
41
    target_link_libraries(${CLASSNAME}TestExec UbuntuGestureQml)
 
42
endmacro(add_gesture_test)
 
43
 
 
44
add_gesture_test(Damper)
 
45
add_gesture_test(AxisVelocityCalculator)