forked from qt-creator/qt-creator
AutoTest: Fix summary for boost
Do not take skipped tests into account when computing passes out of the available information. These are handled separately and may lead to a negative passes amount. Change-Id: I47bb1f054468dc5374d0d4e7fdeb3ad87efd0dff Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -206,8 +206,6 @@ void BoostTestOutputReader::processOutputLine(const QByteArray &outputLine)
|
|||||||
|
|
||||||
static QRegularExpression finish("^\\*{3} (\\d+) failure(s are| is) detected in the "
|
static QRegularExpression finish("^\\*{3} (\\d+) failure(s are| is) detected in the "
|
||||||
"test module \"(.*)\"$");
|
"test module \"(.*)\"$");
|
||||||
static QRegularExpression errDetect("^\\*{3} Errors where detected in the "
|
|
||||||
"test module \"(.*}\"; see standard output for details");
|
|
||||||
QString noErrors("*** No errors detected");
|
QString noErrors("*** No errors detected");
|
||||||
|
|
||||||
const QString line = removeCommandlineColors(QString::fromUtf8(outputLine));
|
const QString line = removeCommandlineColors(QString::fromUtf8(outputLine));
|
||||||
@@ -340,8 +338,7 @@ void BoostTestOutputReader::processOutputLine(const QByteArray &outputLine)
|
|||||||
BoostTestResult *result = new BoostTestResult(id(), m_projectFile, QString());
|
BoostTestResult *result = new BoostTestResult(id(), m_projectFile, QString());
|
||||||
int failed = match.captured(1).toInt();
|
int failed = match.captured(1).toInt();
|
||||||
QString txt = tr("%1 failures detected in %2.").arg(failed).arg(match.captured(3));
|
QString txt = tr("%1 failures detected in %2.").arg(failed).arg(match.captured(3));
|
||||||
int passed = (m_testCaseCount != -1)
|
int passed = (m_testCaseCount != -1) ? m_testCaseCount - failed : -1;
|
||||||
? m_testCaseCount - failed - m_summary[ResultType::Skip] : -1;
|
|
||||||
if (m_testCaseCount != -1)
|
if (m_testCaseCount != -1)
|
||||||
txt.append(' ').append(tr("%1 tests passed.").arg(passed));
|
txt.append(' ').append(tr("%1 tests passed.").arg(passed));
|
||||||
result->setDescription(txt);
|
result->setDescription(txt);
|
||||||
|
Reference in New Issue
Block a user