fix_test_remove_qlibraryinfo
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Mon, 9 Apr 2018 23:44:03 +0000 (00:44 +0100)
committerSimon Quigley <tsimonq2@ubuntu.com>
Mon, 9 Apr 2018 23:44:03 +0000 (00:44 +0100)
Gbp-Pq: Name fix_test_remove_qlibraryinfo.patch

15 files changed:
.qmake.conf
tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp
tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp
tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
tests/auto/qml/qmllint/main.cpp
tests/auto/qml/qmlmin/tst_qmlmin.cpp
tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
tests/auto/quick/examples/tst_examples.cpp

index f2b6befafaa0eb95792118796a31a8ab7485e57a..895056387a9d0b1d58de50cfeb95c9968f3901df 100644 (file)
@@ -1,4 +1,7 @@
 load(qt_build_config)
 CONFIG += warning_clean
 
+QMAKE_CXXFLAGS += -DTESTBINDIR=\\\"$$PWD/bin\\\"
+QMAKE_CXXFLAGS += -DTESTEXAMPLEDIR=\\\"$$PWD/examples\\\"
+
 MODULE_VERSION = 5.10.1
index f851688b5ecd7d4a8ffa4234ac59df5251d59923..bf5f53563009d6b25027c288daaf88bba7942521 100644 (file)
@@ -145,7 +145,7 @@ QList<QQmlDebugClient *> tst_QDebugMessageService::createClients()
 
 void tst_QDebugMessageService::retrieveDebugOutput()
 {
-    QCOMPARE(QQmlDebugTest::connect(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+    QCOMPARE(QQmlDebugTest::connect(TESTBINDIR "/qml",
                                     QString(), testFile(QMLFILE), true), ConnectSuccess);
 
     QTRY_VERIFY(m_client->logBuffer.size() >= 2);
index 134de4485881ff6af197d98057a77db37ef80d42..39ebfee90000f57aa5cda433ce90a6bb829978fa 100644 (file)
@@ -101,8 +101,7 @@ void tst_QQmlDebuggingEnabler::qmlscene()
     QFETCH(bool, blockMode);
     QFETCH(QStringList, services);
 
-    m_process = new QQmlDebugProcess(
-                QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+    m_process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
     m_process->setMaximumBindErrors(1);
     m_process->start(QStringList()
                      << QString::fromLatin1("-qmljsdebugger=connector:%1%2%3%4")
index 59483d75da0053d8c43ea5039a271df559b8a71d..6ca224c440c1b19b0a5293b6dbf338ac275912e5 100644 (file)
@@ -763,7 +763,7 @@ QQmlDebugTest::ConnectResult tst_QQmlDebugJS::init(bool qmlscene, const QString
                                                    bool blockMode, bool restrictServices)
 {
     const QString executable = qmlscene
-            ? QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene"
+            ? TESTBINDIR "/qmlscene"
             : QCoreApplication::applicationDirPath() + QLatin1String("/qqmldebugjsserver");
     return QQmlDebugTest::connect(
                 executable, restrictServices ? QStringLiteral("V8Debugger") : QString(),
@@ -1383,8 +1383,7 @@ void tst_QQmlDebugJS::evaluateInLocalScope()
 void tst_QQmlDebugJS::evaluateInContext()
 {
     m_connection = new QQmlDebugConnection();
-    m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
-                                   + "/qmlscene", this);
+    m_process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
     m_client = new QJSDebugClient(m_connection);
     QScopedPointer<QQmlEngineDebugClient> engineClient(new QQmlEngineDebugClient(m_connection));
     m_process->start(QStringList() << QLatin1String(BLOCKMODE) << testFile(ONCOMPLETED_QMLFILE));
index 06e4a4bfcc18a6e73da55705b4d314a8cde0c950..4582b3fdcf6a74eb25424215d08349e1bdccfbf8 100644 (file)
@@ -107,8 +107,7 @@ void tst_QQmlDebugService::checkPortRange()
 {
     QScopedPointer<QQmlDebugConnection> connection1(new QQmlDebugConnection());
     QScopedPointer<QQmlDebugProcess> process1(
-                new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
-                                     + "/qmlscene", this));
+                new QQmlDebugProcess(TESTBINDIR "/qmlscene", this));
 
     process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792")
                                   << testFile("test.qml"));
@@ -124,8 +123,7 @@ void tst_QQmlDebugService::checkPortRange()
     // Second instance
     QScopedPointer<QQmlDebugConnection> connection2(new QQmlDebugConnection());
     QScopedPointer<QQmlDebugProcess> process2(
-                new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
-                                     + "/qmlscene", this));
+                new QQmlDebugProcess(TESTBINDIR "/qmlscene", this));
 
     process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792")
                                   << testFile("test.qml"));
index 18ba133876dd2a1a8b7fb9ad66165b1c3d3d34ab..3c3d0fe8a56193419fd0adbd535f93f5fd7203e2 100644 (file)
@@ -82,7 +82,7 @@ private slots:
 QQmlDebugTest::ConnectResult tst_QQmlEngineControl::connect(const QString &file,
                                                             bool restrictServices)
 {
-    return QQmlDebugTest::connect(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene",
+    return QQmlDebugTest::connect(TESTBINDIR "/qmlscene",
                                   restrictServices ? QStringLiteral("EngineControl") : QString(),
                                   testFile(file), true);
 }
index 249416a3b94bb92d0dbf8d3d99a74fa6d8b05293..0b759c870ced58f3534425462cd16b8d1194caba 100644 (file)
@@ -88,7 +88,7 @@ QmlDebugObjectReference tst_QQmlEngineDebugInspectorIntegration::findRootObject(
 QQmlDebugTest::ConnectResult tst_QQmlEngineDebugInspectorIntegration::init(bool restrictServices)
 {
     return QQmlDebugTest::connect(
-                QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+                TESTBINDIR "/qml",
                 restrictServices ? QStringLiteral("QmlDebugger,QmlInspector") : QString(),
                 testFile("qtquick2.qml"), true);
 }
index a4cf932ee14d734538385025d84411092bf6db21..c0c5d594523aeac0271a8dd3b17b72a055f3b72f 100644 (file)
@@ -63,7 +63,7 @@ private slots:
 QQmlDebugTest::ConnectResult tst_QQmlInspector::startQmlProcess(const QString &qmlFile,
                                                                 bool restrictServices)
 {
-    return QQmlDebugTest::connect(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+    return QQmlDebugTest::connect(TESTBINDIR "/qml",
                                   restrictServices ? QStringLiteral("QmlInspector") : QString(),
                                   testFile(qmlFile), true);
 }
index f60e82107173454f63f8ccafb4ce2d0962d1b638..66ee95492ea0410cebc96ebc3d1035623d7e9e2d 100644 (file)
@@ -309,7 +309,7 @@ QQmlDebugTest::ConnectResult tst_QQmlProfilerService::connect(bool block, const
                                                               bool restrictServices)
 {
     // ### Still using qmlscene due to QTBUG-33377
-    return QQmlDebugTest::connect(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene",
+    return QQmlDebugTest::connect(TESTBINDIR "/qmlscene",
                                   restrictServices ? QStringLiteral("CanvasFrameRate") : QString(),
                                   testFile(file), block);
 }
index 880e254543230b84c0a2039ec025a8d6b0261e2c..031ab75c1197de12cd8a5d238d42d2ef50d7ec9e 100644 (file)
@@ -56,7 +56,7 @@ void tst_EcmaScriptTests::runTests()
     process.setProcessChannelMode(QProcess::ForwardedChannels);
     process.setWorkingDirectory(QLatin1String(SRCDIR));
     process.setProgram("python");
-    process.setArguments(QStringList() << "test262.py" << "--command=" + QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs " + qmljsParameter << "--parallel" << "--with-test-expectations");
+    process.setArguments(QStringList() << "test262.py" << "--command=" + TESTBINDIR "/qmljs " + qmljsParameter << "--parallel" << "--with-test-expectations");
 
     qDebug() << "Going to run" << process.program() << process.arguments() << "in" << process.workingDirectory();
 
index d8afcd6946e8a7ba1adcdf76da8e80fbb84f0af8..5ee882b783dcd3a18456013b49397f344dfd8380 100644 (file)
@@ -75,7 +75,7 @@ static bool generateCache(const QString &qmlFileName, QByteArray *capturedStderr
     QProcess proc;
     if (capturedStderr == nullptr)
         proc.setProcessChannelMode(QProcess::ForwardedChannels);
-    proc.setProgram(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator() + QLatin1String("qmlcachegen"));
+    proc.setProgram(TESTBINDIR "/qmlcachegen");
     proc.setArguments(QStringList() << (QLatin1String("--target-architecture=") + QSysInfo::buildCpuArchitecture()) << (QLatin1String("--target-abi=") + QSysInfo::buildAbi()) << qmlFileName);
     proc.start();
     if (!proc.waitForFinished())
index eedbd7c2f2153f755a9cdea4c6204089d1349944..1e4b6e2fa7a47776d423f9d0d7af846738bea3a8 100644 (file)
@@ -44,7 +44,7 @@ private:
 
 void TestQmllint::initTestCase()
 {
-    m_qmllintPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmllint");
+    m_qmllintPath = QLatin1String(TESTBINDIR "/qmllint");
 #ifdef Q_OS_WIN
     m_qmllintPath += QLatin1String(".exe");
 #endif
index 5941385c800191dc1eddfa6108820d873bbf1c00..0f01e614089edd2fef506ed8bee9da28d334e0db 100644 (file)
@@ -64,7 +64,7 @@ tst_qmlmin::tst_qmlmin()
 
 void tst_qmlmin::initTestCase()
 {
-    qmlminPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmlmin");
+    qmlminPath = QString(TESTBINDIR) + QLatin1String("/qmlmin");
 #ifdef Q_OS_WIN
     qmlminPath += QLatin1String(".exe");
 #endif
index 7856b1ddc8c62a75a7f349efc067111399b8156d..7eeb22474ede06c53aa705c2466533d4682dac32 100644 (file)
@@ -54,7 +54,7 @@ tst_qmlplugindump::tst_qmlplugindump()
 
 void tst_qmlplugindump::initTestCase()
 {
-    qmlplugindumpPath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+    qmlplugindumpPath = QLatin1String(TESTBINDIR);
 
 #if defined(Q_OS_WIN)
     qmlplugindumpPath += QLatin1String("/qmlplugindump.exe");
index 2dc5a8ed23cf9dcf465ca6a87b37291f70c07053..5aa031d78d6a6b8a53fe7aeeefd50d090f22bd30 100644 (file)
@@ -176,8 +176,8 @@ void tst_examples::namingConvention(const QDir &d)
 void tst_examples::namingConvention()
 {
     QStringList examplesLocations;
-    examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qml");
-    examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/quick");
+    examplesLocations << QLatin1String(TESTEXAMPLEDIR "/qml");
+    examplesLocations << QLatin1String(TESTEXAMPLEDIR "/quick");
 
     foreach(const QString &examples, examplesLocations) {
         QDir d(examples);