diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2012-01-04 12:28:20 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-05 03:49:45 +0100 |
commit | 77ddb00a49fdde54df2b232e9e901a08e48cee6d (patch) | |
tree | c417cb06865a1536fbdd3b497d27161ba3f0297c /tests/auto/other/lancelot | |
parent | 3c407147997ba84a4e2201417d53dab951f2f110 (diff) |
Changed tests: qmake,selftest and lancelot to use QFINDTESTDATA.
Changed these tests to use QFINDTESTDATA macro to detect location of testdata.
Checking for a specific file contained in the testdata so as not to be confused by empty directories
created during configure.
Change-Id: Iac2ac6304b6b9ac79e00886025b93ec0af5a8507
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/other/lancelot')
-rw-r--r-- | tests/auto/other/lancelot/lancelot.pro | 3 | ||||
-rw-r--r-- | tests/auto/other/lancelot/tst_lancelot.cpp | 11 |
2 files changed, 3 insertions, 11 deletions
diff --git a/tests/auto/other/lancelot/lancelot.pro b/tests/auto/other/lancelot/lancelot.pro index bbb48c745e..ced8aceb99 100644 --- a/tests/auto/other/lancelot/lancelot.pro +++ b/tests/auto/other/lancelot/lancelot.pro @@ -10,7 +10,6 @@ RESOURCES += images.qrc include($$PWD/../../../baselineserver/shared/qbaselinetest.pri) -!wince*:DEFINES += SRCDIR=\\\"$$PWD\\\" -linux-g++-maemo:DEFINES += USE_RUNTIME_DIR +TESTDATA += scripts/* CONFIG += insignificant_test # QTBUG-21402 diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp index cbbd28dc82..e024b75400 100644 --- a/tests/auto/other/lancelot/tst_lancelot.cpp +++ b/tests/auto/other/lancelot/tst_lancelot.cpp @@ -50,10 +50,6 @@ #include <QtOpenGL> #endif -#ifndef SRCDIR -#define SRCDIR "." -#endif - class tst_Lancelot : public QObject { Q_OBJECT @@ -114,11 +110,8 @@ void tst_Lancelot::initTestCase() if (!proto.connect(QLatin1String("tst_Lancelot"), &dryRunMode, clientInfo)) QSKIP(qPrintable(proto.errorMessage())); -#if defined(USE_RUNTIME_DIR) - scriptsDir = QCoreApplication::applicationDirPath() + "/scripts/"; -#else - scriptsDir = SRCDIR "/scripts/"; -#endif + QString baseDir = QFINDTESTDATA("scripts/text.qps"); + scriptsDir = baseDir.left(baseDir.lastIndexOf('/')) + '/'; QDir qpsDir(scriptsDir); QStringList files = qpsDir.entryList(QStringList() << QLatin1String("*.qps"), QDir::Files | QDir::Readable); if (files.isEmpty()) { |