load(qt_build_config)
CONFIG += warning_clean
+QMAKE_CXXFLAGS += -DTESTBINDIR=\\\"$$PWD/bin\\\"
+QMAKE_CXXFLAGS += -DTESTEXAMPLEDIR=\\\"$$PWD/examples\\\"
+
MODULE_VERSION = 5.9.2
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));
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);
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()
{
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);
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));
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"));
// 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"));
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)
.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(),
.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));
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)
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();
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())
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
void tst_qmlmin::initTestCase()
{
- qmlminPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmlmin");
+ qmlminPath = QString(TESTBINDIR) + QLatin1String("/qmlmin");
#ifdef Q_OS_WIN
qmlminPath += QLatin1String(".exe");
#endif
void tst_qmlplugindump::initTestCase()
{
- qmlplugindumpPath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+ qmlplugindumpPath = QLatin1String(TESTBINDIR);
#if defined(Q_OS_WIN)
qmlplugindumpPath += QLatin1String("/qmlplugindump.exe");
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);