diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-02-26 17:12:45 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-27 13:20:19 +0100 |
commit | 9e4a215a2569a04010292c8718d0f0569bc06c12 (patch) | |
tree | fb6a266f98b23d9706e651adf4553d2617893a37 /src/testlib/qxunittestlogger.cpp | |
parent | 946d6bc329eb503682367c7445ec07d20fb21cbc (diff) |
Use new QLibraryInfo::build() in testlib to log build information.
This produces:
********* Start testing of tst_QtJson *********
Config: Using QtTest library 5.3.0, Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)
PASS : tst_QtJson::initTestCase()
<?xml version="1.0" encoding="UTF-8"?>
<TestCase name="tst_QtJson">
<Environment>
<QtVersion>5.3.0</QtVersion>
<QtBuild>Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)</QtBuild>
<QTestVersion>5.3.0</QTestVersion>
</Environment>
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="1" failures="1" tests="42" name="tst_QtJson">
<properties>
<property value="5.3.0" name="QTestVersion"/>
<property value="5.3.0" name="QtVersion"/>
<property value="Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)" name="QtBuild"/>
</properties>
<Environment>
<QtVersion>5.3.0</QtVersion>
<QtBuild>Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)</QtBuild>
<QTestVersion>5.3.0</QTestVersion>
</Environment>
[ChangeLog][QtTest] Tests now output build information.
Change-Id: I0ab473371575f2b807db725256805b8bffea3454
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/testlib/qxunittestlogger.cpp')
-rw-r--r-- | src/testlib/qxunittestlogger.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testlib/qxunittestlogger.cpp b/src/testlib/qxunittestlogger.cpp index a47f77ae49..fe5b13eeeb 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); |