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/qmutex/tst_qmutex.cpp2
-rw-r--r--tests/auto/corelib/thread/qsemaphore/BLACKLIST5
-rw-r--r--tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp6
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/test/test.pro2
4 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
index bf778e9fd1..e6c3a0cfd7 100644
--- a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
+++ b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
@@ -143,7 +143,7 @@ void tst_QMutex::convertToMilliseconds_data()
auto add = [](TimeUnit unit, double d, long long i, qint64 expected) {
const QScopedArrayPointer<char> enumName(QTest::toString(unit));
- QTest::newRow(qPrintable(QString::asprintf("%s:%f:%lld", enumName.data(), d, i)))
+ QTest::addRow("%s:%f:%lld", enumName.data(), d, i)
<< unit << d << qint64(i) << expected;
};
diff --git a/tests/auto/corelib/thread/qsemaphore/BLACKLIST b/tests/auto/corelib/thread/qsemaphore/BLACKLIST
index 9f6f6e3ba6..22e30d0fd6 100644
--- a/tests/auto/corelib/thread/qsemaphore/BLACKLIST
+++ b/tests/auto/corelib/thread/qsemaphore/BLACKLIST
@@ -1,3 +1,2 @@
-# Times out randomly on linux, windows, osx
-[tryAcquireWithTimeout]
-*
+[tryAcquireWithTimeout:0.2s]
+windows
diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
index e984618bdb..2970b2e118 100644
--- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
+++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
@@ -202,8 +202,8 @@ void tst_QSemaphore::tryAcquireWithTimeout_data()
{
QTest::addColumn<int>("timeout");
- QTest::newRow("1s") << 1000;
- QTest::newRow("10s") << 10000;
+ QTest::newRow("0.2s") << 200;
+ QTest::newRow("2s") << 2000;
}
void tst_QSemaphore::tryAcquireWithTimeout()
@@ -212,7 +212,7 @@ void tst_QSemaphore::tryAcquireWithTimeout()
// timers are not guaranteed to be accurate down to the last millisecond,
// so we permit the elapsed times to be up to this far from the expected value.
- int fuzz = 50;
+ int fuzz = 50 + (timeout / 20);
QSemaphore semaphore;
QElapsedTimer time;
diff --git a/tests/auto/corelib/thread/qthreadstorage/test/test.pro b/tests/auto/corelib/thread/qthreadstorage/test/test.pro
index b9d661a9af..1a1fede186 100644
--- a/tests/auto/corelib/thread/qthreadstorage/test/test.pro
+++ b/tests/auto/corelib/thread/qthreadstorage/test/test.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = ../tst_qthreadstorage
-CONFIG -= app_bundle debug_and_release_target
+CONFIG -= debug_and_release_target
CONFIG += console
QT = core testlib
SOURCES = ../tst_qthreadstorage.cpp