aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-03-16 16:44:24 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-25 11:46:16 +0200
commitb70c84564a135090740d2db98c04bf9ee8a6a4aa (patch)
treef4c13700e953f92564edd827357b997314931485 /tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
parenta5d4efbc0035a0a3356e6d69a7b7b1c2d17ff253 (diff)
Debugger: Improve output of autotests
Change-Id: Ib938d2f39d8a0928c257ef923df5d5fcfa85c4cf Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Diffstat (limited to 'tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp')
-rw-r--r--tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
index 8473774ae6..5df196cb24 100644
--- a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
+++ b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
@@ -183,20 +183,24 @@ void tst_QDebugMessageService::init()
m_client = new QQmlDebugMsgClient(m_connection);
m_process->start(QStringList() << QLatin1String(NORMALMODE) << QQmlDataTest::instance()->testFile(QMLFILE));
- if (!m_process->waitForSessionStart()) {
- QFAIL(QString("Could not launch app. Application output: \n%1").arg(m_process->output()).toAscii());
- }
+ QVERIFY2(m_process->waitForSessionStart(),
+ "Could not launch application, or did not get 'Waiting for connection'.");
m_connection->connectToHost("127.0.0.1", 3777);
QVERIFY(m_connection->waitForConnected());
- QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(enabled())));
+ if (m_client->state() != QQmlDebugClient::Enabled)
+ QQmlDebugTest::waitForSignal(m_client, SIGNAL(enabled()));
+
+ QVERIFY(m_client->state() == QQmlDebugClient::Enabled);
}
void tst_QDebugMessageService::cleanup()
{
- if (QTest::currentTestFailed())
- qDebug() << m_process->output();
+ if (QTest::currentTestFailed()) {
+ qDebug() << "Process State:" << m_process->state();
+ qDebug() << "Application Output:" << m_process->output();
+ }
if (m_process)
delete m_process;