summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/thread
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/thread')
-rw-r--r--tests/auto/corelib/thread/qfuture/tst_qfuture.cpp4
-rw-r--r--tests/auto/corelib/thread/qsemaphore/BLACKLIST2
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp3
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.h4
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro10
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/test/test.pro17
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp22
-rw-r--r--tests/auto/corelib/thread/thread.pro39
8 files changed, 49 insertions, 52 deletions
diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
index d4a3ee6054..b8c82c2ea0 100644
--- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
+++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
@@ -1021,6 +1021,8 @@ void tst_QFuture::iterators()
QCOMPARE(i2, c2);
QCOMPARE(c2, i2);
QCOMPARE(c2, c2);
+ QCOMPARE(1 + i1, i1 + 1);
+ QCOMPARE(1 + c1, c1 + 1);
QVERIFY(i1 != i2);
QVERIFY(i1 != c2);
@@ -1070,6 +1072,8 @@ void tst_QFuture::iterators()
QCOMPARE(i2, c2);
QCOMPARE(c2, i2);
QCOMPARE(c2, c2);
+ QCOMPARE(1 + i1, i1 + 1);
+ QCOMPARE(1 + c1, c1 + 1);
QVERIFY(i1 != i2);
QVERIFY(i1 != c2);
diff --git a/tests/auto/corelib/thread/qsemaphore/BLACKLIST b/tests/auto/corelib/thread/qsemaphore/BLACKLIST
index eb83b03556..0786f50417 100644
--- a/tests/auto/corelib/thread/qsemaphore/BLACKLIST
+++ b/tests/auto/corelib/thread/qsemaphore/BLACKLIST
@@ -1,6 +1,8 @@
[tryAcquireWithTimeout:0.2s]
windows
osx-10.12
+osx-10.13
[tryAcquireWithTimeout:2s]
windows
osx-10.12
+osx-10.13
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
index 9179750218..d27884197a 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
@@ -30,7 +30,6 @@
#include "qplatformdefs.h"
#include "qthreadonce.h"
-#ifndef QT_NO_THREAD
#include "qmutex.h"
Q_GLOBAL_STATIC_WITH_ARGS(QMutex, onceInitializationMutex, (QMutex::Recursive))
@@ -104,5 +103,3 @@ void QOnceControl::done()
{
extra &= ~MustRunCode;
}
-
-#endif // QT_NO_THREAD
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.h b/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
index 71e830ca16..e5918b8fa5 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
@@ -34,8 +34,6 @@
#include <QtCore/qatomic.h>
-#ifndef QT_NO_THREAD
-
class QOnceControl
{
public:
@@ -91,6 +89,4 @@ public:
inline operator T*() { return value(); }
};
-#endif // QT_NO_THREAD
-
#endif
diff --git a/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro b/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro
index 94a0a01e94..d5c09ebc84 100644
--- a/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro
+++ b/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro
@@ -1,5 +1,13 @@
SOURCES += crashOnExit.cpp
-DESTDIR = ./
+debug_and_release {
+ CONFIG(debug, debug|release) {
+ TARGET = ../../debug/crashOnExit_helper
+ } else {
+ TARGET = ../../release/crashOnExit_helper
+ }
+} else {
+ TARGET = ../crashOnExit_helper
+}
QT = core
CONFIG -= app_bundle
CONFIG += console
diff --git a/tests/auto/corelib/thread/qthreadstorage/test/test.pro b/tests/auto/corelib/thread/qthreadstorage/test/test.pro
index d7190f7e7b..d2f21f48f0 100644
--- a/tests/auto/corelib/thread/qthreadstorage/test/test.pro
+++ b/tests/auto/corelib/thread/qthreadstorage/test/test.pro
@@ -1,9 +1,16 @@
CONFIG += testcase
-TARGET = ../tst_qthreadstorage
-CONFIG -= debug_and_release_target
+debug_and_release {
+ CONFIG(debug, debug|release) {
+ TARGET = ../../debug/tst_qthreadstorage
+ !android:!winrt: TEST_HELPER_INSTALLS = ../../debug/crashonexit_helper
+ } else {
+ TARGET = ../../release/tst_qthreadstorage
+ !android:!winrt: TEST_HELPER_INSTALLS = ../../release/crashonexit_helper
+ }
+} else {
+ TARGET = ../tst_qthreadstorage
+ !android:!winrt: TEST_HELPER_INSTALLS = ../crashonexit_helper
+}
CONFIG += console
QT = core testlib
SOURCES = ../tst_qthreadstorage.cpp
-
-!android:!winrt: TEST_HELPER_INSTALLS = ../crashonexit/crashonexit
-
diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
index 403e28b07b..ef5d3452d5 100644
--- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
@@ -48,7 +48,6 @@ class tst_QThreadStorage : public QObject
{
Q_OBJECT
private slots:
- void initTestCase();
void hasLocalData();
void localData();
void localData_const();
@@ -60,9 +59,6 @@ private slots:
void leakInDestructor();
void resetInDestructor();
void valueBased();
-
-private:
- QString m_crashOnExit;
};
class Pointer
@@ -74,22 +70,6 @@ public:
};
int Pointer::count = 0;
-void tst_QThreadStorage::initTestCase()
-{
-#if QT_CONFIG(process)
- const QString crashOnExitDir = QFINDTESTDATA("crashonexit");
- QVERIFY2(!crashOnExitDir.isEmpty(),
- qPrintable(QString::fromLatin1("Could not find 'crashonexit' starting from '%1'")
- .arg(QDir::toNativeSeparators(QDir::currentPath()))));
- m_crashOnExit = crashOnExitDir + QStringLiteral("/crashonexit");
-#ifdef Q_OS_WIN
- m_crashOnExit += QStringLiteral(".exe");
-#endif
- QVERIFY2(QFileInfo(m_crashOnExit).isExecutable(),
- qPrintable(QDir::toNativeSeparators(m_crashOnExit) + QStringLiteral(" does not exist or is not executable.")));
-#endif
-}
-
void tst_QThreadStorage::hasLocalData()
{
QThreadStorage<Pointer *> pointers;
@@ -329,7 +309,7 @@ void tst_QThreadStorage::crashOnExit()
QSKIP("No qprocess support", SkipAll);
#else
QString errorMessage;
- QVERIFY2(runCrashOnExit(m_crashOnExit, &errorMessage),
+ QVERIFY2(runCrashOnExit("crashOnExit_helper", &errorMessage),
qPrintable(errorMessage));
#endif
}
diff --git a/tests/auto/corelib/thread/thread.pro b/tests/auto/corelib/thread/thread.pro
index d3c669859b..90b8d6806e 100644
--- a/tests/auto/corelib/thread/thread.pro
+++ b/tests/auto/corelib/thread/thread.pro
@@ -1,22 +1,25 @@
TEMPLATE=subdirs
-SUBDIRS=\
- qatomicint \
- qatomicinteger \
- qatomicpointer \
- qresultstore \
- qfuture \
- qfuturesynchronizer \
- qmutex \
- qmutexlocker \
- qreadlocker \
- qreadwritelock \
- qsemaphore \
- qthread \
- qthreadonce \
- qthreadpool \
- qthreadstorage \
- qwaitcondition \
- qwritelocker
+
+qtConfig(thread) {
+ SUBDIRS=\
+ qatomicint \
+ qatomicinteger \
+ qatomicpointer \
+ qresultstore \
+ qfuture \
+ qfuturesynchronizer \
+ qmutex \
+ qmutexlocker \
+ qreadlocker \
+ qreadwritelock \
+ qsemaphore \
+ qthread \
+ qthreadonce \
+ qthreadpool \
+ qthreadstorage \
+ qwaitcondition \
+ qwritelocker
+}
qtHaveModule(concurrent) {
SUBDIRS += \