blob: ea81de7a84a6a0586bd9404cfcdbe8900471b08d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
find_pkg(Qt5 COMPONENTS Test REQUIRED)
option(online-tests "Whether or not tests that need a working internet connection should be included" OFF)
set(TESTS "")
macro(use_test TEST_NAME)
add_subdirectory("${TEST_NAME}")
list(APPEND TESTS "${TEST_NAME}")
endmacro()
if(client)
use_test("TestXMLTools")
endif()
if(server)
use_test("TestCrypt")
endif()
# Shared tests
use_test("TestCryptographicHash")
use_test("TestCryptographicRandom")
use_test("TestFFDHE")
use_test("TestPacketDataStream")
use_test("TestPasswordGenerator")
use_test("TestSelfSignedCertificate")
use_test("TestServerAddress")
use_test("TestSSLLocks")
use_test("TestStdAbs")
use_test("TestTimer")
use_test("TestUnresolvedServerAddress")
if(online-tests)
message(STATUS "Including online tests - These will fail if you don't have a working internet connection when running them")
use_test("TestServerResolver")
else()
message(STATUS "Omitting online tests - Testing can be performed without an active internet connection")
endif()
# Set output directory
foreach(CURRENT_TEST IN LISTS TESTS)
set_target_properties("${CURRENT_TEST}" PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests")
endforeach()
|