Make lightxml and xml log formatting consistent
authorJason McDonald <jason.mcdonald@nokia.com>
Tue, 30 Aug 2011 09:54:32 +0000 (19:54 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 31 Aug 2011 05:39:54 +0000 (07:39 +0200)
For XML logs, an Incident tag with no sub-tags has a space before the
closing slash.  For Light XML logs, this space was missing unless the
-flush command line option was supplied.

Change-Id: I6de2e140f9309f333b5b97ed7f8116e4e727a149
Reviewed-on: http://codereview.qt.nokia.com/3871
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
29 files changed:
src/testlib/qtestlightxmlstreamer.cpp
tests/auto/selftests/expected_assert.lightxml
tests/auto/selftests/expected_badxml.lightxml
tests/auto/selftests/expected_benchlibcallgrind.lightxml
tests/auto/selftests/expected_benchlibeventcounter.lightxml
tests/auto/selftests/expected_benchliboptions.lightxml
tests/auto/selftests/expected_benchlibtickcounter.lightxml
tests/auto/selftests/expected_benchlibwalltime.lightxml
tests/auto/selftests/expected_cmptest.lightxml
tests/auto/selftests/expected_commandlinedata.lightxml
tests/auto/selftests/expected_crashes.lightxml
tests/auto/selftests/expected_datatable.lightxml
tests/auto/selftests/expected_datetime.lightxml
tests/auto/selftests/expected_exceptionthrow.lightxml
tests/auto/selftests/expected_expectfail.lightxml
tests/auto/selftests/expected_failinit.lightxml
tests/auto/selftests/expected_fetchbogus.lightxml
tests/auto/selftests/expected_globaldata.lightxml
tests/auto/selftests/expected_longstring.lightxml
tests/auto/selftests/expected_maxwarnings.lightxml
tests/auto/selftests/expected_multiexec.lightxml
tests/auto/selftests/expected_singleskip.lightxml
tests/auto/selftests/expected_skip.lightxml
tests/auto/selftests/expected_skipinit.lightxml
tests/auto/selftests/expected_sleep.lightxml
tests/auto/selftests/expected_strcmp.lightxml
tests/auto/selftests/expected_subtest.lightxml
tests/auto/selftests/expected_warnings.lightxml
tests/auto/selftests/expected_xunit.lightxml

index c0010cc..892c0fd 100644 (file)
@@ -152,7 +152,7 @@ void QTestLightXmlStreamer::formatBeforeAttributes(const QTestElement *element,
                 element->attributeValue(QTest::AI_Line));
 
         if( !element->childElements() )
-            QTest::qt_asprintf(formatted, "<Incident type=\"%s\" %s/>\n",
+            QTest::qt_asprintf(formatted, "<Incident type=\"%s\" %s />\n",
                     element->attributeValue(QTest::AI_Result), buf.constData());
         else
             QTest::qt_asprintf(formatted, "<Incident type=\"%s\" %s>\n",
index f49cdf0..e24545f 100644 (file)
@@ -3,10 +3,10 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="testNumber1">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="testNumber2">
 <Incident type="fail" file="Unknown file" line="0">
index 0875a62..57bcf84 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="badDataTag">
 <Incident type="fail" file="/local/user_builds/qt/4.6/tests/auto/selftests/badxml/tst_badxml.cpp" line="109">
@@ -51,5 +51,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index bdc3d77..dd5319f 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="twoHundredMillionInstructions">
 <Incident type="pass" file="" line="0">
@@ -11,5 +11,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 218f4c8..a6150a9 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="events">
 <Incident type="pass" file="" line="0">
@@ -17,5 +17,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 7a42cc7..63d0218 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="threeEvents">
 <Incident type="pass" file="" line="0">
@@ -11,5 +11,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index ea926c2..845fd9c 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="threeBillionTicks">
 <Incident type="pass" file="" line="0">
@@ -11,5 +11,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 500647d..f1d8932 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<ncident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="waitForOneThousand">
 <Incident type="pass" file="" line="0">
@@ -21,5 +21,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index a6d35e4..910d812 100644 (file)
@@ -3,13 +3,13 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="compare_boolfuncs">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="compare_pointerfuncs">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="compare_tostring">
 <Incident type="fail" file="/local/user_builds/qt/4.6/tests/auto/selftests/cmptest/tst_cmptest.cpp" line="122">
@@ -28,5 +28,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index ad1f893..b6ca869 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="fiveTablePasses">
 <Incident type="pass" file="" line="0">
@@ -32,5 +32,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 2eee3cc..76890de 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="crash">
 <Incident type="fail" file="Unknown file" line="0">
index a1c9d2b..7e73762 100644 (file)
@@ -3,16 +3,16 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="singleTestFunction1">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="singleTestFunction2">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="fiveTablePasses">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="fiveTableFailures">
 <Incident type="fail" file="/local/user_builds/qt/4.6/tests/auto/selftests/datatable/tst_datatable.cpp" line="91">
@@ -48,5 +48,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index edad6aa..abc2930 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="dateTime">
 <Incident type="fail" file="/local/user_builds/qt/4.6/tests/auto/selftests/datetime/tst_datetime.cpp" line="66">
@@ -23,5 +23,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 90371e4..0b8de0a 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="throwException">
 <Incident type="fail" file="/local/user_builds/qt/4.6/src/testlib/qtestcase.cpp" line="1691">
index d3fb05b..1b77cf6 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="expectAndContinue">
 <Incident type="xfail" file="/local/user_builds/qt/4.6/tests/auto/selftests/expectfail/tst_expectfail.cpp" line="60">
@@ -31,5 +31,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 93a4e3f..0edf225 100644 (file)
@@ -8,5 +8,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index c53d851..b8ecaef 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="fetchBogus">
 <Incident type="fail" file="Unknown file" line="0">
index 2d195ee..7e24589 100644 (file)
@@ -3,10 +3,10 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="testGlobal">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="skip">
 <Message type="skip" file="/local/user_builds/qt/4.6/tests/auto/selftests/globaldata/tst_globaldata.cpp" line="128">
@@ -26,5 +26,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index a186ccc..945a9f3 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="failWithLongString">
 <Incident type="fail" file="/local/user_builds/qt/4.6/tests/auto/selftests/longstring/tst_longstring.cpp" line="67">
@@ -19,5 +19,5 @@ Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitu
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index f9320ea..a5475c4 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="warn">
 <Incident type="pass" file="" line="0">
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 1f42eac..1a66e92 100644 (file)
@@ -3,11 +3,11 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="nothing">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 971a999..bcddcae 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="myTest">
 <Message type="skip" file="/local/user_builds/qt/4.6/tests/auto/selftests/singleskip/tst_singleskip.cpp" line="56">
@@ -11,5 +11,5 @@
 </Message>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 145704e..474fccc 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="test">
 <Message type="skip" file="/local/user_builds/qt/4.6/tests/auto/selftests/skip/tst_skip.cpp" line="68">
@@ -26,5 +26,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index ea07bd7..005169e 100644 (file)
@@ -8,5 +8,5 @@
 </Message>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index d7e8ea9..1a056c8 100644 (file)
@@ -3,11 +3,11 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="sleep">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 40b5da4..ede19b8 100644 (file)
@@ -3,10 +3,10 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="compareCharStars">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="compareByteArray">
 <Incident type="fail" file="/local/user_builds/qt/4.6/tests/auto/selftests/strcmp/tst_strcmp.cpp" line="88">
@@ -47,5 +47,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index c2b8d4d..00c1a99 100644 (file)
@@ -3,13 +3,13 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="test1">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="test2">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="test3">
 <Incident type="fail" file="/local/user_builds/qt/4.6/tests/auto/selftests/subtest/tst_subtest.cpp" line="157">
@@ -45,5 +45,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 4e0ae8a..c91d9d5 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="testWarnings">
 <Incident type="pass" file="" line="0">
@@ -39,5 +39,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
index 726f08d..f276c05 100644 (file)
@@ -3,7 +3,7 @@
     <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
 </Environment>
 <TestFunction name="initTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>
 <TestFunction name="testFunc1">
 <Incident type="pass" file="" line="0">
@@ -48,5 +48,5 @@
 </Incident>
 </TestFunction>
 <TestFunction name="cleanupTestCase">
-<Incident type="pass" file="" line="0"/>
+<Incident type="pass" file="" line="0" />
 </TestFunction>