84 lines
2.5 KiB
Diff
84 lines
2.5 KiB
Diff
--- a/tests/auto/linguist/lconvert/tst_lconvert.cpp
|
|
+++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp
|
|
@@ -4,6 +4,16 @@
|
|
#include <QtTest/QtTest>
|
|
#include <QtCore/QFile>
|
|
|
|
+namespace {
|
|
+QString xbinpath()
|
|
+{
|
|
+ char *build_binpath = getenv("QT_BUILD_BIN_PATH");
|
|
+ if (build_binpath && *build_binpath)
|
|
+ return build_binpath;
|
|
+ return QLibraryInfo::path(QLibraryInfo::BinariesPath);
|
|
+}
|
|
+}
|
|
+
|
|
class tst_lconvert : public QObject
|
|
{
|
|
Q_OBJECT
|
|
@@ -11,7 +21,7 @@ class tst_lconvert : public QObject
|
|
public:
|
|
tst_lconvert()
|
|
: dataDir(QFINDTESTDATA("data/"))
|
|
- , lconvert(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/lconvert") {}
|
|
+ , lconvert(xbinpath() + QStringLiteral("/lconvert")) {}
|
|
|
|
private slots:
|
|
void initTestCase();
|
|
--- a/tests/auto/linguist/lrelease/tst_lrelease.cpp
|
|
+++ b/tests/auto/linguist/lrelease/tst_lrelease.cpp
|
|
@@ -8,13 +8,22 @@
|
|
|
|
#include <QtTest/QtTest>
|
|
|
|
+namespace {
|
|
+QString xbinpath()
|
|
+{
|
|
+ char *build_binpath = getenv("QT_BUILD_BIN_PATH");
|
|
+ if (build_binpath && *build_binpath)
|
|
+ return build_binpath;
|
|
+ return QLibraryInfo::path(QLibraryInfo::BinariesPath);
|
|
+}
|
|
+}
|
|
class tst_lrelease : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
tst_lrelease()
|
|
- : lrelease(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/lrelease")
|
|
+ : lrelease(xbinpath() + QStringLiteral("/lrelease"))
|
|
, dataDir(QFINDTESTDATA("testdata/"))
|
|
{}
|
|
|
|
--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp
|
|
+++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp
|
|
@@ -44,7 +44,10 @@ private:
|
|
|
|
tst_lupdate::tst_lupdate()
|
|
{
|
|
- QString binPath = QLibraryInfo::path(QLibraryInfo::BinariesPath);
|
|
+ auto binPath = QLibraryInfo::path(QLibraryInfo::BinariesPath);
|
|
+ char *build_binpath = getenv("QT_BUILD_BIN_PATH");
|
|
+ if (build_binpath && *build_binpath)
|
|
+ binPath = build_binpath;
|
|
m_cmdLupdate = binPath + QLatin1String("/lupdate");
|
|
m_basePath = QFINDTESTDATA("testdata/");
|
|
}
|
|
--- a/tests/auto/qtdiag/tst_qtdiag.cpp
|
|
+++ b/tests/auto/qtdiag/tst_qtdiag.cpp
|
|
@@ -21,7 +21,11 @@ private:
|
|
|
|
void tst_QtDiag::initTestCase()
|
|
{
|
|
- QString binary = QLibraryInfo::path(QLibraryInfo::BinariesPath) + QStringLiteral("/qtdiag");
|
|
+ auto binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath);
|
|
+ char *build_binpath = getenv("QT_BUILD_BIN_PATH");
|
|
+ if (build_binpath && *build_binpath)
|
|
+ binpath = build_binpath;
|
|
+ QString binary = binpath + QStringLiteral("/qtdiag");
|
|
# ifdef Q_OS_WIN
|
|
binary += QStringLiteral(".exe");
|
|
# endif
|