From: Debian Qt/KDE Maintainers Date: Mon, 2 Jan 2017 15:15:42 +0000 (+0000) Subject: fix_test_remove_qlibraryinfo X-Git-Tag: archive/raspbian/5.7.1-2+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=731eea70d50952689612275a450e2dc5aab3c8d3;p=qtdeclarative-opensource-src.git fix_test_remove_qlibraryinfo Gbp-Pq: Name fix_test_remove_qlibraryinfo.patch --- diff --git a/.qmake.conf b/.qmake.conf index 45d16f297..bc5023ee1 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,4 +1,7 @@ load(qt_build_config) CONFIG += warning_clean +QMAKE_CXXFLAGS += -DTESTBINDIR=\\\"$$PWD/bin\\\" +QMAKE_CXXFLAGS += -DTESTEXAMPLEDIR=\\\"$$PWD/examples\\\" + MODULE_VERSION = 5.7.1 diff --git a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp index 8be82c30f..d7cf8f929 100644 --- a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp +++ b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp @@ -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)); diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp index 8d1a16524..6a1183cd3 100644 --- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp +++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp @@ -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); @@ -174,7 +174,7 @@ void tst_QQmlDebuggingEnabler::qmlscene() connection = new QQmlDebugConnection(); QList clients = QQmlDebugTest::createOtherClients(connection); - process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", + process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this); process->setMaximumBindErrors(1); process->start(QStringList() diff --git a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp index b800cc371..c5b5702be 100644 --- a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp +++ b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp @@ -780,8 +780,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); diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp index 8092faba0..5a2b18a0b 100644 --- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp +++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp @@ -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")); diff --git a/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp b/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp index 3f8731ce6..1d8e2bb5c 100644 --- a/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp +++ b/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp @@ -94,7 +94,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) diff --git a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp index 940f89e93..f99f0bc23 100644 --- a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp @@ -106,7 +106,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(), diff --git a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp index f55fef232..b48b43ebd 100644 --- a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp +++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp @@ -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)); diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index 4f9088d67..830f9396d 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -297,7 +297,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) diff --git a/tests/auto/qml/qmllint/main.cpp b/tests/auto/qml/qmllint/main.cpp index eedbd7c2f..1e4b6e2fa 100644 --- a/tests/auto/qml/qmllint/main.cpp +++ b/tests/auto/qml/qmllint/main.cpp @@ -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 diff --git a/tests/auto/qml/qmlmin/tst_qmlmin.cpp b/tests/auto/qml/qmlmin/tst_qmlmin.cpp index 7e4a643ff..7b8cbbf45 100644 --- a/tests/auto/qml/qmlmin/tst_qmlmin.cpp +++ b/tests/auto/qml/qmlmin/tst_qmlmin.cpp @@ -62,7 +62,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 diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp index ee417bb48..29fc145d9 100644 --- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp +++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp @@ -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"); diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index 233cb3363..63bdb4d44 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -169,8 +169,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);