diff options
author | Davide Beatrici <git@davidebeatrici.dev> | 2020-05-26 09:13:03 +0300 |
---|---|---|
committer | Davide Beatrici <git@davidebeatrici.dev> | 2020-07-11 20:34:49 +0300 |
commit | abc04159f5d27547e55372bcbf1d547ecdc3fe99 (patch) | |
tree | 1e3eb458ddae941638560f9002d835ec236328b1 /src | |
parent | 4100d8db4f1be73572cefc9b41fe9c8f66d7da23 (diff) |
Tests: add CMakeLists.txt files
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/CMakeLists.txt | 15 | ||||
-rw-r--r-- | src/tests/TestCrypt/CMakeLists.txt | 16 | ||||
-rw-r--r-- | src/tests/TestCryptographicHash/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestCryptographicRandom/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestFFDHE/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestPacketDataStream/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestPasswordGenerator/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestSSLLocks/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestSelfSignedCertificate/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestServerAddress/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestServerResolver/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestStdAbs/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestTimer/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestUnresolvedServerAddress/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/tests/TestXMLTools/CMakeLists.txt | 23 |
15 files changed, 198 insertions, 0 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt new file mode 100644 index 000000000..bdfd06903 --- /dev/null +++ b/src/tests/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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) + +file(GLOB ITEMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*") + +foreach(ITEM ${ITEMS}) + if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}") + add_subdirectory(${ITEM}) + set_target_properties(${ITEM} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests") + endif() +endforeach() diff --git a/src/tests/TestCrypt/CMakeLists.txt b/src/tests/TestCrypt/CMakeLists.txt new file mode 100644 index 000000000..302e8a262 --- /dev/null +++ b/src/tests/TestCrypt/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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>. + +add_executable(TestCrypt TestCrypt.cpp) + +set_target_properties(TestCrypt PROPERTIES AUTOMOC ON) + +get_target_property(MURMUR_SOURCE_DIR murmur SOURCE_DIR) + +target_include_directories(TestCrypt PRIVATE ${MURMUR_SOURCE_DIR}) + +target_link_libraries(TestCrypt PRIVATE shared Qt5::Test) + +add_test(NAME TestCrypt COMMAND $<TARGET_FILE:TestCrypt>) diff --git a/src/tests/TestCryptographicHash/CMakeLists.txt b/src/tests/TestCryptographicHash/CMakeLists.txt new file mode 100644 index 000000000..c18a18392 --- /dev/null +++ b/src/tests/TestCryptographicHash/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestCryptographicHash TestCryptographicHash.cpp) + +set_target_properties(TestCryptographicHash PROPERTIES AUTOMOC ON) + +target_link_libraries(TestCryptographicHash PRIVATE shared Qt5::Test) + +add_test(NAME TestCryptographicHash COMMAND $<TARGET_FILE:TestCryptographicHash>) diff --git a/src/tests/TestCryptographicRandom/CMakeLists.txt b/src/tests/TestCryptographicRandom/CMakeLists.txt new file mode 100644 index 000000000..57779bf09 --- /dev/null +++ b/src/tests/TestCryptographicRandom/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestCryptographicRandom TestCryptographicRandom.cpp) + +set_target_properties(TestCryptographicRandom PROPERTIES AUTOMOC ON) + +target_link_libraries(TestCryptographicRandom PRIVATE shared Qt5::Test) + +add_test(NAME TestCryptographicRandom COMMAND $<TARGET_FILE:TestCryptographicRandom>) diff --git a/src/tests/TestFFDHE/CMakeLists.txt b/src/tests/TestFFDHE/CMakeLists.txt new file mode 100644 index 000000000..400c3633f --- /dev/null +++ b/src/tests/TestFFDHE/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestFFDHE TestFFDHE.cpp) + +set_target_properties(TestFFDHE PROPERTIES AUTOMOC ON) + +target_link_libraries(TestFFDHE PRIVATE shared Qt5::Test) + +add_test(NAME TestFFDHE COMMAND $<TARGET_FILE:TestFFDHE>) diff --git a/src/tests/TestPacketDataStream/CMakeLists.txt b/src/tests/TestPacketDataStream/CMakeLists.txt new file mode 100644 index 000000000..c864d1712 --- /dev/null +++ b/src/tests/TestPacketDataStream/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestPacketDataStream TestPacketDataStream.cpp) + +set_target_properties(TestPacketDataStream PROPERTIES AUTOMOC ON) + +target_link_libraries(TestPacketDataStream PRIVATE shared Qt5::Test) + +add_test(NAME TestPacketDataStream COMMAND $<TARGET_FILE:TestPacketDataStream>) diff --git a/src/tests/TestPasswordGenerator/CMakeLists.txt b/src/tests/TestPasswordGenerator/CMakeLists.txt new file mode 100644 index 000000000..45cb524bb --- /dev/null +++ b/src/tests/TestPasswordGenerator/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestPasswordGenerator TestPasswordGenerator.cpp) + +set_target_properties(TestPasswordGenerator PROPERTIES AUTOMOC ON) + +target_link_libraries(TestPasswordGenerator PRIVATE shared Qt5::Test) + +add_test(NAME TestPasswordGenerator COMMAND $<TARGET_FILE:TestPasswordGenerator>) diff --git a/src/tests/TestSSLLocks/CMakeLists.txt b/src/tests/TestSSLLocks/CMakeLists.txt new file mode 100644 index 000000000..ab19fc5eb --- /dev/null +++ b/src/tests/TestSSLLocks/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestSSLLocks TestSSLLocks.cpp) + +set_target_properties(TestSSLLocks PROPERTIES AUTOMOC ON) + +target_link_libraries(TestSSLLocks PRIVATE shared Qt5::Test) + +add_test(NAME TestSSLLocks COMMAND $<TARGET_FILE:TestSSLLocks>) diff --git a/src/tests/TestSelfSignedCertificate/CMakeLists.txt b/src/tests/TestSelfSignedCertificate/CMakeLists.txt new file mode 100644 index 000000000..623d43c33 --- /dev/null +++ b/src/tests/TestSelfSignedCertificate/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestSelfSignedCertificate TestSelfSignedCertificate.cpp) + +set_target_properties(TestSelfSignedCertificate PROPERTIES AUTOMOC ON) + +target_link_libraries(TestSelfSignedCertificate PRIVATE shared Qt5::Test) + +add_test(NAME TestSelfSignedCertificate COMMAND $<TARGET_FILE:TestSelfSignedCertificate>) diff --git a/src/tests/TestServerAddress/CMakeLists.txt b/src/tests/TestServerAddress/CMakeLists.txt new file mode 100644 index 000000000..7d630d0cc --- /dev/null +++ b/src/tests/TestServerAddress/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestServerAddress TestServerAddress.cpp) + +set_target_properties(TestServerAddress PROPERTIES AUTOMOC ON) + +target_link_libraries(TestServerAddress PRIVATE shared Qt5::Test) + +add_test(NAME TestServerAddress COMMAND $<TARGET_FILE:TestServerAddress>) diff --git a/src/tests/TestServerResolver/CMakeLists.txt b/src/tests/TestServerResolver/CMakeLists.txt new file mode 100644 index 000000000..6840063d8 --- /dev/null +++ b/src/tests/TestServerResolver/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestServerResolver TestServerResolver.cpp) + +set_target_properties(TestServerResolver PROPERTIES AUTOMOC ON) + +target_link_libraries(TestServerResolver PRIVATE shared Qt5::Test) + +add_test(NAME TestServerResolver COMMAND $<TARGET_FILE:TestServerResolver>) diff --git a/src/tests/TestStdAbs/CMakeLists.txt b/src/tests/TestStdAbs/CMakeLists.txt new file mode 100644 index 000000000..5decb720c --- /dev/null +++ b/src/tests/TestStdAbs/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestStdAbs TestStdAbs.cpp) + +set_target_properties(TestStdAbs PROPERTIES AUTOMOC ON) + +target_link_libraries(TestStdAbs PRIVATE shared Qt5::Test) + +add_test(NAME TestStdAbs COMMAND $<TARGET_FILE:TestStdAbs>) diff --git a/src/tests/TestTimer/CMakeLists.txt b/src/tests/TestTimer/CMakeLists.txt new file mode 100644 index 000000000..2eb29be31 --- /dev/null +++ b/src/tests/TestTimer/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestTimer TestTimer.cpp) + +set_target_properties(TestTimer PROPERTIES AUTOMOC ON) + +target_link_libraries(TestTimer PRIVATE shared Qt5::Test) + +add_test(NAME TestTimer COMMAND $<TARGET_FILE:TestTimer>) diff --git a/src/tests/TestUnresolvedServerAddress/CMakeLists.txt b/src/tests/TestUnresolvedServerAddress/CMakeLists.txt new file mode 100644 index 000000000..4abbcefa3 --- /dev/null +++ b/src/tests/TestUnresolvedServerAddress/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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>. + +add_executable(TestUnresolvedServerAddress TestUnresolvedServerAddress.cpp) + +set_target_properties(TestUnresolvedServerAddress PROPERTIES AUTOMOC ON) + +target_link_libraries(TestUnresolvedServerAddress PRIVATE shared Qt5::Test) + +add_test(NAME TestUnresolvedServerAddress COMMAND $<TARGET_FILE:TestUnresolvedServerAddress>) diff --git a/src/tests/TestXMLTools/CMakeLists.txt b/src/tests/TestXMLTools/CMakeLists.txt new file mode 100644 index 000000000..0290f9b5f --- /dev/null +++ b/src/tests/TestXMLTools/CMakeLists.txt @@ -0,0 +1,23 @@ +# 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>. + +get_target_property(MUMBLE_SOURCE_DIR mumble SOURCE_DIR) + +set(TESTXMLTOOLS_SOURCES + TestXMLTools.cpp + + "${MUMBLE_SOURCE_DIR}/XMLTools.cpp" + "${MUMBLE_SOURCE_DIR}/XMLTools.h" +) + +add_executable(TestXMLTools ${TESTXMLTOOLS_SOURCES}) + +set_target_properties(TestXMLTools PROPERTIES AUTOMOC ON) + +target_include_directories(TestXMLTools PRIVATE ${MUMBLE_SOURCE_DIR}) + +target_link_libraries(TestXMLTools PRIVATE shared Qt5::Test) + +add_test(NAME TestXMLTools COMMAND $<TARGET_FILE:TestXMLTools>) |