aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/shared
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-04-20 11:53:45 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-20 12:49:58 +0200
commit47927c1f5309ad2465858bfb07b316a1d9e0685d (patch)
treea69df92567820c928f44d5791397d5f535425b36 /tests/auto/qml/debugger/shared
parentff33dce377d133c12c5741f26770ef4403650d1b (diff)
Debugger: Improve autotest output on failure
Change-Id: Ia463b198b5d6dac8e480d141412cb4475e54d204 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Diffstat (limited to 'tests/auto/qml/debugger/shared')
-rw-r--r--tests/auto/qml/debugger/shared/debugutil.cpp18
-rw-r--r--tests/auto/qml/debugger/shared/debugutil_p.h1
2 files changed, 15 insertions, 4 deletions
diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp
index 925f5372cd..eea777f09d 100644
--- a/tests/auto/qml/debugger/shared/debugutil.cpp
+++ b/tests/auto/qml/debugger/shared/debugutil.cpp
@@ -65,7 +65,7 @@ QByteArray QQmlDebugTestClient::waitForResponse()
lastMsg.clear();
QQmlDebugTest::waitForSignal(this, SIGNAL(serverMessage(QByteArray)));
if (lastMsg.isEmpty()) {
- qWarning() << "tst_QQmlDebugTestClient: no response from server!";
+ qWarning() << "no response from server!";
return QByteArray();
}
return lastMsg;
@@ -91,7 +91,7 @@ QQmlDebugProcess::QQmlDebugProcess(const QString &executable)
m_timer.setSingleShot(true);
m_timer.setInterval(5000);
connect(&m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(processAppOutput()));
- connect(&m_timer, SIGNAL(timeout()), &m_eventLoop, SLOT(quit()));
+ connect(&m_timer, SIGNAL(timeout()), SLOT(timeout()));
}
QQmlDebugProcess::~QQmlDebugProcess()
@@ -117,6 +117,13 @@ void QQmlDebugProcess::stop()
}
}
+void QQmlDebugProcess::timeout()
+{
+ qWarning() << "Timeout while waiting for QML debugging messages "
+ "in application output";
+ m_eventLoop.quit();
+}
+
bool QQmlDebugProcess::waitForSessionStart()
{
if (m_process.state() != QProcess::Running) {
@@ -153,14 +160,17 @@ void QQmlDebugProcess::processAppOutput()
const QString line = m_outputBuffer.left(nlIndex);
m_outputBuffer = m_outputBuffer.right(m_outputBuffer.size() - nlIndex - 1);
- if (line.startsWith("QML debugging is enabled")) // ignore
- continue;
if (line.startsWith("QML Debugger:")) {
if (line.contains("Waiting for connection ")) {
m_started = true;
m_eventLoop.quit();
continue;
}
+ if (line.contains("Unable to listen")) {
+ qWarning() << "App was unable to bind to port!";
+ m_eventLoop.quit();
+ continue;
+ }
}
}
m_mutex.unlock();
diff --git a/tests/auto/qml/debugger/shared/debugutil_p.h b/tests/auto/qml/debugger/shared/debugutil_p.h
index 4350056caf..0b3b8ec2a6 100644
--- a/tests/auto/qml/debugger/shared/debugutil_p.h
+++ b/tests/auto/qml/debugger/shared/debugutil_p.h
@@ -96,6 +96,7 @@ public:
void stop();
private slots:
+ void timeout();
void processAppOutput();
private: