load(qt_build_config)
CONFIG += warning_clean
+QMAKE_CXXFLAGS += -DTESTBINDIR=\\\"$$PWD/bin\\\"
+QMAKE_CXXFLAGS += -DTESTEXAMPLEDIR=\\\"$$PWD/examples\\\"
+
MODULE_VERSION = 5.11.3
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);
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")
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(),
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));
{
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"));
// 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"));
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);
}
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);
}
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);
}
// ### Still using qmlscene due to QTBUG-33377
return QQmlDebugTest::connect(
- QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene",
+ TESTBINDIR "/qmlscene",
restrictServices ? "CanvasFrameRate,EngineControl,DebugMessages" : QString(),
testFile(file), block);
}
process.setWorkingDirectory(QLatin1String(SRCDIR));
process.setProgram("python");
process.setProcessEnvironment(env);
- process.setArguments(QStringList() << "test262.py" << "--command=" + QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs" << "--parallel" << "--with-test-expectations");
+ process.setArguments(QStringList() << "test262.py" << "--command=" TESTBINDIR "/qmljs" << "--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() << 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 = QStringLiteral(TESTBINDIR "/qmlmin");
#ifdef Q_OS_WIN
qmlminPath += QLatin1String(".exe");
#endif
void tst_qmlplugindump::initTestCase()
{
QQmlDataTest::initTestCase();
- qmlplugindumpPath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+ qmlplugindumpPath = QLatin1String(TESTBINDIR);
#if defined(Q_OS_WIN)
qmlplugindumpPath += QLatin1String("/qmlplugindump.exe");
#if !defined(Q_OS_LINUX)
QSKIP("perf map files are only generated on linux");
#else
- const QString qmljs = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs";
+ const QString qmljs = QStringLiteral(TESTBINDIR "/qmljs");
QProcess process;
QTemporaryFile infile;
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);