Changeset View
Changeset View
Standalone View
Standalone View
src/tests/CMakeLists.txt
1 | if(NOT BUILD_TESTING) | ||||
---|---|---|---|---|---|
2 | # Skip everything. Particularly trying to look for integration test deps. | ||||
3 | return() | ||||
4 | endif() | ||||
5 | | ||||
6 | if(BUILD_COVERAGE) | ||||
7 | add_custom_target(coverage) | ||||
8 | add_custom_command(TARGET coverage | ||||
9 | COMMAND ctest | ||||
10 | COMMAND lcov -o ${CMAKE_BINARY_DIR}/lcov.report -c -d ${CMAKE_BINARY_DIR} | ||||
11 | COMMAND genhtml -o ${CMAKE_BINARY_DIR}/coverage ${CMAKE_BINARY_DIR}/lcov.report | ||||
12 | COMMAND find ${CMAKE_BINARY_DIR} -iname *.gcda | xargs rm -v | ||||
13 | DEPENDS test | ||||
14 | ) | ||||
15 | add_custom_target(show-coverage | ||||
16 | COMMAND xdg-open ${CMAKE_BINARY_DIR}/coverage/index.html | ||||
17 | DEPENDS coverage | ||||
18 | ) | ||||
19 | endif() | ||||
20 | | ||||
1 | add_subdirectory(crashtest) | 21 | add_subdirectory(crashtest) | ||
2 | add_subdirectory(backtraceparsertest) | 22 | add_subdirectory(backtraceparsertest) | ||
3 | if(KF5XmlRpcClient_FOUND) | | |||
4 | add_subdirectory(bugzillalibtest) | 23 | add_subdirectory(bugzillalibtest) | ||
5 | endif() | | |||
6 | 24 | | |||
7 | if(NOT APPLE) | 25 | if(NOT APPLE) | ||
8 | if(NOT RUBY_EXECTUABLE) | 26 | if(NOT RUBY_EXECTUABLE) | ||
9 | find_program(RUBY_EXECUTABLE ruby) | 27 | find_program(RUBY_EXECUTABLE ruby) | ||
10 | endif() | 28 | endif() | ||
11 | if(RUBY_EXECUTABLE) | 29 | if(RUBY_EXECUTABLE) | ||
12 | execute_process(COMMAND ${RUBY_EXECUTABLE} -e "require 'atspi'" | 30 | execute_process(COMMAND ${RUBY_EXECUTABLE} -e "require 'atspi'" | ||
13 | RESULT_VARIABLE RUBY_ATSPI) | 31 | RESULT_VARIABLE RUBY_ATSPI) | ||
14 | execute_process(COMMAND ${RUBY_EXECUTABLE} -e "require 'xmlrpc/server'" | | |||
15 | RESULT_VARIABLE RUBY_XMLRPC) | | |||
16 | endif() | 32 | endif() | ||
17 | if(NOT GDB_EXECUTABLE) | 33 | if(NOT GDB_EXECUTABLE) | ||
18 | # Needed so drkonqi can actually trace something. | 34 | # Needed so drkonqi can actually trace something. | ||
19 | find_program(GDB_EXECUTABLE gdb) | 35 | find_program(GDB_EXECUTABLE gdb) | ||
20 | endif() | 36 | endif() | ||
21 | if(NOT XVFB_RUN_EXECTUABLE) | 37 | if(NOT XVFB_RUN_EXECTUABLE) | ||
22 | find_program(XVFB_RUN_EXECTUABLE xvfb-run) | 38 | find_program(XVFB_RUN_EXECTUABLE xvfb-run) | ||
23 | endif() | 39 | endif() | ||
Show All 12 Lines | 51 | if(NOT ATSPI_REGISTRYD_EXECUTABLE) | |||
36 | find_program(ATSPI_REGISTRYD_EXECUTABLE | 52 | find_program(ATSPI_REGISTRYD_EXECUTABLE | ||
37 | NAMES at-spi2-registryd | 53 | NAMES at-spi2-registryd | ||
38 | PATHS ${ATSPI_PATHS} | 54 | PATHS ${ATSPI_PATHS} | ||
39 | DOC "AT-SPI accessibility registry daemon") | 55 | DOC "AT-SPI accessibility registry daemon") | ||
40 | endif() | 56 | endif() | ||
41 | 57 | | |||
42 | if(RUBY_EXECUTABLE AND XVFB_RUN_EXECTUABLE AND ATSPI_BUS_LAUNCHER_EXECUTABLE | 58 | if(RUBY_EXECUTABLE AND XVFB_RUN_EXECTUABLE AND ATSPI_BUS_LAUNCHER_EXECUTABLE | ||
43 | AND ATSPI_REGISTRYD_EXECUTABLE AND GDB_EXECUTABLE | 59 | AND ATSPI_REGISTRYD_EXECUTABLE AND GDB_EXECUTABLE | ||
44 | AND RUBY_ATSPI EQUAL 0 AND RUBY_XMLRPC EQUAL 0) | 60 | AND RUBY_ATSPI EQUAL 0) | ||
45 | set(WITH_DRKONI_INTEGRATION_TESTING TRUE) | 61 | set(WITH_DRKONI_INTEGRATION_TESTING TRUE) | ||
46 | add_subdirectory(integration) | 62 | add_subdirectory(integration) | ||
47 | endif() | 63 | endif() | ||
48 | add_feature_info(DrKonqiIntegrationTesting WITH_DRKONI_INTEGRATION_TESTING | 64 | add_feature_info(DrKonqiIntegrationTesting WITH_DRKONI_INTEGRATION_TESTING | ||
49 | "Needs Ruby, functional atspi and xmlrpc gems, gdb, as well as xvfb-run.") | 65 | "Needs Ruby, functional atspi gem, gdb, as well as xvfb-run.") | ||
50 | endif() | 66 | endif() |