aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-07-11 16:57:33 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2023-07-12 18:23:38 +0200
commit1bea3e0d88dee5c335c7fef25feb1898fdb45101 (patch)
tree6f26e37a70e98dde163cd5ac4e797e2764e2307b /tests
parentc9ac4d891e8a364c7eb2fad5eccb221eeaf031c4 (diff)
CMake: Make qtcoap tests standalone projects
Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: Idc25fe2da6e4d6dbefa9fc669401e127beec2ae4 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qcoapclient/CMakeLists.txt6
-rw-r--r--tests/auto/qcoapinternalreply/CMakeLists.txt6
-rw-r--r--tests/auto/qcoapinternalrequest/CMakeLists.txt6
-rw-r--r--tests/auto/qcoapmessage/CMakeLists.txt6
-rw-r--r--tests/auto/qcoapoption/CMakeLists.txt6
-rw-r--r--tests/auto/qcoapqudpconnection/CMakeLists.txt6
-rw-r--r--tests/auto/qcoapreply/CMakeLists.txt6
-rw-r--r--tests/auto/qcoaprequest/CMakeLists.txt6
-rw-r--r--tests/auto/qcoapresource/CMakeLists.txt6
9 files changed, 54 insertions, 0 deletions
diff --git a/tests/auto/qcoapclient/CMakeLists.txt b/tests/auto/qcoapclient/CMakeLists.txt
index 07b820a..fd2ce67 100644
--- a/tests/auto/qcoapclient/CMakeLists.txt
+++ b/tests/auto/qcoapclient/CMakeLists.txt
@@ -5,6 +5,12 @@
## qcoapclient Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(qcoapclient LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
set (QT_TESTSERVER_COMPOSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../testserver/docker-compose.yml")
qt_internal_add_test(qcoapclient
diff --git a/tests/auto/qcoapinternalreply/CMakeLists.txt b/tests/auto/qcoapinternalreply/CMakeLists.txt
index 3222906..023f686 100644
--- a/tests/auto/qcoapinternalreply/CMakeLists.txt
+++ b/tests/auto/qcoapinternalreply/CMakeLists.txt
@@ -5,6 +5,12 @@
## qcoapinternalreply Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(qcoapinternalreply LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(qcoapinternalreply
SOURCES
tst_qcoapinternalreply.cpp
diff --git a/tests/auto/qcoapinternalrequest/CMakeLists.txt b/tests/auto/qcoapinternalrequest/CMakeLists.txt
index 6c4fe2c..735efdc 100644
--- a/tests/auto/qcoapinternalrequest/CMakeLists.txt
+++ b/tests/auto/qcoapinternalrequest/CMakeLists.txt
@@ -5,6 +5,12 @@
## qcoapinternalrequest Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(qcoapinternalrequest LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(qcoapinternalrequest
SOURCES
tst_qcoapinternalrequest.cpp
diff --git a/tests/auto/qcoapmessage/CMakeLists.txt b/tests/auto/qcoapmessage/CMakeLists.txt
index f160b1a..5ae5c12 100644
--- a/tests/auto/qcoapmessage/CMakeLists.txt
+++ b/tests/auto/qcoapmessage/CMakeLists.txt
@@ -5,6 +5,12 @@
## qcoapmessage Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(qcoapmessage LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(qcoapmessage
SOURCES
tst_qcoapmessage.cpp
diff --git a/tests/auto/qcoapoption/CMakeLists.txt b/tests/auto/qcoapoption/CMakeLists.txt
index f099581..1b1b058 100644
--- a/tests/auto/qcoapoption/CMakeLists.txt
+++ b/tests/auto/qcoapoption/CMakeLists.txt
@@ -5,6 +5,12 @@
## qcoapoption Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(qcoapoption LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(qcoapoption
SOURCES
tst_qcoapoption.cpp
diff --git a/tests/auto/qcoapqudpconnection/CMakeLists.txt b/tests/auto/qcoapqudpconnection/CMakeLists.txt
index aab6cd5..a7057e1 100644
--- a/tests/auto/qcoapqudpconnection/CMakeLists.txt
+++ b/tests/auto/qcoapqudpconnection/CMakeLists.txt
@@ -5,6 +5,12 @@
## qcoapqudpconnection Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(qcoapqudpconnection LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
set (QT_TESTSERVER_COMPOSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../testserver/docker-compose.yml")
qt_internal_add_test(qcoapqudpconnection
diff --git a/tests/auto/qcoapreply/CMakeLists.txt b/tests/auto/qcoapreply/CMakeLists.txt
index cbf9951..2db6bc1 100644
--- a/tests/auto/qcoapreply/CMakeLists.txt
+++ b/tests/auto/qcoapreply/CMakeLists.txt
@@ -5,6 +5,12 @@
## qcoapreply Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(qcoapreply LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(qcoapreply
SOURCES
tst_qcoapreply.cpp
diff --git a/tests/auto/qcoaprequest/CMakeLists.txt b/tests/auto/qcoaprequest/CMakeLists.txt
index 4e48d3f..9f3d019 100644
--- a/tests/auto/qcoaprequest/CMakeLists.txt
+++ b/tests/auto/qcoaprequest/CMakeLists.txt
@@ -5,6 +5,12 @@
## qcoaprequest Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(qcoaprequest LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(qcoaprequest
SOURCES
tst_qcoaprequest.cpp
diff --git a/tests/auto/qcoapresource/CMakeLists.txt b/tests/auto/qcoapresource/CMakeLists.txt
index 815e24e..22b2b13 100644
--- a/tests/auto/qcoapresource/CMakeLists.txt
+++ b/tests/auto/qcoapresource/CMakeLists.txt
@@ -5,6 +5,12 @@
## qcoapresource Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(qcoapresource LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(qcoapresource
SOURCES
tst_qcoapresource.cpp