diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2012-03-12 14:24:02 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-19 01:18:20 +0100 |
commit | 0f929bfa9aa76d7db54a62c6a571e97224384ec1 (patch) | |
tree | a816ba9a293ba7b56c91be4c3b85ea4e56013f1d /tests/benchmarks/plugins | |
parent | 36513264daaa0748d32326421732b9e5f212c2b5 (diff) | |
download | qtbase-0f929bfa9aa76d7db54a62c6a571e97224384ec1.tar.gz |
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/plugins')
-rw-r--r-- | tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp | 4 | ||||
-rw-r--r-- | tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp index a3644efd53..761fbcc7a7 100644 --- a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp +++ b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp @@ -59,7 +59,9 @@ void tst_jpeg::jpegDecodingQtWebkitStyle() { // QtWebkit currently calls size() to get the image size for layouting purposes. // Then when it is in the viewport (we assume that here) it actually gets decoded. - QFile inputJpeg(SRCDIR "n900.jpeg"); + QString testFile = QFINDTESTDATA("n900.jpeg"); + QVERIFY2(!testFile.isEmpty(), "cannot find test file n900.jpeg!"); + QFile inputJpeg(testFile); QVERIFY(inputJpeg.exists()); inputJpeg.open(QIODevice::ReadOnly); QByteArray imageData = inputJpeg.readAll(); diff --git a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro index d278e9e721..281e79f585 100644 --- a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro +++ b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro @@ -3,10 +3,6 @@ TARGET = jpeg QT += testlib CONFIG += release -wince*: { - DEFINES += SRCDIR=\\\"\\\" -} else { - DEFINES += SRCDIR=\\\"$$PWD/\\\" -} - SOURCES += jpeg.cpp + +TESTDATA = n900.jpeg |