diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-03 01:01:00 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-04-03 15:12:48 +0200 |
commit | 7672e09770b9dffd56e81cdc531dba0b309425c5 (patch) | |
tree | 343cbfc1ca2de9eb5638fd4932263101341eb720 /tests | |
parent | ab4c22d47d196d5eb28fc16cd7262c77bcb6875f (diff) | |
parent | 86d9e36b06b0347e1b7bd1b7f90618eab515dfaf (diff) |
Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"
Diffstat (limited to 'tests')
51 files changed, 212 insertions, 191 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 8a5eff3fac..fa448a9593 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -93,7 +93,11 @@ private slots: void quitOnLastWindowClosed(); void closeAllWindows(); void testDeleteLater(); - void testDeleteLaterProcessEvents(); + void testDeleteLaterProcessEvents1(); + void testDeleteLaterProcessEvents2(); + void testDeleteLaterProcessEvents3(); + void testDeleteLaterProcessEvents4(); + void testDeleteLaterProcessEvents5(); #if QT_CONFIG(library) void libraryPaths(); @@ -1333,10 +1337,8 @@ public slots: } }; -void tst_QApplication::testDeleteLaterProcessEvents() +void tst_QApplication::testDeleteLaterProcessEvents1() { - int argc = 0; - // Calling processEvents() with no event dispatcher does nothing. QObject *object = new QObject; QPointer<QObject> p(object); @@ -1344,75 +1346,85 @@ void tst_QApplication::testDeleteLaterProcessEvents() QApplication::processEvents(); QVERIFY(p); delete object; +} - { - QApplication app(argc, nullptr); - // If you call processEvents() with an event dispatcher present, but - // outside any event loops, deferred deletes are not processed unless - // sendPostedEvents(0, DeferredDelete) is called. - object = new QObject; - p = object; - object->deleteLater(); - QCoreApplication::processEvents(); - QVERIFY(p); - QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete); - QVERIFY(!p); - - // If you call deleteLater() on an object when there is no parent - // event loop, and then enter an event loop, the object will get - // deleted. - object = new QObject; - p = object; - object->deleteLater(); - QEventLoop loop; - QTimer::singleShot(1000, &loop, &QEventLoop::quit); - loop.exec(); - QVERIFY(!p); - } - { - // When an object is in an event loop, then calls deleteLater() and enters - // an event loop recursively, it should not die until the parent event - // loop continues. - QApplication app(argc, nullptr); - QEventLoop loop; - EventLoopNester *nester = new EventLoopNester; - p = nester; - QTimer::singleShot(3000, &loop, &QEventLoop::quit); - QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndEnterLoop); - - loop.exec(); - QVERIFY(!p); - } - - { - // When the event loop that calls deleteLater() is exited - // immediately, the object should die when returning to the - // parent event loop - QApplication app(argc, nullptr); - QEventLoop loop; - EventLoopNester *nester = new EventLoopNester; - p = nester; - QTimer::singleShot(3000, &loop, &QEventLoop::quit); - QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndExitLoop); +void tst_QApplication::testDeleteLaterProcessEvents2() +{ + int argc = 0; + QApplication app(argc, nullptr); + // If you call processEvents() with an event dispatcher present, but + // outside any event loops, deferred deletes are not processed unless + // sendPostedEvents(0, DeferredDelete) is called. + auto object = new QObject; + QPointer<QObject> p(object); + object->deleteLater(); + QCoreApplication::processEvents(); + QVERIFY(p); + QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete); + QVERIFY(!p); + + // If you call deleteLater() on an object when there is no parent + // event loop, and then enter an event loop, the object will get + // deleted. + QEventLoop loop; + object = new QObject; + connect(object, &QObject::destroyed, &loop, &QEventLoop::quit); + p = object; + object->deleteLater(); + QTimer::singleShot(1000, &loop, &QEventLoop::quit); + loop.exec(); + QVERIFY(!p); +} - loop.exec(); - QVERIFY(!p); - } +void tst_QApplication::testDeleteLaterProcessEvents3() +{ + int argc = 0; + // When an object is in an event loop, then calls deleteLater() and enters + // an event loop recursively, it should not die until the parent event + // loop continues. + QApplication app(argc, nullptr); + QEventLoop loop; + EventLoopNester *nester = new EventLoopNester; + QPointer<QObject> p(nester); + QTimer::singleShot(3000, &loop, &QEventLoop::quit); + QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndEnterLoop); + + loop.exec(); + QVERIFY(!p); +} - { - // when the event loop that calls deleteLater() also calls - // processEvents() immediately afterwards, the object should - // not die until the parent loop continues - QApplication app(argc, nullptr); - QEventLoop loop; - EventLoopNester *nester = new EventLoopNester(); - p = nester; - QTimer::singleShot(3000, &loop, &QEventLoop::quit); - QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndProcessEvents); +void tst_QApplication::testDeleteLaterProcessEvents4() +{ + int argc = 0; + // When the event loop that calls deleteLater() is exited + // immediately, the object should die when returning to the + // parent event loop + QApplication app(argc, nullptr); + QEventLoop loop; + EventLoopNester *nester = new EventLoopNester; + QPointer<QObject> p(nester); + QTimer::singleShot(3000, &loop, &QEventLoop::quit); + QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndExitLoop); + + loop.exec(); + QVERIFY(!p); +} - loop.exec(); - QVERIFY(!p); - } +void tst_QApplication::testDeleteLaterProcessEvents5() +{ + // when the event loop that calls deleteLater() also calls + // processEvents() immediately afterwards, the object should + // not die until the parent loop continues + int argc = 0; + QApplication app(argc, nullptr); + QEventLoop loop; + EventLoopNester *nester = new EventLoopNester(); + QPointer<QObject> p(nester); + QTimer::singleShot(3000, &loop, &QEventLoop::quit); + QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndProcessEvents); + + loop.exec(); + QVERIFY(!p); } /* diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro b/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro index 5ee577c256..7d29c6bfdd 100644 --- a/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro +++ b/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro @@ -1,6 +1,7 @@ -TARGET = tst_bench_qtextcodec +CONFIG += benchmark QT = core testlib + +TARGET = tst_bench_qtextcodec SOURCES += main.cpp TESTDATA = utf-8.txt - diff --git a/tests/benchmarks/corelib/io/qdir/10000/10000.pro b/tests/benchmarks/corelib/io/qdir/10000/10000.pro index 2e83dad071..52325f314f 100644 --- a/tests/benchmarks/corelib/io/qdir/10000/10000.pro +++ b/tests/benchmarks/corelib/io/qdir/10000/10000.pro @@ -1,6 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qdir_10000 +CONFIG += benchmark +QT = core testlib +TARGET = tst_bench_qdir_10000 SOURCES += bench_qdir_10000.cpp - -QT = core testlib diff --git a/tests/benchmarks/corelib/io/qdir/tree/tree.pro b/tests/benchmarks/corelib/io/qdir/tree/tree.pro index 2998a13b57..90ddd23345 100644 --- a/tests/benchmarks/corelib/io/qdir/tree/tree.pro +++ b/tests/benchmarks/corelib/io/qdir/tree/tree.pro @@ -1,7 +1,7 @@ TEMPLATE = app -TARGET = bench_qdir_tree +CONFIG += benchmark +QT = core testlib +TARGET = bench_qdir_tree SOURCES += bench_qdir_tree.cpp RESOURCES += bench_qdir_tree.qrc - -QT = core testlib diff --git a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro index 061b22a5d1..b332cda84b 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro +++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro @@ -1,8 +1,6 @@ -TARGET = tst_bench_qdiriterator - +CONFIG += benchmark QT = core testlib -CONFIG += release - +TARGET = tst_bench_qdiriterator SOURCES += main.cpp qfilesystemiterator.cpp HEADERS += qfilesystemiterator.h diff --git a/tests/benchmarks/corelib/io/qfile/qfile.pro b/tests/benchmarks/corelib/io/qfile/qfile.pro index 5f7b9af73f..a882c4ea61 100644 --- a/tests/benchmarks/corelib/io/qfile/qfile.pro +++ b/tests/benchmarks/corelib/io/qfile/qfile.pro @@ -1,6 +1,7 @@ TEMPLATE = app -TARGET = tst_bench_qfile +CONFIG += benchmark QT = core core-private testlib win32: DEFINES+= _CRT_SECURE_NO_WARNINGS +TARGET = tst_bench_qfile SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro index 42e8708b02..9c97bfc84a 100644 --- a/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro +++ b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro @@ -1,9 +1,7 @@ TEMPLATE = app -TARGET = tst_bench_qfileinfo - +CONFIG += benchmark QT -= gui QT += core-private testlib -CONFIG += release - +TARGET = tst_bench_qfileinfo SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro index 7937436e13..febe6e87f9 100644 --- a/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro +++ b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro @@ -1,8 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qiodevice - +CONFIG += benchmark QT = core testlib -CONFIG += release - +TARGET = tst_bench_qiodevice SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qprocess/test/test.pro b/tests/benchmarks/corelib/io/qprocess/test/test.pro index b665525b17..e7e8e01aef 100644 --- a/tests/benchmarks/corelib/io/qprocess/test/test.pro +++ b/tests/benchmarks/corelib/io/qprocess/test/test.pro @@ -1,4 +1,5 @@ +CONFIG += benchmark +QT = core core-private testlib + TARGET = ../tst_bench_qprocess SOURCES += ../tst_bench_qprocess.cpp - -QT = core core-private testlib diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro index a0230e1cb8..1f56ad6ee6 100644 --- a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro +++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro @@ -1,5 +1,7 @@ -SOURCES = main.cpp +CONFIG += benchmark CONFIG -= qt CONFIG += cmdline winrt: QMAKE_LFLAGS += /ENTRY:mainCRTStartup + +SOURCES = main.cpp DESTDIR = ./ diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro index 758930c139..b6064e1f91 100644 --- a/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro +++ b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro @@ -1,8 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qtemporaryfile - +CONFIG += benchmark QT = core testlib -CONFIG += release - +TARGET = tst_bench_qtemporaryfile SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro b/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro index e8170319f2..fb45d05bc9 100644 --- a/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro +++ b/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro @@ -1,8 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qtextstream - +CONFIG += benchmark QT = core testlib -CONFIG += release - +TARGET = tst_bench_qtextstream SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qurl/qurl.pro b/tests/benchmarks/corelib/io/qurl/qurl.pro index 52f7bdc8b6..0e10e32a22 100644 --- a/tests/benchmarks/corelib/io/qurl/qurl.pro +++ b/tests/benchmarks/corelib/io/qurl/qurl.pro @@ -1,6 +1,7 @@ TEMPLATE = app -TARGET = tst_qurl +CONFIG += benchmark QT = core testlib win32: DEFINES+= _CRT_SECURE_NO_WARNINGS +TARGET = tst_qurl SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/json/json.pro b/tests/benchmarks/corelib/json/json.pro index 004f4b123e..8f9e515cb9 100644 --- a/tests/benchmarks/corelib/json/json.pro +++ b/tests/benchmarks/corelib/json/json.pro @@ -1,7 +1,8 @@ -TARGET = tst_bench_qtbinaryjson QT = core testlib +CONFIG += benchmark CONFIG -= app_bundle +TARGET = tst_bench_qtbinaryjson SOURCES += tst_bench_qtbinaryjson.cpp TESTDATA = numbers.json test.json diff --git a/tests/benchmarks/corelib/kernel/events/events.pro b/tests/benchmarks/corelib/kernel/events/events.pro index 798a880e5b..1381bb001e 100644 --- a/tests/benchmarks/corelib/kernel/events/events.pro +++ b/tests/benchmarks/corelib/kernel/events/events.pro @@ -1,6 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_events - +CONFIG += benchmark QT = core testlib +TARGET = tst_bench_events SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro index 8bf8487a5f..5572f06924 100644 --- a/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro +++ b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro @@ -1,6 +1,6 @@ +TEMPLATE = app +CONFIG += benchmark QT = core testlib -TEMPLATE = app TARGET = tst_bench_qcoreapplication - SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro b/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro index 47d2acb9b1..0d595ed4da 100644 --- a/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro +++ b/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro @@ -1,5 +1,6 @@ TEMPLATE = app +CONFIG += benchmark QT += widgets testlib -TARGET = tst_bench_qmetaobject +TARGET = tst_bench_qmetaobject SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro index 83d0708b60..ffd36ad202 100644 --- a/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro +++ b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro @@ -1,6 +1,6 @@ -QT = core testlib TEMPLATE = app -TARGET = tst_bench_qmetatype +CONFIG += benchmark +QT = core testlib +TARGET = tst_bench_qmetatype SOURCES += tst_qmetatype.cpp - diff --git a/tests/benchmarks/corelib/kernel/qobject/qobject.pro b/tests/benchmarks/corelib/kernel/qobject/qobject.pro index e611eff0a2..eb1d8a2daa 100644 --- a/tests/benchmarks/corelib/kernel/qobject/qobject.pro +++ b/tests/benchmarks/corelib/kernel/qobject/qobject.pro @@ -1,7 +1,7 @@ +TEMPLATE = app +CONFIG += benchmark QT += widgets testlib -TEMPLATE = app TARGET = tst_bench_qobject - HEADERS += object.h SOURCES += main.cpp object.cpp diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro index e127ba1934..3d4e48e76c 100644 --- a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro +++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro @@ -1,10 +1,7 @@ TEMPLATE = app -TARGET = qtimer_vs_qmetaobject -INCLUDEPATH += . - -CONFIG += release -#CONFIG += debug - +CONFIG += benchmark +QT = core testlib +INCLUDEPATH += . +TARGET = qtimer_vs_qmetaobject SOURCES += tst_qtimer_vs_qmetaobject.cpp -QT = core testlib diff --git a/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro index 8a8e9f25d3..2616ae78ea 100644 --- a/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro +++ b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro @@ -1,9 +1,6 @@ -TARGET = tst_bench_qvariant +CONFIG += benchmark QT += testlib !qtHaveModule(gui): QT -= gui -CONFIG += release -#CONFIG += debug - - +TARGET = tst_bench_qvariant SOURCES += tst_qvariant.cpp diff --git a/tests/benchmarks/corelib/mimetypes/qmimedatabase/qmimedatabase.pro b/tests/benchmarks/corelib/mimetypes/qmimedatabase/qmimedatabase.pro index fe55b98e54..3d218554d3 100644 --- a/tests/benchmarks/corelib/mimetypes/qmimedatabase/qmimedatabase.pro +++ b/tests/benchmarks/corelib/mimetypes/qmimedatabase/qmimedatabase.pro @@ -1,5 +1,5 @@ +CONFIG += benchmark QT = core testlib TARGET = tst_bench_qmimedatabase SOURCES = main.cpp - diff --git a/tests/benchmarks/corelib/plugin/quuid/quuid.pro b/tests/benchmarks/corelib/plugin/quuid/quuid.pro index 8f88bb85b4..5179c0cc40 100644 --- a/tests/benchmarks/corelib/plugin/quuid/quuid.pro +++ b/tests/benchmarks/corelib/plugin/quuid/quuid.pro @@ -1,5 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_quuid +CONFIG += benchmark +QT = core testlib +TARGET = tst_bench_quuid SOURCES += tst_quuid.cpp -QT = core testlib diff --git a/tests/benchmarks/corelib/text/qbytearray/qbytearray.pro b/tests/benchmarks/corelib/text/qbytearray/qbytearray.pro index cf28b0247f..25af9512d4 100644 --- a/tests/benchmarks/corelib/text/qbytearray/qbytearray.pro +++ b/tests/benchmarks/corelib/text/qbytearray/qbytearray.pro @@ -1,7 +1,7 @@ TEMPLATE = app -TARGET = tst_bench_qbytearray - +CONFIG += benchmark QT = core testlib -TESTDATA += main.cpp +TARGET = tst_bench_qbytearray SOURCES += main.cpp +TESTDATA += main.cpp diff --git a/tests/benchmarks/corelib/text/qchar/qchar.pro b/tests/benchmarks/corelib/text/qchar/qchar.pro index 80a9861f48..902acbb831 100644 --- a/tests/benchmarks/corelib/text/qchar/qchar.pro +++ b/tests/benchmarks/corelib/text/qchar/qchar.pro @@ -1,3 +1,5 @@ -TARGET = tst_bench_qchar +CONFIG += benchmark QT = core testlib + +TARGET = tst_bench_qchar SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/text/qlocale/qlocale.pro b/tests/benchmarks/corelib/text/qlocale/qlocale.pro index e56bbe0341..a39a20a677 100644 --- a/tests/benchmarks/corelib/text/qlocale/qlocale.pro +++ b/tests/benchmarks/corelib/text/qlocale/qlocale.pro @@ -1,4 +1,5 @@ -TARGET = tst_bench_qlocale +CONFIG += benchmark QT = core testlib +TARGET = tst_bench_qlocale SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/text/qregexp/qregexp.pro b/tests/benchmarks/corelib/text/qregexp/qregexp.pro index f64ae781a2..c04c13060b 100644 --- a/tests/benchmarks/corelib/text/qregexp/qregexp.pro +++ b/tests/benchmarks/corelib/text/qregexp/qregexp.pro @@ -1,8 +1,9 @@ TEMPLATE = app -TARGET = tst_bench_qregexp +CONFIG += benchmark +CONFIG += exceptions QT = core testlib -CONFIG += release exceptions +TARGET = tst_bench_qregexp SOURCES += main.cpp RESOURCES += qregexp.qrc @@ -17,4 +18,3 @@ qtHaveModule(script):!pcre { LIBS += -lboost_regex } } - diff --git a/tests/benchmarks/corelib/text/qstring/qstring.pro b/tests/benchmarks/corelib/text/qstring/qstring.pro index 9f5e34b915..e25431b983 100644 --- a/tests/benchmarks/corelib/text/qstring/qstring.pro +++ b/tests/benchmarks/corelib/text/qstring/qstring.pro @@ -1,5 +1,6 @@ -TARGET = tst_bench_qstring +CONFIG += benchmark QT -= gui QT += core testlib -SOURCES += main.cpp +TARGET = tst_bench_qstring +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/text/qstringbuilder/qstringbuilder.pro b/tests/benchmarks/corelib/text/qstringbuilder/qstringbuilder.pro index fa4cbe3c13..91421b3b2c 100644 --- a/tests/benchmarks/corelib/text/qstringbuilder/qstringbuilder.pro +++ b/tests/benchmarks/corelib/text/qstringbuilder/qstringbuilder.pro @@ -1,11 +1,9 @@ TEMPLATE = app -TARGET = tst_bench_qstringbuilder +CONFIG += benchmark +QT = core testlib QMAKE_CXXFLAGS += -g QMAKE_CFLAGS += -g -QT = core testlib - -CONFIG += release - -SOURCES += main.cpp +TARGET = tst_bench_qstringbuilder +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro b/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro index 2e7ae058f7..a27bf0a6ab 100644 --- a/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro +++ b/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro @@ -1,6 +1,5 @@ -TARGET = tst_bench_qstringlist -CONFIG -= debug -CONFIG += release CONFIG += benchmark QT = core testlib + +TARGET = tst_bench_qstringlist SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/thread/qmutex/qmutex.pro b/tests/benchmarks/corelib/thread/qmutex/qmutex.pro index ec87f60919..a0b2ddeaa9 100644 --- a/tests/benchmarks/corelib/thread/qmutex/qmutex.pro +++ b/tests/benchmarks/corelib/thread/qmutex/qmutex.pro @@ -1,5 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qmutex +CONFIG += benchmark QT = core testlib -SOURCES += tst_qmutex.cpp +TARGET = tst_bench_qmutex +SOURCES += tst_qmutex.cpp diff --git a/tests/benchmarks/corelib/thread/qreadwritelock/qreadwritelock.pro b/tests/benchmarks/corelib/thread/qreadwritelock/qreadwritelock.pro index a1827d0276..7c36067cb7 100644 --- a/tests/benchmarks/corelib/thread/qreadwritelock/qreadwritelock.pro +++ b/tests/benchmarks/corelib/thread/qreadwritelock/qreadwritelock.pro @@ -1,7 +1,8 @@ TEMPLATE = app -TARGET = tst_bench_qreadwritelock -QT = core-private testlib -SOURCES += tst_qreadwritelock.cpp +CONFIG += benchmark CONFIG += c++14 # for std::shared_timed_mutex CONFIG += c++1z # for std::shared_mutex +QT = core-private testlib +TARGET = tst_bench_qreadwritelock +SOURCES += tst_qreadwritelock.cpp diff --git a/tests/benchmarks/corelib/thread/qthreadpool/qthreadpool.pro b/tests/benchmarks/corelib/thread/qthreadpool/qthreadpool.pro index 47e16e8b4d..303b3cef69 100644 --- a/tests/benchmarks/corelib/thread/qthreadpool/qthreadpool.pro +++ b/tests/benchmarks/corelib/thread/qthreadpool/qthreadpool.pro @@ -1,5 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qthreadpool +CONFIG += benchmark +QT = core testlib +TARGET = tst_bench_qthreadpool SOURCES += tst_qthreadpool.cpp -QT = core testlib diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro index 95afc951bc..3f62c4eb3c 100644 --- a/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro +++ b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro @@ -1,5 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qthreadstorage +CONFIG += benchmark +QT = core testlib +TARGET = tst_bench_qthreadstorage SOURCES += tst_qthreadstorage.cpp -QT = core testlib diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro b/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro index 43c7921a93..cc801bdc13 100644 --- a/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro +++ b/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro @@ -1,4 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qwaitcondition +CONFIG += benchmark QT = core testlib + +TARGET = tst_bench_qwaitcondition SOURCES += tst_qwaitcondition.cpp diff --git a/tests/benchmarks/corelib/time/qdate/qdate.pro b/tests/benchmarks/corelib/time/qdate/qdate.pro index a655917135..ecb229dfda 100644 --- a/tests/benchmarks/corelib/time/qdate/qdate.pro +++ b/tests/benchmarks/corelib/time/qdate/qdate.pro @@ -1,4 +1,5 @@ -TARGET = tst_bench_qdate +CONFIG += benchmark QT = core testlib +TARGET = tst_bench_qdate SOURCES += tst_bench_qdate.cpp diff --git a/tests/benchmarks/corelib/time/qdatetime/qdatetime.pro b/tests/benchmarks/corelib/time/qdatetime/qdatetime.pro index a85e7346c6..7133834ffc 100644 --- a/tests/benchmarks/corelib/time/qdatetime/qdatetime.pro +++ b/tests/benchmarks/corelib/time/qdatetime/qdatetime.pro @@ -1,4 +1,5 @@ -TARGET = tst_bench_qdatetime +CONFIG += benchmark QT = core testlib +TARGET = tst_bench_qdatetime SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/time/qtimezone/qtimezone.pro b/tests/benchmarks/corelib/time/qtimezone/qtimezone.pro index d0531b568b..6ebee0faf3 100644 --- a/tests/benchmarks/corelib/time/qtimezone/qtimezone.pro +++ b/tests/benchmarks/corelib/time/qtimezone/qtimezone.pro @@ -1,4 +1,5 @@ -TARGET = tst_bench_qtimezone +CONFIG += benchmark QT = core testlib +TARGET = tst_bench_qtimezone SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro index 49edcbee70..89da01b02e 100644 --- a/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro +++ b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro @@ -1,6 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_containers-associative - +CONFIG += benchmark QT = core testlib +TARGET = tst_bench_containers-associative SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro b/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro index 6f731cb6d8..509da95d22 100644 --- a/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro +++ b/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro @@ -1,6 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_containers-sequential - +CONFIG += benchmark QT = core testlib +TARGET = tst_bench_containers-sequential SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro index f54f8320d4..0bde3ac66a 100644 --- a/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro +++ b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro @@ -1,3 +1,5 @@ -TARGET = tst_bench_qalgorithms +CONFIG += benchmark QT = core testlib + +TARGET = tst_bench_qalgorithms SOURCES = tst_qalgorithms.cpp diff --git a/tests/benchmarks/corelib/tools/qcontiguouscache/qcontiguouscache.pro b/tests/benchmarks/corelib/tools/qcontiguouscache/qcontiguouscache.pro index fe74dafef4..59adad6bbc 100644 --- a/tests/benchmarks/corelib/tools/qcontiguouscache/qcontiguouscache.pro +++ b/tests/benchmarks/corelib/tools/qcontiguouscache/qcontiguouscache.pro @@ -1,7 +1,6 @@ -TARGET = tst_bench_qcontiguouscache - -SOURCES += main.cpp - +CONFIG += benchmark CONFIG += parallel_test - QT = core testlib + +TARGET = tst_bench_qcontiguouscache +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro index cf9d640f7e..025c70c2d9 100644 --- a/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro +++ b/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro @@ -1,5 +1,6 @@ -TARGET = tst_bench_qcryptographichash -CONFIG -= debug -CONFIG += release cmdline +CONFIG += benchmark +CONFIG += cmdline QT = core testlib + +TARGET = tst_bench_qcryptographichash SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qhash/qhash.pro b/tests/benchmarks/corelib/tools/qhash/qhash.pro index 40f661c116..f9a873d096 100644 --- a/tests/benchmarks/corelib/tools/qhash/qhash.pro +++ b/tests/benchmarks/corelib/tools/qhash/qhash.pro @@ -1,5 +1,6 @@ -TARGET = tst_hash +CONFIG += benchmark QT = core testlib + INCLUDEPATH += . +TARGET = tst_hash SOURCES += main.cpp outofline.cpp -CONFIG += release diff --git a/tests/benchmarks/corelib/tools/qlist/qlist.pro b/tests/benchmarks/corelib/tools/qlist/qlist.pro index c83bc455d2..98767c3250 100644 --- a/tests/benchmarks/corelib/tools/qlist/qlist.pro +++ b/tests/benchmarks/corelib/tools/qlist/qlist.pro @@ -1,4 +1,5 @@ -TARGET = tst_bench_qlist +CONFIG += benchmark QT = core testlib +TARGET = tst_bench_qlist SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qmap/qmap.pro b/tests/benchmarks/corelib/tools/qmap/qmap.pro index 6c9bf5e8d6..0e06493c79 100644 --- a/tests/benchmarks/corelib/tools/qmap/qmap.pro +++ b/tests/benchmarks/corelib/tools/qmap/qmap.pro @@ -1,5 +1,6 @@ -TARGET = tst_bench_qmap +CONFIG += benchmark QT = core testlib + INCLUDEPATH += . +TARGET = tst_bench_qmap SOURCES += main.cpp -CONFIG += release diff --git a/tests/benchmarks/corelib/tools/qrect/qrect.pro b/tests/benchmarks/corelib/tools/qrect/qrect.pro index 42cfcd8924..211cdc5bcc 100644 --- a/tests/benchmarks/corelib/tools/qrect/qrect.pro +++ b/tests/benchmarks/corelib/tools/qrect/qrect.pro @@ -1,7 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qrect - QT = core testlib -CONFIG += release +CONFIG += benchmark +TARGET = tst_bench_qrect SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro b/tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro index 21b50e10e5..69750865b5 100644 --- a/tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro +++ b/tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro @@ -1,7 +1,6 @@ TEMPLATE = app -TARGET = tst_bench_qringbuffer - +CONFIG += benchmark QT = core-private testlib -CONFIG += release +TARGET = tst_bench_qringbuffer SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qset/qset.pro b/tests/benchmarks/corelib/tools/qset/qset.pro index 8fb8bcfa0b..e448683e94 100644 --- a/tests/benchmarks/corelib/tools/qset/qset.pro +++ b/tests/benchmarks/corelib/tools/qset/qset.pro @@ -1,4 +1,5 @@ -TARGET = tst_qset +CONFIG += benchmark QT = core testlib + +TARGET = tst_qset SOURCES += main.cpp -CONFIG += release diff --git a/tests/benchmarks/corelib/tools/qstack/qstack.pro b/tests/benchmarks/corelib/tools/qstack/qstack.pro index 7d8a839610..17b7ebd486 100644 --- a/tests/benchmarks/corelib/tools/qstack/qstack.pro +++ b/tests/benchmarks/corelib/tools/qstack/qstack.pro @@ -1,4 +1,5 @@ -TARGET = tst_bench_stack +CONFIG += benchmark QT = core testlib core-private + +TARGET = tst_bench_stack SOURCES += main.cpp -CONFIG += release diff --git a/tests/benchmarks/corelib/tools/qvector/qvector.pro b/tests/benchmarks/corelib/tools/qvector/qvector.pro index 24a65d8ee8..fce8a6cd78 100644 --- a/tests/benchmarks/corelib/tools/qvector/qvector.pro +++ b/tests/benchmarks/corelib/tools/qvector/qvector.pro @@ -1,5 +1,6 @@ -TARGET = tst_bench_vector +CONFIG += benchmark QT = core testlib core-private + INCLUDEPATH += . -SOURCES += main.cpp outofline.cpp -CONFIG += release +TARGET = tst_bench_vector +SOURCES += main.cpp outofline.cpp |