Fix errors in lightxml test logger
authorJason McDonald <jason.mcdonald@nokia.com>
Wed, 31 Aug 2011 02:52:27 +0000 (12:52 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 31 Aug 2011 05:40:06 +0000 (07:40 +0200)
commit21776e926074a572316dfb4e3346423f3111d7f7
treea4a3de01cb736edc563dc5023aab0f6f8f0089c3
parentb94eba6899e4162ce2b5a98b5603289e8ec2f66e
Fix errors in lightxml test logger

The newer test logger did not produce the same light XML output as the
logger that it replaced.  In particular, it did not output the <DataTag>
tag and it incorrectly nested a <Message> tag inside the <Incident> tag
when a fatal error occured in a test.

Unfortunately, it appears that the expected lightxml output for the
selftests was produced by running tests using the newer logger, while
the selftests did not use the older lightxml logger.  Thus the errors
were not detected by the selftests.

This commit adds the older lightxml logger to the selftests, updates the
expected test data accordingly, and modifies the newer lightxml logger
to behave correctly.  This last item is achieved by making the lightxml
streamer copy most of the code from the xml streamer -- lightxml output
is supposed to be same as xml, except for the omission of the root and
<TestCase> tags.

Change-Id: Ie6e1f69dd6000df2b9d0c5c8e2109fe7bbff3956
Reviewed-on: http://codereview.qt.nokia.com/3902
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
18 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_cmptest.lightxml
tests/auto/selftests/expected_commandlinedata.lightxml
tests/auto/selftests/expected_datatable.lightxml
tests/auto/selftests/expected_datetime.lightxml
tests/auto/selftests/expected_expectfail.lightxml
tests/auto/selftests/expected_fetchbogus.lightxml
tests/auto/selftests/expected_globaldata.lightxml
tests/auto/selftests/expected_maxwarnings.lightxml
tests/auto/selftests/expected_skip.lightxml
tests/auto/selftests/expected_strcmp.lightxml
tests/auto/selftests/expected_warnings.lightxml
tests/auto/selftests/expected_xunit.lightxml
tests/auto/selftests/tst_selftests.cpp