diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-07-10 12:46:44 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-07-10 16:06:15 (GMT) |
commit | 5425853ec6a9f29af3378c982f12a0cca4bcb0e0 (patch) | |
tree | 1d5ac60e3d507e5afbdde270e16a1f392861f487 /tests/auto/linguist/lconvert | |
parent | 5f798ce8208fd5b1f2212246bc6b8ee2ec4652f0 (diff) | |
download | Qt-5425853ec6a9f29af3378c982f12a0cca4bcb0e0.zip Qt-5425853ec6a9f29af3378c982f12a0cca4bcb0e0.tar.gz Qt-5425853ec6a9f29af3378c982f12a0cca4bcb0e0.tar.bz2 |
make tests independent of PATH contents
use absolute paths for the tested executables
Diffstat (limited to 'tests/auto/linguist/lconvert')
-rw-r--r-- | tests/auto/linguist/lconvert/tst_lconvert.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/linguist/lconvert/tst_lconvert.cpp b/tests/auto/linguist/lconvert/tst_lconvert.cpp index 40be55a..3ad2925 100644 --- a/tests/auto/linguist/lconvert/tst_lconvert.cpp +++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp @@ -47,7 +47,7 @@ class tst_lconvert : public QObject Q_OBJECT public: - tst_lconvert() : dataDir("data/") {} + tst_lconvert() : dataDir("data/"), binDir(QLibraryInfo::location(QLibraryInfo::BinariesPath)) {} private slots: void initTestCase(); @@ -73,6 +73,7 @@ private: const QList<QStringList> &args); QString dataDir; + QString binDir; }; void tst_lconvert::initTestCase() @@ -151,7 +152,7 @@ void tst_lconvert::doCompare(QIODevice *actualDev, const QString &expectedFn) void tst_lconvert::verifyReadFail(const QString &fn) { QProcess cvt; - cvt.start("lconvert", QStringList() << (dataDir + fn)); + cvt.start(binDir + "/lconvert", QStringList() << (dataDir + fn)); QVERIFY(cvt.waitForFinished(1000)); QVERIFY(cvt.exitStatus() == QProcess::NormalExit); QVERIFY2(cvt.exitCode() == 2, "Accepted invalid input"); @@ -178,7 +179,7 @@ void tst_lconvert::convertChain(const QString &_inFileName, const QString &_outF if (!argList.isEmpty()) args += argList[i]; args << "-if" << stations[i] << "-i" << "-" << "-of" << stations[i + 1]; - cvts.at(i)->start("lconvert", args); + cvts.at(i)->start(binDir + "/lconvert", args); } int st = 0; foreach (QProcess *cvt, cvts) @@ -242,7 +243,7 @@ void tst_lconvert::converts() QString outFileNameFq = dataDir + outFileName; QProcess cvt; - cvt.start("lconvert", QStringList() << "-i" << (dataDir + inFileName) << "-of" << format); + cvt.start(binDir + "/lconvert", QStringList() << "-i" << (dataDir + inFileName) << "-of" << format); doWait(&cvt, 0); if (QTest::currentTestFailed()) return; |