From cab9bc8fba8f48be0e469a7097cd4914a4f617d9 Mon Sep 17 00:00:00 2001 From: Glen Mabey Date: Thu, 4 May 2017 01:33:12 +0000 Subject: Eliminate ambiguous casts involving qfloat16 The operator double() and operator long double() members of qfloat16 are causing cast ambiguities. This removes them, leaving only operator float() which seems to be adequate. Also, additional arithmetic operator tests were added which without this removal fail to compile. Change-Id: Id52a101b318fd754969b3de13c1e528d0aac2387 Reviewed-by: Thiago Macieira --- .../auto/corelib/global/qfloat16/tst_qfloat16.cpp | 59 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp index 3ec863302e..9bd87e3f21 100644 --- a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp +++ b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp @@ -44,6 +44,8 @@ private slots: void float_cast(); void float_cast_data(); void promotionTests(); + void arithOps_data(); + void arithOps(); }; void tst_qfloat16::fuzzyCompare_data() @@ -198,8 +200,12 @@ void tst_qfloat16::float_cast() { QFETCH(float, val); - QVERIFY(qFuzzyCompare(float(qfloat16(val)),val)); - QVERIFY(qFuzzyCompare(float(qfloat16(-val)),-val)); + QVERIFY(qFuzzyCompare((float)(qfloat16(val)),val)); + QVERIFY(qFuzzyCompare((float)(qfloat16(-val)),-val)); + QVERIFY(qFuzzyCompare((double)(qfloat16(val)),(double)(val))); + QVERIFY(qFuzzyCompare((double)(qfloat16(-val)),(double)(-val))); + //QVERIFY(qFuzzyCompare((long double)(qfloat16(val)),(long double)(val))); + //QVERIFY(qFuzzyCompare((long double)(qfloat16(-val)),(long double)(-val))); } void tst_qfloat16::promotionTests() @@ -248,6 +254,55 @@ void tst_qfloat16::promotionTests() QCOMPARE(sizeof(double),sizeof(qfloat16(1.f)-1)); QCOMPARE(sizeof(double),sizeof(qfloat16(1.f)*1)); QCOMPARE(sizeof(double),sizeof(qfloat16(1.f)/1)); + + QCOMPARE(QString::number(1.f),QString::number(qfloat16(1.f))); +} + +void tst_qfloat16::arithOps_data() +{ + QTest::addColumn("val1"); + QTest::addColumn("val2"); + + QTest::newRow("zero") << 0.0f << 2.0f; + QTest::newRow("one") << 1.0f << 4.0f; + QTest::newRow("ten") << 10.0f << 20.0f; +} + +void tst_qfloat16::arithOps() +{ + QFETCH(float, val1); + QFETCH(float, val2); + + QVERIFY(qFuzzyCompare(float(qfloat16(val1) + qfloat16(val2)), val1 + val2)); + QVERIFY(qFuzzyCompare(float(qfloat16(val1) - qfloat16(val2)), val1 - val2)); + QVERIFY(qFuzzyCompare(float(qfloat16(val1) * qfloat16(val2)), val1 * val2)); + QVERIFY(qFuzzyCompare(float(qfloat16(val1) / qfloat16(val2)), val1 / val2)); + + QVERIFY(qFuzzyCompare(qfloat16(val1) + val2, val1 + val2)); + QVERIFY(qFuzzyCompare(qfloat16(val1) - val2, val1 - val2)); + QVERIFY(qFuzzyCompare(qfloat16(val1) * val2, val1 * val2)); + QVERIFY(qFuzzyCompare(qfloat16(val1) / val2, val1 / val2)); + + QVERIFY(qFuzzyCompare(val1 + qfloat16(val2), val1 + val2)); + QVERIFY(qFuzzyCompare(val1 - qfloat16(val2), val1 - val2)); + QVERIFY(qFuzzyCompare(val1 * qfloat16(val2), val1 * val2)); + QVERIFY(qFuzzyCompare(val1 / qfloat16(val2), val1 / val2)); + + float r1 = 0.f; + r1 += qfloat16(val2); + QVERIFY(qFuzzyCompare(r1,val2)); + + float r2 = 0.f; + r2 -= qfloat16(val2); + QVERIFY(qFuzzyCompare(r2,-val2)); + + float r3 = 1.f; + r3 *= qfloat16(val2); + QVERIFY(qFuzzyCompare(r3,val2)); + + float r4 = 1.f; + r4 /= qfloat16(val2); + QVERIFY(qFuzzyCompare(r4,1.f/val2)); } QTEST_APPLESS_MAIN(tst_qfloat16) -- cgit v1.2.3 From 74d79fcf1a6d85f5949bfaf2defa9403494124a9 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 23 Mar 2017 13:23:05 +0100 Subject: QMimeDatabase: update freedesktop.org.xml to shared-mime-info 1.8 ... and update the unittest accordingly. Compared to the 1.8 release there is one change in freedesktop.org.xml, the magic for application/x-java-keystore was changed from host32 to big32, as done upstream, see https://bugs.freedesktop.org/show_bug.cgi?id=99328 Task-number: QTBUG-60608 Change-Id: I47de71c9396cfc3eabc884d5679c73a3e4850a17 Reviewed-by: Thiago Macieira --- .../mimetypes/qmimedatabase/tst_qmimedatabase.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp index 280e3f77a4..8a46bc1c55 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp @@ -72,12 +72,12 @@ static inline QString testSuiteWarning() str << "\nCannot find the shared-mime-info test suite\nstarting from: " << QDir::toNativeSeparators(QDir::currentPath()) << "\n" "cd " << QDir::toNativeSeparators(QStringLiteral("tests/auto/corelib/mimetypes/qmimedatabase")) << "\n" - "wget http://cgit.freedesktop.org/xdg/shared-mime-info/snapshot/Release-1-0.zip\n" - "unzip Release-1-0.zip\n"; + "wget http://cgit.freedesktop.org/xdg/shared-mime-info/snapshot/Release-1-8.zip\n" + "unzip Release-1-8.zip\n"; #ifdef Q_OS_WIN - str << "mkdir testfiles\nxcopy /s Release-1-0\\tests testfiles\n"; + str << "mkdir testfiles\nxcopy /s Release-1-8 s-m-i\n"; #else - str << "ln -s Release-1-0/tests testfiles\n"; + str << "ln -s Release-1-8 s-m-i\n"; #endif return result; } @@ -154,7 +154,7 @@ void tst_QMimeDatabase::initTestCase() QVERIFY2(copyResourceFile(xmlFileName, xmlTargetFileName, &errorMessage), qPrintable(errorMessage)); #endif - m_testSuite = QFINDTESTDATA("testfiles"); + m_testSuite = QFINDTESTDATA("s-m-i/tests"); if (m_testSuite.isEmpty()) qWarning("%s", qPrintable(testSuiteWarning())); @@ -438,7 +438,7 @@ void tst_QMimeDatabase::icons() QMimeType directory = db.mimeTypeForFile(QString::fromLatin1("/")); QCOMPARE(directory.name(), QString::fromLatin1("inode/directory")); QCOMPARE(directory.iconName(), QString::fromLatin1("inode-directory")); - QCOMPARE(directory.genericIconName(), QString::fromLatin1("inode-x-generic")); + QCOMPARE(directory.genericIconName(), QString::fromLatin1("folder")); QMimeType pub = db.mimeTypeForFile(QString::fromLatin1("foo.epub"), QMimeDatabase::MatchExtension); QCOMPARE(pub.name(), QString::fromLatin1("application/epub+zip")); @@ -510,7 +510,7 @@ void tst_QMimeDatabase::mimeTypeForFileWithContent() mime = db.mimeTypeForFile(txtTempFileName); QCOMPARE(mime.name(), QString::fromLatin1("text/plain")); mime = db.mimeTypeForFile(txtTempFileName, QMimeDatabase::MatchContent); - QCOMPARE(mime.name(), QString::fromLatin1("application/smil")); + QCOMPARE(mime.name(), QString::fromLatin1("application/smil+xml")); } // Test what happens with an incorrect path @@ -607,7 +607,7 @@ void tst_QMimeDatabase::allMimeTypes() QVERIFY(!lst.isEmpty()); // Hardcoding this is the only way to check both providers find the same number of mimetypes. - QCOMPARE(lst.count(), 661); + QCOMPARE(lst.count(), 749); foreach (const QMimeType &mime, lst) { const QString name = mime.name(); @@ -802,7 +802,7 @@ void tst_QMimeDatabase::findByData() // Expected to fail QVERIFY2(resultMimeTypeName != mimeTypeName, qPrintable(resultMimeTypeName)); } else { - QCOMPARE(resultMimeTypeName, mimeTypeName); + QCOMPARE(resultMimeTypeName.toLower(), mimeTypeName.toLower()); } QFileInfo info(filePath); @@ -833,7 +833,7 @@ void tst_QMimeDatabase::findByFile() // Expected to fail QVERIFY2(resultMimeTypeName != mimeTypeName, qPrintable(resultMimeTypeName)); } else { - QCOMPARE(resultMimeTypeName, mimeTypeName); + QCOMPARE(resultMimeTypeName.toLower(), mimeTypeName.toLower()); } // Test QFileInfo overload -- cgit v1.2.3 From 38bbd8fbaced1408b9e39b156503c470e0472150 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 9 May 2017 14:16:00 +0200 Subject: Add some missing breaks in switch statements Found by GCC 7. Change-Id: I90267617a038558e5b5213c598a949baf8d4d9be Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Edward Welbourne --- tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index b6106e8c9e..f9ddd59aaa 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -1721,10 +1721,10 @@ void tst_QMetaType::metaObject() } #define METATYPE_ID_FUNCTION(Type, MetaTypeId, Name) \ - case ::qMetaTypeId< Name >(): metaType = MetaTypeIdStruct::Value; + case ::qMetaTypeId< Name >(): metaType = MetaTypeIdStruct::Value; break; #define REGISTER_METATYPE_FUNCTION(Type, MetaTypeId, Name) \ - case qRegisterMetaType< Name >(): metaType = RegisterMetaTypeStruct::Value; + case qRegisterMetaType< Name >(): metaType = RegisterMetaTypeStruct::Value; break; template struct MetaTypeIdStruct -- cgit v1.2.3 From 7e7bc031e905a6c8181b095cdb166f183aace9ec Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Mon, 8 May 2017 12:08:13 +0200 Subject: winrt: Fix tst_qcoreapplication On winrt, the default application version is determined by its manifest file. The template's default version is 1.0.0.0. Additionally addRemoveLibPaths should not fail if libraryPaths only contains currentDir. Change-Id: Ifdd517f1bfe2fdf641f3d728ebe1fa144df1a8ca Reviewed-by: Maurice Kalinowski --- .../kernel/qcoreapplication/tst_qcoreapplication.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp index 31e76c4407..22f0d8ecaa 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp +++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp @@ -155,7 +155,9 @@ void tst_QCoreApplication::qAppName() void tst_QCoreApplication::qAppVersion() { -#if defined(Q_OS_WIN) +#if defined(Q_OS_WINRT) + const char appVersion[] = "1.0.0.0"; +#elif defined(Q_OS_WIN) const char appVersion[] = "1.2.3.4"; #elif defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) const char appVersion[] = "1.2.3"; @@ -946,9 +948,12 @@ void tst_QCoreApplication::addRemoveLibPaths() char *argv[] = { const_cast(QTest::currentAppName()) }; TestApplication app(argc, argv); - // Check that modifications stay alive across the creation of an application. - QVERIFY(QCoreApplication::libraryPaths().contains(currentDir)); - QVERIFY(!QCoreApplication::libraryPaths().contains(paths[0])); + // If libraryPaths only contains currentDir, neither will be in libraryPaths now. + if (paths.length() != 1 && currentDir != paths[0]) { + // Check that modifications stay alive across the creation of an application. + QVERIFY(QCoreApplication::libraryPaths().contains(currentDir)); + QVERIFY(!QCoreApplication::libraryPaths().contains(paths[0])); + } QStringList replace; replace << currentDir << paths[0]; -- cgit v1.2.3 From 5c38bbf9bae3f3390cce786c438b397a3a80d213 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Mon, 8 May 2017 15:09:28 +0200 Subject: winrt: Fix tst_QSocketNotifier::asyncMultipleDatagram Change-Id: I90de7487b0ddcd5655434e99a05eef7f29def59b Reviewed-by: Maurice Kalinowski --- tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp index a52b80170f..e3f45df27d 100644 --- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp +++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp @@ -350,6 +350,9 @@ void tst_QSocketNotifier::async_writeDatagramSlot() void tst_QSocketNotifier::asyncMultipleDatagram() { +#ifdef Q_OS_WINRT + QSKIP("WinRT does not allow connection to localhost", SkipAll); +#else m_asyncSender = new QUdpSocket; m_asyncReceiver = new QUdpSocket; @@ -379,6 +382,7 @@ void tst_QSocketNotifier::asyncMultipleDatagram() delete m_asyncSender; delete m_asyncReceiver; + #endif // !Q_OS_WINRT } QTEST_MAIN(tst_QSocketNotifier) -- cgit v1.2.3 From cb9afb0627380165027f62b511ddbeb1154817f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 11 May 2017 12:25:17 +0200 Subject: Blacklist tst_QGraphicsScene::removeItem on OS X 10.11 in CI Known to fail now and then, most likely due to the mouse cursor moving while the test is executing. Task-number: QTBUG-60754 Change-Id: Id8f0786416d0df33f197a7a8f99b7aad1341a6be Reviewed-by: Liang Qi --- tests/auto/widgets/graphicsview/qgraphicsscene/BLACKLIST | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/auto/widgets/graphicsview/qgraphicsscene/BLACKLIST (limited to 'tests/auto') diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicsscene/BLACKLIST new file mode 100644 index 0000000000..c6f69a51a5 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/BLACKLIST @@ -0,0 +1,3 @@ +[removeItem] +# QTBUG-60754, QTest::mouseMove is not always respected, or the CI moves the cursor +osx-10.11 ci -- cgit v1.2.3 From 13de0e512992ca67844a9780a2246122dab74053 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 20 Apr 2017 09:32:06 +0200 Subject: Add test-case for intersection equality Test-case taken from QTBUG-17027 Task-number: QTBUG-17027 Change-Id: I92ceb76addc4a61d19963d89f89e1f6386d8a049 Reviewed-by: Eirik Aavitsland --- .../gui/painting/qpainterpath/tst_qpainterpath.cpp | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index 98f63984b3..c7203a1b36 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -99,6 +99,8 @@ private slots: void translate(); void lineWithinBounds(); + + void intersectionEquality(); }; void tst_QPainterPath::cleanupTestCase() @@ -1313,6 +1315,53 @@ void tst_QPainterPath::lineWithinBounds() } } +void tst_QPainterPath::intersectionEquality() +{ + // Test case from QTBUG-17027 + QPainterPath p1; + p1.moveTo(256.0000000000000000, 135.8384137532701743); + p1.lineTo(50.9999999999999715, 107.9999999999999857); + p1.lineTo(233.5425474228109123, 205.3560252921671462); + p1.lineTo(191.7771366877784373, 318.0257074407572304); + p1.lineTo(-48.2616272048215151, 229.0459803737862216); + p1.lineTo(0.0000000000000000, 98.8515898136580801); + p1.lineTo(0.0000000000000000, 0.0000000000000000); + p1.lineTo(256.0000000000000000, 0.0000000000000000); + p1.lineTo(256.0000000000000000, 135.8384137532701743); + + QPainterPath p2; + p2.moveTo(1516.2703263523442274, 306.9795200262722119); + p2.lineTo(-1296.8426224886295585, -75.0331736542986931); + p2.lineTo(-1678.8553161692004778, 2738.0797751866753060); + p2.lineTo(1134.2576326717733081, 3120.0924688672457705); + p2.lineTo(1516.2703263523442274, 306.9795200262722119); + + QPainterPath i1 = p1.intersected(p2); + QPainterPath i2 = p2.intersected(p1); + QVERIFY(i1 == i2 || i1.toReversed() == i2); + + p1 = QPainterPath(); + p1.moveTo(256.00000000, 135.83841375); + p1.lineTo(50.99999999, 107.99999999); + p1.lineTo(233.54254742, 205.35602529); + p1.lineTo(191.77713668, 318.02570744); + p1.lineTo(-48.26162720, 229.04598037); + p1.lineTo(0.00000000, 98.85158981); + p1.lineTo(0.00000000, 0.00000000); + p1.lineTo(256.00000000, 0.00000000); + p1.lineTo(256.00000000, 135.83841375); + + p2 = QPainterPath(); + p2.moveTo(1516.27032635, 306.97952002); + p2.lineTo(-1296.84262248, -75.03317365); + p2.lineTo(-1678.85531616, 2738.07977518); + p2.lineTo(1134.25763267, 3120.09246886); + p2.lineTo(1516.27032635, 306.97952002); + + i1 = p1.intersected(p2); + i2 = p2.intersected(p1); + QVERIFY(i1 == i2 || i1.toReversed() == i2); +} QTEST_APPLESS_MAIN(tst_QPainterPath) -- cgit v1.2.3 From 07fd674740b4f80c45c84ad88659f0c4889943e5 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 20 Apr 2017 10:01:05 +0200 Subject: Fix painterpath rect intersections with points on the rect QPainterPath could in certain cases where sub-path points were on the border of a rect fail to calculate intersects() correctly. The patch adds handling of such cases by looking if end points cross in or out of the rect. Other cases are already caught. Task-number: QTBUG-31551 Change-Id: I6284da8ff8646d4636702923a76362302dde5767 Reviewed-by: Eirik Aavitsland --- tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index c7203a1b36..757e4d16e4 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -101,6 +101,7 @@ private slots: void lineWithinBounds(); void intersectionEquality(); + void intersectionPointOnEdge(); }; void tst_QPainterPath::cleanupTestCase() @@ -1363,6 +1364,17 @@ void tst_QPainterPath::intersectionEquality() QVERIFY(i1 == i2 || i1.toReversed() == i2); } +void tst_QPainterPath::intersectionPointOnEdge() +{ + // From QTBUG-31551 + QPainterPath p; p.addRoundedRect(-10, 10, 40, 40, 10, 10); + QRectF r(0, 0, 100, 100); + QPainterPath rp; rp.addRect(r); + QVERIFY(!p.intersected(rp).isEmpty()); + QVERIFY(p.intersects(rp)); + QVERIFY(p.intersects(r)); +} + QTEST_APPLESS_MAIN(tst_QPainterPath) #include "tst_qpainterpath.moc" -- cgit v1.2.3 From 19296bc7b0a92690e7b96d35168a6e03ab4ccdda Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 16 May 2017 11:23:01 -0700 Subject: Add Q_FALLTHROUGH to QtDBus tests There was only one place that needed it. Change-Id: I067fcfe299b34ab6a771fffd14bf2945f1953d10 Reviewed-by: Simon Hausmann Reviewed-by: Olivier Goffart (Woboq GmbH) --- tests/auto/dbus/qdbusabstractadaptor/myobject.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/dbus/qdbusabstractadaptor/myobject.h b/tests/auto/dbus/qdbusabstractadaptor/myobject.h index 1d9b33ccd8..fe3f6f3dd2 100644 --- a/tests/auto/dbus/qdbusabstractadaptor/myobject.h +++ b/tests/auto/dbus/qdbusabstractadaptor/myobject.h @@ -242,10 +242,13 @@ public: { case 4: if4 = new Interface4(this); + Q_FALLTHROUGH(); case 3: if3 = new Interface3(this); + Q_FALLTHROUGH(); case 2: if2 = new Interface2(this); + Q_FALLTHROUGH(); case 1: if1 = new Interface1(this); } @@ -270,4 +273,4 @@ signals: void nonScriptableSignalVoid(); }; -#endif // MYOBJECT_H \ No newline at end of file +#endif // MYOBJECT_H -- cgit v1.2.3 From b8094e4b22412ba76d577b93300ee28b3302d959 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 11 May 2017 12:05:59 +0200 Subject: Stabilize tst_QSqlThread::readWriteThreading According to the test metrics this test failed 10 times in the last two days. Interestingly the log shows that usually 5.5 seconds would have let it pass. Change-Id: I38f21f35bd6624f1d3de1e1e811a4d107136a241 Reviewed-by: Simon Hausmann Reviewed-by: Andy Shaw Reviewed-by: Jesus Fernandez --- tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp index 540f317935..c21223886a 100644 --- a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp +++ b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp @@ -398,7 +398,7 @@ void tst_QSqlThread::readWriteThreading() producer.start(); consumer.start(); - QTRY_VERIFY(threadFinishedCount >= 2); + QTRY_VERIFY_WITH_TIMEOUT(threadFinishedCount >= 2, 10000); } // run with n threads in parallel. Change this constant to hammer the poor DB server even more -- cgit v1.2.3 From c4addd221e97f3b17094d514859f4ea518979c20 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 19 May 2017 10:37:15 +0200 Subject: tst_QTimer::timeout(): Use QTRY_VERIFY_WITH_TIMEOUT The test has been observed to be flaky on Windows. Introduce QTRY_VERIFY_WITH_TIMEOUT for diagnostics. Change-Id: I72abdd2e5544f8f35199876486ab15151f60e5f2 Reviewed-by: Andy Shaw Reviewed-by: Marc Mutz --- tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp index 3c2989831e..d2035a088e 100644 --- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp +++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp @@ -144,12 +144,10 @@ void tst_QTimer::timeout() QCOMPARE(helper.count, 0); - QTest::qWait(TIMEOUT_TIMEOUT); - QVERIFY(helper.count > 0); + QTRY_VERIFY_WITH_TIMEOUT(helper.count > 0, TIMEOUT_TIMEOUT); int oldCount = helper.count; - QTest::qWait(TIMEOUT_TIMEOUT); - QVERIFY(helper.count > oldCount); + QTRY_VERIFY_WITH_TIMEOUT(helper.count > oldCount, TIMEOUT_TIMEOUT); } void tst_QTimer::remainingTime() -- cgit v1.2.3 From 1c13d130c631ddaadd727ae929e50234a433e564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Tue, 23 May 2017 15:10:09 +0300 Subject: Extend blacklisting of qeventdispatcher to cover macOS They have been blacklisted on windows previously and now fail on macOS 10.12 as well. Task-number: QTBUG-60993 Change-Id: Ib7a3acfc7f2285c0a587d4abd88a4a218391d623 Reviewed-by: Lars Knoll --- tests/auto/corelib/kernel/qeventdispatcher/BLACKLIST | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qeventdispatcher/BLACKLIST b/tests/auto/corelib/kernel/qeventdispatcher/BLACKLIST index 00be65751b..402d87b82f 100644 --- a/tests/auto/corelib/kernel/qeventdispatcher/BLACKLIST +++ b/tests/auto/corelib/kernel/qeventdispatcher/BLACKLIST @@ -1,4 +1,6 @@ [sendPostedEvents] windows +osx [registerTimer] windows +osx -- cgit v1.2.3 From b09c4cc48e98e670c899545c8e7ebeaa5279bb96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Tue, 23 May 2017 13:42:06 +0300 Subject: Blacklist tst_QEventLoop:testQuitLock as it is flaky on macOS Task-number: QTBUG-60992 Change-Id: I9474fd67b6429f01ddbbc9ae17af4ae8635e53df Reviewed-by: Lars Knoll --- tests/auto/corelib/kernel/qeventloop/BLACKLIST | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qeventloop/BLACKLIST b/tests/auto/corelib/kernel/qeventloop/BLACKLIST index 6ea6314b0a..9f837aa197 100644 --- a/tests/auto/corelib/kernel/qeventloop/BLACKLIST +++ b/tests/auto/corelib/kernel/qeventloop/BLACKLIST @@ -1,2 +1,3 @@ [testQuitLock] windows +osx -- cgit v1.2.3