summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2019-10-07 11:17:45 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2019-10-10 12:10:27 +0000
commit06fdea1ce570e0dae86e33f485e429fefacda0fa (patch)
tree6c0aa671543adea088bd738955fd84a78b000a07 /tests
parentfbace1f4e059dee498332146da0d90c627886952 (diff)
cmake: add corelib/thread/qthreadstorage
Fixes: QTBUG-78221 Change-Id: Icb4614f8187c16e6b13d9db1dbc6adfcd579db43 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/thread/qthread/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt21
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashonexit/CMakeLists.txt15
5 files changed, 38 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 4680decd7c..8414e974ae 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -10,6 +10,7 @@ if(NOT TARGET Qt::Test)
# because a few tests link directly against those libraries.
qt_find_package(WrapDBus1 PROVIDED_TARGETS dbus-1)
qt_find_package(ICU COMPONENTS i18n uc data PROVIDED_TARGETS ICU::i18n ICU::uc ICU::data)
+ qt_find_package(Threads PROVIDED_TARGETS Threads::Threads)
endif()
# special case end
diff --git a/tests/auto/corelib/thread/CMakeLists.txt b/tests/auto/corelib/thread/CMakeLists.txt
index d37ee1759a..d07c583a77 100644
--- a/tests/auto/corelib/thread/CMakeLists.txt
+++ b/tests/auto/corelib/thread/CMakeLists.txt
@@ -15,7 +15,7 @@ if(QT_FEATURE_thread)
add_subdirectory(qthread)
add_subdirectory(qthreadonce)
add_subdirectory(qthreadpool)
- # add_subdirectory(qthreadstorage) ### FIXME
+ add_subdirectory(qthreadstorage)
add_subdirectory(qwaitcondition)
add_subdirectory(qwritelocker)
endif()
diff --git a/tests/auto/corelib/thread/qthread/CMakeLists.txt b/tests/auto/corelib/thread/qthread/CMakeLists.txt
index 6fcfb5171b..a21e239c35 100644
--- a/tests/auto/corelib/thread/qthread/CMakeLists.txt
+++ b/tests/auto/corelib/thread/qthread/CMakeLists.txt
@@ -4,8 +4,6 @@
## tst_qthread Test:
#####################################################################
-qt_find_package(Threads PROVIDED_TARGETS Threads::Threads) # special case
-
add_qt_test(tst_qthread
SOURCES
../../../../shared/emulationdetector.h
diff --git a/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt b/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt
new file mode 100644
index 0000000000..52a928863c
--- /dev/null
+++ b/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt
@@ -0,0 +1,21 @@
+# special case skip regeneration
+# Generated from qthreadstorage.pro.
+
+#####################################################################
+## tst_qthreadstorage Test:
+#####################################################################
+
+add_qt_test(tst_qthreadstorage
+ SOURCES
+ tst_qthreadstorage.cpp
+ LIBRARIES # special case
+ Threads::Threads # special case
+
+)
+
+## Scopes:
+#####################################################################
+
+if(NOT ANDROID AND NOT WINRT)
+ add_subdirectory(crashonexit)
+endif()
diff --git a/tests/auto/corelib/thread/qthreadstorage/crashonexit/CMakeLists.txt b/tests/auto/corelib/thread/qthreadstorage/crashonexit/CMakeLists.txt
new file mode 100644
index 0000000000..b2bac9713a
--- /dev/null
+++ b/tests/auto/corelib/thread/qthreadstorage/crashonexit/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from crashonexit.pro.
+
+#####################################################################
+## crashonexit Binary:
+#####################################################################
+
+add_qt_executable(crashOnExit_helper
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." # special case
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qthreadstorage/crashOnExit_helper" # special case
+ SOURCES
+ crashOnExit.cpp
+)
+
+## Scopes:
+#####################################################################