From abc04159f5d27547e55372bcbf1d547ecdc3fe99 Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Tue, 26 May 2020 08:13:03 +0200 Subject: Tests: add CMakeLists.txt files --- src/tests/CMakeLists.txt | 15 ++++++++++++++ src/tests/TestCrypt/CMakeLists.txt | 16 +++++++++++++++ src/tests/TestCryptographicHash/CMakeLists.txt | 12 +++++++++++ src/tests/TestCryptographicRandom/CMakeLists.txt | 12 +++++++++++ src/tests/TestFFDHE/CMakeLists.txt | 12 +++++++++++ src/tests/TestPacketDataStream/CMakeLists.txt | 12 +++++++++++ src/tests/TestPasswordGenerator/CMakeLists.txt | 12 +++++++++++ src/tests/TestSSLLocks/CMakeLists.txt | 12 +++++++++++ src/tests/TestSelfSignedCertificate/CMakeLists.txt | 12 +++++++++++ src/tests/TestServerAddress/CMakeLists.txt | 12 +++++++++++ src/tests/TestServerResolver/CMakeLists.txt | 12 +++++++++++ src/tests/TestStdAbs/CMakeLists.txt | 12 +++++++++++ src/tests/TestTimer/CMakeLists.txt | 12 +++++++++++ .../TestUnresolvedServerAddress/CMakeLists.txt | 12 +++++++++++ src/tests/TestXMLTools/CMakeLists.txt | 23 ++++++++++++++++++++++ 15 files changed, 198 insertions(+) create mode 100644 src/tests/CMakeLists.txt create mode 100644 src/tests/TestCrypt/CMakeLists.txt create mode 100644 src/tests/TestCryptographicHash/CMakeLists.txt create mode 100644 src/tests/TestCryptographicRandom/CMakeLists.txt create mode 100644 src/tests/TestFFDHE/CMakeLists.txt create mode 100644 src/tests/TestPacketDataStream/CMakeLists.txt create mode 100644 src/tests/TestPasswordGenerator/CMakeLists.txt create mode 100644 src/tests/TestSSLLocks/CMakeLists.txt create mode 100644 src/tests/TestSelfSignedCertificate/CMakeLists.txt create mode 100644 src/tests/TestServerAddress/CMakeLists.txt create mode 100644 src/tests/TestServerResolver/CMakeLists.txt create mode 100644 src/tests/TestStdAbs/CMakeLists.txt create mode 100644 src/tests/TestTimer/CMakeLists.txt create mode 100644 src/tests/TestUnresolvedServerAddress/CMakeLists.txt create mode 100644 src/tests/TestXMLTools/CMakeLists.txt (limited to 'src/tests') 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 . + +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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) 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 . + +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 $) -- cgit v1.2.3