From c79c2a5e55d92951f6166cc1cae0ee8cece101b3 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 7 Mar 2011 09:55:41 +0100 Subject: [PATCH] Fixed uic3 test by adding extra bin/ dir to the PATH. --- qt3support/tests/auto/uic3/tst_uic3.cpp | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/qt3support/tests/auto/uic3/tst_uic3.cpp b/qt3support/tests/auto/uic3/tst_uic3.cpp index d9ab0db..d4e30e6 100644 --- a/qt3support/tests/auto/uic3/tst_uic3.cpp +++ b/qt3support/tests/auto/uic3/tst_uic3.cpp @@ -73,17 +73,26 @@ private: tst_uic3::tst_uic3() : uic3Exists(true) - , command(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/uic3")) + , command(QLatin1String("uic3")) { } void tst_uic3::initTestCase() { + // Append the bin/ dir to the path, in order to find uic3. +#ifdef Q_OS_WIN + const QString sep = ";"; +#else + const QString sep = ":"; +#endif + QString path = QString::fromLocal8Bit(qgetenv("PATH")); + path = QDir::cleanPath(QDir::currentPath() + "/../../../bin") + sep + path; + qputenv("PATH", path.toLocal8Bit()); + QProcess process; process.start(command, QStringList(QLatin1String("-help"))); if (!process.waitForFinished()) { uic3Exists = false; - const QString path = QString::fromLocal8Bit(qgetenv("PATH")); QString message = QString::fromLatin1("'%1' could not be found when run from '%2'. Path: '%3' "). arg(command, QDir::currentPath(), path); QFAIL(qPrintable(message)); -- 1.7.2.2