forked from qt-creator/qt-creator
AutoTest: Provide way to access the original test output
When running tests the original output is processed and not presented to the user at all. For crashing tests this could mean that output was not able to get processed completely (e.g. when having XML as output and relying on well-formed code) Unhandled output could also lead to incorrect results. This patch adds another view to the results pane which contains the complete output of the last test run. Change-Id: I923496e9c440de4ea68bee55415777ea5c2379c2 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -56,20 +56,7 @@ void GTestOutputReader::processOutput(const QByteArray &outputLine)
|
||||
static QRegExp errorLocation("^(.*)\\((\\d+)\\): error:.*$");
|
||||
static QRegExp iterations("^Repeating all tests \\(iteration (\\d+)\\) \\. \\. \\.$");
|
||||
|
||||
QByteArray read = outputLine;
|
||||
if (!m_unprocessed.isEmpty()) {
|
||||
read = m_unprocessed + read;
|
||||
m_unprocessed.clear();
|
||||
}
|
||||
if (!read.endsWith('\n')) {
|
||||
m_unprocessed = read;
|
||||
return;
|
||||
}
|
||||
read.chop(1); // remove the newline from the output
|
||||
if (read.endsWith('\r'))
|
||||
read.chop(1);
|
||||
|
||||
const QString line = QString::fromLatin1(read);
|
||||
const QString line = QString::fromLatin1(outputLine);
|
||||
if (line.trimmed().isEmpty())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user