fix_test_remove_qlibraryinfo
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 26 Oct 2017 13:27:02 +0000 (14:27 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 26 Oct 2017 13:27:02 +0000 (14:27 +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 8881d4bba836f4fd64f386105d0bfd71ab0b1bc6..600b4b0496dd652fa4a2b1298aa7ab505aade1eb 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.9.2
index f193d3928a411fd234e9c64207fbec44f3c2359e..37bc86032f70a0abfab93e1d287af3660d86a0c5 100644 (file)
@@ -177,7 +177,7 @@ void tst_QDebugMessageService::cleanupTestCase()
 void tst_QDebugMessageService::init()
 {
     m_connection = new QQmlDebugConnection();
-    m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml", this);
+    m_process = new QQmlDebugProcess(TESTBINDIR "/qml", this);
     m_client = new QQmlDebugMsgClient(m_connection);
 
     m_process->start(QStringList() << QLatin1String(NORMALMODE) << QQmlDataTest::instance()->testFile(QMLFILE));
index 3aa3a5c87eff6e33217da0b6bc0ecae84f2d2d7b..ef8e66e41d240b9183e3c54fcdff1d16ad95cd53 100644 (file)
@@ -87,7 +87,7 @@ bool tst_QQmlDebuggingEnabler::init(bool blockMode, bool qmlscene, int portFrom,
     connection = new QQmlDebugConnection();
 
     if (qmlscene) {
-        process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+        process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
         process->setMaximumBindErrors(1);
     } else {
         process = new QQmlDebugProcess(QCoreApplication::applicationDirPath() + QLatin1String("/qqmldebuggingenablerserver"), this);
@@ -185,7 +185,7 @@ void tst_QQmlDebuggingEnabler::qmlscene()
     QFETCH(bool, blockMode);
     QFETCH(QStringList, services);
 
-    process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene",
+    process = new QQmlDebugProcess(TESTBINDIR "/qmlscene",
                                    this);
     process->setMaximumBindErrors(1);
     process->start(QStringList()
index d248cf97087024f770547c430b853748df4f73dd..2699542d4316a0f8324e97211e2b84907a3f7bb0 100644 (file)
@@ -789,8 +789,7 @@ void tst_QQmlDebugJS::init(bool qmlscene, const QString &qmlFile, bool blockMode
 {
     connection = new QQmlDebugConnection();
     if (qmlscene)
-        process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) +
-                                       "/qmlscene", this);
+        process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
     else
         process = new QQmlDebugProcess(QCoreApplication::applicationDirPath() +
                                        QLatin1String("/qqmldebugjsserver"), this);
@@ -1457,8 +1456,7 @@ void tst_QQmlDebugJS::evaluateInLocalScope()
 void tst_QQmlDebugJS::evaluateInContext()
 {
     connection = new QQmlDebugConnection();
-    process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
-                                   + "/qmlscene", this);
+    process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
     client = new QJSDebugClient(connection);
     QScopedPointer<QQmlEngineDebugClient> engineClient(new QQmlEngineDebugClient(connection));
     process->start(QStringList() << QLatin1String(BLOCKMODE) << testFile(ONCOMPLETED_QMLFILE));
index 8092faba044b16db26e968e137ccd40dd30b8396..5a2b18a0bc51167d3f2183b74615d3f81876452d 100644 (file)
@@ -106,7 +106,7 @@ void tst_QQmlDebugService::initTestCase()
 void tst_QQmlDebugService::checkPortRange()
 {
     QQmlDebugConnection *connection1 = new QQmlDebugConnection();
-    QQmlDebugProcess *process1 = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+    QQmlDebugProcess *process1 = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
 
     process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") << testFile("test.qml"));
 
@@ -120,7 +120,7 @@ void tst_QQmlDebugService::checkPortRange()
 
     // Second instance
     QQmlDebugConnection *connection2 = new QQmlDebugConnection();
-    QQmlDebugProcess *process2 = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+    QQmlDebugProcess *process2 = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
 
     process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") << testFile("test.qml"));
 
index 2c515d7cf5551f322a42a464f3efda6b944a65aa..fd2d2a504372fc3dde8541c2e0185d5a01c9a73a 100644 (file)
@@ -95,7 +95,7 @@ private slots:
 
 void tst_QQmlEngineControl::connect(const QString &testFile, bool restrictServices)
 {
-    const QString executable = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene";
+    const QString executable = TESTBINDIR "/qmlscene";
     QStringList arguments;
     arguments << QString::fromLatin1("-qmljsdebugger=port:%1,%2,block%3")
                  .arg(STR_PORT_FROM).arg(STR_PORT_TO)
index aba9eb39ab625d29071d54fee88bb259ec44eafd..24d71b3c61b683fe92c6f14400a6b07ef777c15b 100644 (file)
@@ -107,7 +107,7 @@ void tst_QQmlEngineDebugInspectorIntegration::init(bool restrictServices)
             .arg(restrictServices ? QStringLiteral(",services:QmlDebugger,QmlInspector") :
                                     QString());
 
-    m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+    m_process = new QQmlDebugProcess(TESTBINDIR "/qml",
                                      this);
     m_process->start(QStringList() << argument << testFile("qtquick2.qml"));
     QVERIFY2(m_process->waitForSessionStart(),
index 9461922effeba7e8192ca29dc9c643342fa3a817..ee0f5516741c0f1dbab4e063069cf4110805eec2 100644 (file)
@@ -73,8 +73,7 @@ void tst_QQmlInspector::startQmlProcess(const QString &qmlFile, bool restrictSer
             .arg(STR_PORT_FROM).arg(STR_PORT_TO)
             .arg(restrictServices ? QStringLiteral(",services:QmlInspector") : QString());
 
-    m_process.reset(new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) +
-                                         "/qml"));
+    m_process.reset(new QQmlDebugProcess(TESTBINDIR "/qml"));
     // Make sure the animation timing is exact
     m_process->addEnvironment(QLatin1String("QSG_RENDER_LOOP=basic"));
     m_process->start(QStringList() << argument << testFile(qmlFile));
index b8e1f1f21dc8a70d0b2fc028f65340c1ab98e457..f853caa16ead2825063594679d495bbd736777a2 100644 (file)
@@ -319,7 +319,7 @@ private slots:
 void tst_QQmlProfilerService::connect(bool block, const QString &testFile, bool restrictServices)
 {
     // ### Still using qmlscene due to QTBUG-33377
-    const QString executable = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene";
+    const QString executable = TESTBINDIR "/qmlscene";
     QStringList arguments;
     arguments << QString::fromLatin1("-qmljsdebugger=port:%1,%2%3%4")
                  .arg(STR_PORT_FROM).arg(STR_PORT_TO)
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 b69071dd59a929ec7c3d3f7a3ae9b0098d48c86f..9498417728035ae3486b67b6c052daf3ad20dbe3 100644 (file)
@@ -73,7 +73,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 171c2bda8ae3bb164eb12b886eefb152818dbf1a..06fafea7ff292273fbd0af5267c655807d362cb1 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 838966e2a06ab81bf658a7425dfabaf9718b7519..d94a38e0e216514aae60a8c02d1808c78f5bd6b2 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 b6742b9efe2208f241702415f300804e4883ce8d..d3f45389406832fd86bdbd087a5b0c29ffa3b253 100644 (file)
@@ -174,8 +174,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);