Mercurial > trustbridge
comparison ui/tests/CMakeLists.txt @ 409:09bb19e5e369
Remove m13 mentions and change test certificate to intevation.de
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 16 Apr 2014 14:00:12 +0000 |
parents | ac9e95ef6966 |
children | a53286e5b126 |
comparison
equal
deleted
inserted
replaced
408:ac9e95ef6966 | 409:09bb19e5e369 |
---|---|
20 message (STATUS "WARNING: hiawatha webserver not found. Downloader tests will fail.") | 20 message (STATUS "WARNING: hiawatha webserver not found. Downloader tests will fail.") |
21 else() | 21 else() |
22 add_definitions(-DHIAWATHA_EXECUTABLE="${HIAWATHA_EXECUTABLE}") | 22 add_definitions(-DHIAWATHA_EXECUTABLE="${HIAWATHA_EXECUTABLE}") |
23 endif() | 23 endif() |
24 | 24 |
25 macro(add_m13_test _source _additional_sources) | 25 macro(add_custom_test _source _additional_sources) |
26 set(_test ${_source}) | 26 set(_test ${_source}) |
27 get_filename_component(_name ${_source} NAME_WE) | 27 get_filename_component(_name ${_source} NAME_WE) |
28 set(_test_sources_with_resources ${_test} | 28 set(_test_sources_with_resources ${_test} |
29 "${_additional_sources};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp") | 29 "${_additional_sources};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp") |
30 qt5_add_resources(_test_sources_with_resources | 30 qt5_add_resources(_test_sources_with_resources |
31 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc) | 31 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc) |
32 add_executable(${_name} ${_test_sources_with_resources}) | 32 add_executable(${_name} ${_test_sources_with_resources}) |
33 add_test(m13-${_name} ${_name}) | 33 add_test(tb-${_name} ${_name}) |
34 target_link_libraries(${_name} Qt5::Test Qt5::Widgets | 34 target_link_libraries(${_name} Qt5::Test Qt5::Widgets |
35 trustbridge_common | 35 trustbridge_common |
36 ${POLARSSL_LIBRARIES} | 36 ${POLARSSL_LIBRARIES} |
37 ${EXTRA_STATIC_LIBS}) | 37 ${EXTRA_STATIC_LIBS}) |
38 endmacro() | 38 endmacro() |
39 | 39 |
40 # Add the current source dir to the definition | 40 # Add the current source dir to the definition |
41 # so that it can be used in file names in the tests. | 41 # so that it can be used in file names in the tests. |
42 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") | 42 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") |
43 add_m13_test(certlistparsertest.cpp "${CERTIFICATELIST_SOURCES}") | 43 add_custom_test(certlistparsertest.cpp "${CERTIFICATELIST_SOURCES}") |
44 | 44 |
45 # Downloader | 45 # Downloader |
46 if (HIAWATHA_EXECUTABLE) | 46 if (HIAWATHA_EXECUTABLE) |
47 set(DOWNLOADER_SOURCES_WITH_RESOURCES ${DOWNLOADER_SOURCES}) | 47 set(DOWNLOADER_SOURCES_WITH_RESOURCES ${DOWNLOADER_SOURCES}) |
48 qt5_add_resources(DOWNLOADER_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES}) | 48 qt5_add_resources(DOWNLOADER_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES}) |
49 add_m13_test(downloadertest.cpp "${DOWNLOADER_SOURCES_WITH_RESOURCES}") | 49 add_custom_test(downloadertest.cpp "${DOWNLOADER_SOURCES_WITH_RESOURCES}") |
50 endif() | 50 endif() |
51 | 51 |
52 # Cinstprocess | 52 # Cinstprocess |
53 add_m13_test(cinstprocesstest.cpp "${CERTIFICATELIST_SOURCES}") | 53 add_custom_test(cinstprocesstest.cpp "${CERTIFICATELIST_SOURCES}") |
54 add_dependencies(cinstprocesstest cinst) | 54 add_dependencies(cinstprocesstest cinst) |
55 add_m13_test(commontest.cpp "") | 55 add_custom_test(commontest.cpp "") |
56 | 56 |
57 if (WIN32) | 57 if (WIN32) |
58 add_m13_test(windowsstoretest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/windowsstore.c") | 58 add_custom_test(windowsstoretest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/windowsstore.c") |
59 endif (WIN32) | 59 endif (WIN32) |
60 | 60 |
61 if (NSS_FOUND) | 61 if (NSS_FOUND) |
62 include_directories(${NSS_INCLUDE_DIRS}) | 62 include_directories(${NSS_INCLUDE_DIRS}) |
63 set(NSSTEST_SOURCES | 63 set(NSSTEST_SOURCES |
64 ${CERTIFICATELIST_SOURCES} | 64 ${CERTIFICATELIST_SOURCES} |
65 ${CMAKE_SOURCE_DIR}/cinst/nssstore_linux.c | 65 ${CMAKE_SOURCE_DIR}/cinst/nssstore_linux.c |
66 ${CMAKE_SOURCE_DIR}/cinst/nssstore_win.c) | 66 ${CMAKE_SOURCE_DIR}/cinst/nssstore_win.c) |
67 add_m13_test(nsstest.cpp "${NSSTEST_SOURCES}") | 67 add_custom_test(nsstest.cpp "${NSSTEST_SOURCES}") |
68 target_link_libraries(nsstest ${NSS_LIBRARIES}) | 68 target_link_libraries(nsstest ${NSS_LIBRARIES}) |
69 if (WIN32) | 69 if (WIN32) |
70 target_link_libraries(nsstest -luserenv) | 70 target_link_libraries(nsstest -luserenv) |
71 endif() | 71 endif() |
72 | 72 |
73 add_dependencies(nsstest mozilla) | 73 add_dependencies(nsstest mozilla) |
74 endif() | 74 endif() |
75 | 75 |
76 #add_m13_test(${CMAKE_SOURCE_DIR}/ui/main.cpp "${TRUSTBRIDGE_SOURCES}") | 76 #add_custom_test(${CMAKE_SOURCE_DIR}/ui/main.cpp "${TRUSTBRIDGE_SOURCES}") |
77 | 77 |