summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2021-01-11 15:49:30 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2021-01-15 12:34:22 +0100
commit66918b6492297e7750621d85d4372bf45e81a86d (patch)
tree161146a97b8863432ddedb629b700f479189d4c8 /tests
parentbb26d975c157a70d93e42ddd2748f81440186cf5 (diff)
Qt6: Port module to cmake build system
Fixes: QTBUG-89767 Fixes: QTBUG-89878 Change-Id: I860ae7b9dbb0f79e9e952d594b9737d4c452579a Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt5
-rw-r--r--tests/auto/CMakeLists.txt6
-rw-r--r--tests/auto/auto.pro5
-rw-r--r--tests/auto/cmake/CMakeLists.txt13
-rw-r--r--tests/auto/cmake/cmake.pro7
-rw-r--r--tests/auto/qserialport/CMakeLists.txt11
-rw-r--r--tests/auto/qserialport/qserialport.pro7
-rw-r--r--tests/auto/qserialportinfo/CMakeLists.txt11
-rw-r--r--tests/auto/qserialportinfo/qserialportinfo.pro5
-rw-r--r--tests/auto/qserialportinfoprivate/CMakeLists.txt11
-rw-r--r--tests/auto/qserialportinfoprivate/qserialportinfoprivate.pro4
-rw-r--r--tests/tests.pro2
12 files changed, 44 insertions, 43 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 00000000..2e6270ae
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,5 @@
+if(QT_BUILD_STANDALONE_TESTS)
+ # Add qt_find_package calls for extra dependencies that need to be found when building
+ # the standalone tests here.
+endif()
+qt_build_tests()
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
new file mode 100644
index 00000000..97f8f2a2
--- /dev/null
+++ b/tests/auto/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_subdirectory(qserialport)
+add_subdirectory(qserialportinfo)
+add_subdirectory(cmake)
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qserialportinfoprivate)
+endif()
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
deleted file mode 100644
index 6c0bcec0..00000000
--- a/tests/auto/auto.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS += qserialport qserialportinfo qserialportinfoprivate cmake
-
-!qtConfig(private_tests): SUBDIRS -= \
- qserialportinfoprivate
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 597f0d37..8b137891 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -1,14 +1 @@
-cmake_minimum_required(VERSION 2.8)
-
-project(qmake_cmake_files)
-
-enable_testing()
-
-find_package(Qt5Core REQUIRED)
-
-include("${_Qt5CTestMacros}")
-
-test_module_includes(
- SerialPort QSerialPort
-)
diff --git a/tests/auto/cmake/cmake.pro b/tests/auto/cmake/cmake.pro
deleted file mode 100644
index 65964972..00000000
--- a/tests/auto/cmake/cmake.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-
-# Cause make to do nothing.
-TEMPLATE = subdirs
-
-CMAKE_QT_MODULES_UNDER_TEST = serialport
-
-CONFIG += ctest_testcase
diff --git a/tests/auto/qserialport/CMakeLists.txt b/tests/auto/qserialport/CMakeLists.txt
new file mode 100644
index 00000000..90438899
--- /dev/null
+++ b/tests/auto/qserialport/CMakeLists.txt
@@ -0,0 +1,11 @@
+#####################################################################
+## tst_qserialport Binary:
+#####################################################################
+
+qt_internal_add_test(tst_qserialport
+ SOURCES
+ tst_qserialport.cpp
+ PUBLIC_LIBRARIES
+ Qt::SerialPort
+ Qt::Test
+)
diff --git a/tests/auto/qserialport/qserialport.pro b/tests/auto/qserialport/qserialport.pro
deleted file mode 100644
index 5435fa39..00000000
--- a/tests/auto/qserialport/qserialport.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-QT = core testlib
-TARGET = tst_qserialport
-#CONFIG += testcase
-
-QT += serialport
-
-SOURCES = tst_qserialport.cpp
diff --git a/tests/auto/qserialportinfo/CMakeLists.txt b/tests/auto/qserialportinfo/CMakeLists.txt
new file mode 100644
index 00000000..4ae3910e
--- /dev/null
+++ b/tests/auto/qserialportinfo/CMakeLists.txt
@@ -0,0 +1,11 @@
+#####################################################################
+## tst_qserialportinfo Binary:
+#####################################################################
+
+qt_internal_add_test(tst_qserialportinfo
+ SOURCES
+ tst_qserialportinfo.cpp
+ PUBLIC_LIBRARIES
+ Qt::SerialPort
+ Qt::Test
+)
diff --git a/tests/auto/qserialportinfo/qserialportinfo.pro b/tests/auto/qserialportinfo/qserialportinfo.pro
deleted file mode 100644
index 0cf4c1d5..00000000
--- a/tests/auto/qserialportinfo/qserialportinfo.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-QT = core testlib serialport
-TARGET = tst_qserialportinfo
-#CONFIG += testcase
-
-SOURCES = tst_qserialportinfo.cpp
diff --git a/tests/auto/qserialportinfoprivate/CMakeLists.txt b/tests/auto/qserialportinfoprivate/CMakeLists.txt
new file mode 100644
index 00000000..20e45a97
--- /dev/null
+++ b/tests/auto/qserialportinfoprivate/CMakeLists.txt
@@ -0,0 +1,11 @@
+#####################################################################
+## tst_qserialportinfoprivate Binary:
+#####################################################################
+
+qt_internal_add_test(tst_qserialportinfoprivate
+ SOURCES
+ tst_qserialportinfoprivate.cpp
+ PUBLIC_LIBRARIES
+ Qt::SerialPortPrivate
+ Qt::Test
+)
diff --git a/tests/auto/qserialportinfoprivate/qserialportinfoprivate.pro b/tests/auto/qserialportinfoprivate/qserialportinfoprivate.pro
deleted file mode 100644
index f479a298..00000000
--- a/tests/auto/qserialportinfoprivate/qserialportinfoprivate.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-QT = core testlib serialport-private
-TARGET = tst_qserialportinfoprivate
-#CONFIG += testcase
-SOURCES = tst_qserialportinfoprivate.cpp
diff --git a/tests/tests.pro b/tests/tests.pro
deleted file mode 100644
index 157ef345..00000000
--- a/tests/tests.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS += auto