diff options
Diffstat (limited to 'tests/benchmarks/corelib')
15 files changed, 51 insertions, 52 deletions
diff --git a/tests/benchmarks/corelib/io/qdir/10000/10000.pro b/tests/benchmarks/corelib/io/qdir/10000/10000.pro index 0319f2c195..196b3b5b30 100644 --- a/tests/benchmarks/corelib/io/qdir/10000/10000.pro +++ b/tests/benchmarks/corelib/io/qdir/10000/10000.pro @@ -1,9 +1,6 @@ TEMPLATE = app TARGET = bench_qdir_10000 -DEPENDPATH += . -INCLUDEPATH += . -# Input 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 415580cc46..2998a13b57 100644 --- a/tests/benchmarks/corelib/io/qdir/tree/tree.pro +++ b/tests/benchmarks/corelib/io/qdir/tree/tree.pro @@ -1,9 +1,6 @@ TEMPLATE = app TARGET = bench_qdir_tree -DEPENDPATH += . -INCLUDEPATH += . -# Input SOURCES += bench_qdir_tree.cpp RESOURCES += bench_qdir_tree.qrc diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp index 3d16921b7f..02922e0bbd 100644 --- a/tests/benchmarks/corelib/io/qfile/main.cpp +++ b/tests/benchmarks/corelib/io/qfile/main.cpp @@ -41,10 +41,11 @@ #include <QDebug> #include <QTemporaryFile> -#include <QFSFileEngine> #include <QString> #include <QDirIterator> +#include <private/qfsfileengine_p.h> + #include <qtest.h> #include <stdio.h> @@ -79,7 +80,9 @@ Q_OBJECT public: enum BenchmarkType { QFileBenchmark = 1, +#ifdef QT_BUILD_INTERNAL QFSFileEngineBenchmark, +#endif Win32Benchmark, PosixBenchmark, QFileFromPosixBenchmark @@ -173,7 +176,14 @@ void tst_qfile::cleanupTestCase() } void tst_qfile::readBigFile_QFile() { readBigFile(); } -void tst_qfile::readBigFile_QFSFileEngine() { readBigFile(); } +void tst_qfile::readBigFile_QFSFileEngine() +{ +#ifdef QT_BUILD_INTERNAL + readBigFile(); +#else + QSKIP("This test requires -developer-build."); +#endif +} void tst_qfile::readBigFile_posix() { readBigFile(); @@ -191,10 +201,15 @@ void tst_qfile::readBigFile_QFile_data() void tst_qfile::readBigFile_QFSFileEngine_data() { +#ifdef QT_BUILD_INTERNAL readBigFile_data(QFSFileEngineBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); readBigFile_data(QFSFileEngineBenchmark, QIODevice::NotOpen, QIODevice::Unbuffered); readBigFile_data(QFSFileEngineBenchmark, QIODevice::Text, QIODevice::NotOpen); readBigFile_data(QFSFileEngineBenchmark, QIODevice::Text, QIODevice::Unbuffered); +#else + QTest::addColumn<int>("dummy"); + QTest::newRow("Test will be skipped") << -1; +#endif } void tst_qfile::readBigFile_posix_data() @@ -255,6 +270,7 @@ void tst_qfile::readBigFile() file.close(); } break; +#ifdef QT_BUILD_INTERNAL case(QFSFileEngineBenchmark): { QFSFileEngine fse(filename); fse.open(QIODevice::ReadOnly|textMode|bufferedMode); @@ -266,6 +282,7 @@ void tst_qfile::readBigFile() fse.close(); } break; +#endif case(PosixBenchmark): { QByteArray data = filename.toLocal8Bit(); const char* cfilename = data.constData(); @@ -317,7 +334,9 @@ void tst_qfile::seek_data() { QTest::addColumn<tst_qfile::BenchmarkType>("testType"); QTest::newRow("QFile") << QFileBenchmark; +#ifdef QT_BUILD_INTERNAL QTest::newRow("QFSFileEngine") << QFSFileEngineBenchmark; +#endif QTest::newRow("Posix FILE*") << PosixBenchmark; #ifdef Q_OS_WIN QTest::newRow("Win32 API") << Win32Benchmark; @@ -343,6 +362,7 @@ void tst_qfile::seek() file.close(); } break; +#ifdef QT_BUILD_INTERNAL case(QFSFileEngineBenchmark): { QFSFileEngine fse(filename); fse.open(QIODevice::ReadOnly); @@ -353,6 +373,7 @@ void tst_qfile::seek() fse.close(); } break; +#endif case(PosixBenchmark): { QByteArray data = filename.toLocal8Bit(); const char* cfilename = data.constData(); @@ -396,7 +417,9 @@ void tst_qfile::open_data() { QTest::addColumn<tst_qfile::BenchmarkType>("testType"); QTest::newRow("QFile") << QFileBenchmark; +#ifdef QT_BUILD_INTERNAL QTest::newRow("QFSFileEngine") << QFSFileEngineBenchmark; +#endif QTest::newRow("Posix FILE*") << PosixBenchmark; QTest::newRow("QFile from FILE*") << QFileFromPosixBenchmark; #ifdef Q_OS_WIN @@ -419,6 +442,7 @@ void tst_qfile::open() } } break; +#ifdef QT_BUILD_INTERNAL case(QFSFileEngineBenchmark): { QBENCHMARK { QFSFileEngine fse(filename); @@ -427,7 +451,7 @@ void tst_qfile::open() } } break; - +#endif case(PosixBenchmark): { // ensure we don't account toLocal8Bit() QByteArray data = filename.toLocal8Bit(); @@ -477,7 +501,14 @@ void tst_qfile::open() void tst_qfile::readSmallFiles_QFile() { readSmallFiles(); } -void tst_qfile::readSmallFiles_QFSFileEngine() { readSmallFiles(); } +void tst_qfile::readSmallFiles_QFSFileEngine() +{ +#ifdef QT_BUILD_INTERNAL + readSmallFiles(); +#else + QSKIP("This test requires -developer-build."); +#endif +} void tst_qfile::readSmallFiles_posix() { readSmallFiles(); @@ -498,10 +529,15 @@ void tst_qfile::readSmallFiles_QFile_data() void tst_qfile::readSmallFiles_QFSFileEngine_data() { +#ifdef QT_BUILD_INTERNAL readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::NotOpen, QIODevice::Unbuffered); readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::Text, QIODevice::NotOpen); readSmallFiles_data(QFSFileEngineBenchmark, QIODevice::Text, QIODevice::Unbuffered); +#else + QTest::addColumn<int>("dummy"); + QTest::newRow("Test will be skipped") << -1; +#endif } void tst_qfile::readSmallFiles_posix_data() @@ -606,6 +642,7 @@ void tst_qfile::readSmallFiles() } } break; +#ifdef QT_BUILD_INTERNAL case(QFSFileEngineBenchmark): { QList<QFSFileEngine*> fileList; Q_FOREACH(QString file, files) { @@ -626,6 +663,7 @@ void tst_qfile::readSmallFiles() } } break; +#endif case(PosixBenchmark): { QList<FILE*> fileList; Q_FOREACH(QString file, files) { diff --git a/tests/benchmarks/corelib/io/qfile/qfile.pro b/tests/benchmarks/corelib/io/qfile/qfile.pro index 933469071d..5f7b9af73f 100644 --- a/tests/benchmarks/corelib/io/qfile/qfile.pro +++ b/tests/benchmarks/corelib/io/qfile/qfile.pro @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = tst_bench_qfile -QT = core testlib +QT = core core-private testlib win32: DEFINES+= _CRT_SECURE_NO_WARNINGS SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro index 0dca21c1a8..42e8708b02 100644 --- a/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro +++ b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro @@ -1,13 +1,9 @@ TEMPLATE = app TARGET = tst_bench_qfileinfo -DEPENDPATH += . -INCLUDEPATH += . QT -= gui - QT += core-private testlib CONFIG += release -# Input SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro index 0dff0ce86e..20b02d190a 100644 --- a/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro +++ b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro @@ -1,12 +1,9 @@ TEMPLATE = app TARGET = tst_bench_qiodevice TARGET.EPOCHEAPSIZE = 0x100000 0x2000000 -DEPENDPATH += . -INCLUDEPATH += . QT = core testlib CONFIG += release -# Input SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro index 6ebee8a659..758930c139 100644 --- a/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro +++ b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro @@ -1,11 +1,8 @@ TEMPLATE = app TARGET = tst_bench_qtemporaryfile -DEPENDPATH += . -INCLUDEPATH += . QT = core testlib CONFIG += release -# Input SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/kernel/events/events.pro b/tests/benchmarks/corelib/kernel/events/events.pro index fb50116495..798a880e5b 100644 --- a/tests/benchmarks/corelib/kernel/events/events.pro +++ b/tests/benchmarks/corelib/kernel/events/events.pro @@ -1,7 +1,6 @@ TEMPLATE = app TARGET = tst_bench_events -DEPENDPATH += . -INCLUDEPATH += . -# Input -SOURCES += main.cpp + QT = core testlib + +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro index 2c29fafca4..6896b3ff55 100644 --- a/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro +++ b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro @@ -2,8 +2,5 @@ QT += testlib TEMPLATE = app TARGET = tst_bench_qcoreapplication -DEPENDPATH += . -INCLUDEPATH += . -# Input SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/kernel/qobject/qobject.pro b/tests/benchmarks/corelib/kernel/qobject/qobject.pro index 8edd038b0d..e611eff0a2 100644 --- a/tests/benchmarks/corelib/kernel/qobject/qobject.pro +++ b/tests/benchmarks/corelib/kernel/qobject/qobject.pro @@ -2,9 +2,6 @@ QT += widgets testlib TEMPLATE = app TARGET = tst_bench_qobject -DEPENDPATH += . -INCLUDEPATH += . -# Input HEADERS += object.h SOURCES += main.cpp object.cpp diff --git a/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro index 940973d8db..49edcbee70 100644 --- a/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro +++ b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro @@ -1,8 +1,6 @@ TEMPLATE = app TARGET = tst_bench_containers-associative -DEPENDPATH += . -INCLUDEPATH += . -# Input -SOURCES += main.cpp QT = core testlib + +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 0ae83d70f7..6f731cb6d8 100644 --- a/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro +++ b/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro @@ -1,8 +1,6 @@ TEMPLATE = app TARGET = tst_bench_containers-sequential -DEPENDPATH += . -INCLUDEPATH += . -# Input -SOURCES += main.cpp QT = core testlib + +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro b/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro index 10fdc7261e..23d8dae18f 100644 --- a/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro +++ b/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro @@ -1,11 +1,7 @@ TEMPLATE = app TARGET = tst_bench_qbytearray -DEPENDPATH += . -INCLUDEPATH += . QT = core testlib - CONFIG += release -# Input SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qrect/qrect.pro b/tests/benchmarks/corelib/tools/qrect/qrect.pro index b05483599e..42cfcd8924 100644 --- a/tests/benchmarks/corelib/tools/qrect/qrect.pro +++ b/tests/benchmarks/corelib/tools/qrect/qrect.pro @@ -1,11 +1,7 @@ TEMPLATE = app TARGET = tst_bench_qrect -DEPENDPATH += . -INCLUDEPATH += . QT = core testlib - CONFIG += release -# Input SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/qregexp/qregexp.pro b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro index b427150041..59e7d19244 100644 --- a/tests/benchmarks/corelib/tools/qregexp/qregexp.pro +++ b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro @@ -1,14 +1,10 @@ TEMPLATE = app TARGET = tst_bench_qregexp -DEPENDPATH += . -INCLUDEPATH += . -RESOURCES+=qregexp.qrc QT = core testlib - CONFIG += release -# Input SOURCES += main.cpp +RESOURCES += qregexp.qrc !isEmpty(QT.webkit.sources):exists($${QT.webkit.sources}/../JavaScriptCore/JavaScriptCore.pri) { include( $${QT.webkit.sources}/../JavaScriptCore/JavaScriptCore.pri ) |