~indicator-applet-developers/gmenuharness/trunk

« back to all changes in this revision

Viewing changes to tests/CMakeLists.txt

  • Committer: CI Train Bot
  • Author(s): Pete Woods
  • Date: 2015-11-19 11:12:19 UTC
  • mfrom: (21.1.8 trunk)
  • Revision ID: ci-train-bot@canonical.com-20151119111219-te1t1218hdc20lnn
Add a very basic level of functional testing
Approved by: Charles Kerr

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
enable_testing()
 
3
ADD_CUSTOM_TARGET(
 
4
        check
 
5
        ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure
 
6
)
 
7
 
 
8
find_package(GMock REQUIRED)
 
9
find_package(Qt5Core REQUIRED)
 
10
find_package(Qt5DBus REQUIRED)
 
11
 
 
12
pkg_check_modules(
 
13
    TEST_DEPENDENCIES
 
14
    libqtdbustest-1>=0.2 REQUIRED
 
15
)
 
16
 
 
17
include_directories(
 
18
    ${Qt5Core_INCLUDE_DIRS}
 
19
    ${Qt5DBus_INCLUDE_DIRS}
 
20
    ${TEST_DEPENDENCIES_INCLUDE_DIRS}
 
21
    "${CMAKE_SOURCE_DIR}/include"
 
22
 
23
 
 
24
add_subdirectory(functional)
 
25
add_subdirectory(utils)
 
26
 
 
27
add_definitions(
 
28
    -DMENU_DIR="${CMAKE_CURRENT_BINARY_DIR}/functional/menus"
 
29
)
 
30
 
 
31
add_executable(
 
32
    tests
 
33
    functional/FunctionalTests.cpp
 
34
    unit/TestMatchResult.cpp
 
35
)
 
36
 
 
37
target_link_libraries(
 
38
    tests
 
39
    test-main
 
40
    ${GMENU_HARNESS}
 
41
    ${TEST_DEPENDENCIES_LDFLAGS}
 
42
    Qt5::DBus
 
43
)
 
44
 
 
45
add_test(
 
46
    tests
 
47
    tests
 
48
)
 
49