diff options
Diffstat (limited to 'src/testlib/qxunittestlogger.cpp')
-rw-r--r-- | src/testlib/qxunittestlogger.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/testlib/qxunittestlogger.cpp b/src/testlib/qxunittestlogger.cpp index a47f77ae49..5d860cf1c9 100644 --- a/src/testlib/qxunittestlogger.cpp +++ b/src/testlib/qxunittestlogger.cpp @@ -46,6 +46,15 @@ #include <QtTest/private/qtestresult_p.h> #include <QtTest/private/qbenchmark_p.h> +#ifdef min // windows.h without NOMINMAX is included by the benchmark headers. +# undef min +#endif +#ifdef max +# undef max +#endif + +#include <QtCore/qlibraryinfo.h> + #include <string.h> QT_BEGIN_NAMESPACE @@ -108,6 +117,11 @@ void QXunitTestLogger::stopLogging() property->addAttribute(QTest::AI_PropertyValue, qVersion()); properties->addLogElement(property); + property = new QTestElement(QTest::LET_Property); + property->addAttribute(QTest::AI_Name, "QtBuild"); + property->addAttribute(QTest::AI_PropertyValue, QLibraryInfo::build()); + properties->addLogElement(property); + currentLogElement->addLogElement(properties); currentLogElement->addLogElement(iterator); @@ -161,6 +175,13 @@ void QXunitTestLogger::addIncident(IncidentTypes type, const char *description, ++failureCounter; typeBuf = "fail"; break; + case QAbstractTestLogger::BlacklistedPass: + typeBuf = "bpass"; + break; + case QAbstractTestLogger::BlacklistedFail: + ++failureCounter; + typeBuf = "bfail"; + break; default: typeBuf = "??????"; break; @@ -193,6 +214,13 @@ void QXunitTestLogger::addIncident(IncidentTypes type, const char *description, if (!strcmp(oldResult, "pass")) { overwrite = true; } + else if (!strcmp(oldResult, "bpass")) { + overwrite = (type == QAbstractTestLogger::XPass || type == QAbstractTestLogger::Fail) || (type == QAbstractTestLogger::XFail) + || (type == QAbstractTestLogger::BlacklistedFail); + } + else if (!strcmp(oldResult, "bfail")) { + overwrite = (type == QAbstractTestLogger::XPass || type == QAbstractTestLogger::Fail) || (type == QAbstractTestLogger::XFail); + } else if (!strcmp(oldResult, "xfail")) { overwrite = (type == QAbstractTestLogger::XPass || type == QAbstractTestLogger::Fail); } |