summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2012-03-12 14:24:02 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-19 01:18:20 +0100
commit0f929bfa9aa76d7db54a62c6a571e97224384ec1 (patch)
treea816ba9a293ba7b56c91be4c3b85ea4e56013f1d /tests/benchmarks/gui
parent36513264daaa0748d32326421732b9e5f212c2b5 (diff)
Fixed benchmarks to work from install directory
- Changed benchmarks to use TESTDATA and QFINDTESTDATA - Fixed up targets all use tst_bench_ syntax Change-Id: I5c2936702e248478f5df225ce38893158ee22d7f Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/benchmarks/gui')
-rw-r--r--tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro2
-rw-r--r--tests/benchmarks/gui/painting/qtbench/qtbench.pro2
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp4
-rw-r--r--tests/benchmarks/gui/text/qtext/qtext.pro2
4 files changed, 6 insertions, 4 deletions
diff --git a/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro b/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro
index 12cb5d5f03..7e8415e495 100644
--- a/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro
+++ b/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro
@@ -1,7 +1,7 @@
QT += widgets testlib
TEMPLATE = app
-TARGET = bench_qheaderview
+TARGET = tst_bench_qheaderview
SOURCES += qheaderviewbench.cpp
diff --git a/tests/benchmarks/gui/painting/qtbench/qtbench.pro b/tests/benchmarks/gui/painting/qtbench/qtbench.pro
index 06c77a93c0..ab3f040033 100644
--- a/tests/benchmarks/gui/painting/qtbench/qtbench.pro
+++ b/tests/benchmarks/gui/painting/qtbench/qtbench.pro
@@ -1,7 +1,7 @@
QT += widgets testlib
TEMPLATE = app
-TARGET = tst_qtbench
+TARGET = tst_bench_qtbench
SOURCES += tst_qtbench.cpp
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp
index d4acfce821..5a4745fbc7 100644
--- a/tests/benchmarks/gui/text/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.cpp
@@ -129,7 +129,9 @@ void tst_QText::shaping_data()
QTest::newRow("lorem") << m_lorem;
QTest::newRow("short") << QString::fromLatin1("Lorem ipsum dolor sit amet");
- QFile file(QString::fromLatin1(SRCDIR) + QLatin1String("/bidi.txt"));
+ QString testFile = QFINDTESTDATA("bidi.txt");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file bidi.txt!");
+ QFile file(testFile);
QVERIFY(file.open(QFile::ReadOnly));
QByteArray data = file.readAll();
QVERIFY(data.count() > 1000);
diff --git a/tests/benchmarks/gui/text/qtext/qtext.pro b/tests/benchmarks/gui/text/qtext/qtext.pro
index ef91a97493..084cf858fd 100644
--- a/tests/benchmarks/gui/text/qtext/qtext.pro
+++ b/tests/benchmarks/gui/text/qtext/qtext.pro
@@ -6,4 +6,4 @@ TARGET = tst_bench_QText
SOURCES += main.cpp
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
+TESTDATA = bidi.txt