summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-05-07 04:09:08 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-05-07 04:56:06 (GMT)
commit56335c9891230de3b87d401110b83656381729ac (patch)
treec06fa4ea973c5d81f1161c748560066eae4eccee /tests
parent014b5d404b19ad3d81686ba490eb7dd93efee573 (diff)
downloadQt-56335c9891230de3b87d401110b83656381729ac.zip
Qt-56335c9891230de3b87d401110b83656381729ac.tar.gz
Qt-56335c9891230de3b87d401110b83656381729ac.tar.bz2
Fixed qDebugs within tests being written as "error" tags in the
xunitxml testlog. `error' in xunit causes many xunit processing tools to consider the test as failing. This is different semantics from native testlib XML, where a qDebug is considered a message and not a failure. Change it to put qDebugs under the "system-err" tag when using xunitxml to retain semantic compatibility with testlib XML. Autotest: tst_selftests
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/selftests/expected_xunit.txt11
-rw-r--r--tests/auto/selftests/xunit/tst_xunit.cpp2
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/auto/selftests/expected_xunit.txt b/tests/auto/selftests/expected_xunit.txt
index 0f7e70a..875dda6 100644
--- a/tests/auto/selftests/expected_xunit.txt
+++ b/tests/auto/selftests/expected_xunit.txt
@@ -6,19 +6,24 @@
</properties>
<testcase result="pass" name="initTestCase"/>
<testcase result="pass" name="testFunc1">
- <error message="just a QWARN() !" type="warn"/>
+ <!-- message="just a QWARN() !" type="warn" -->
</testcase>
<testcase result="fail" name="testFunc2">
- <error message="a qDebug() call!" type="qdebug"/>
+ <!-- message="a qDebug() call with comment&#x002D;ending stuff &#x002D;&#x002D;&gt;" type="qdebug" -->
<failure message="Compared values are not the same
Actual (2): 2
Expected (3): 3" result="fail"/>
</testcase>
<testcase name="testFunc3">
- <error message="skipping this function!" type="skip"/>
+ <!-- message="skipping this function!" type="skip" -->
</testcase>
<testcase result="fail" name="testFunc4">
<failure message="a forced failure!" result="fail"/>
</testcase>
<testcase result="pass" name="cleanupTestCase"/>
+ <system-err>
+<![CDATA[just a QWARN() !]]>
+<![CDATA[a qDebug() call with comment-ending stuff -->]]>
+<![CDATA[skipping this function!]]>
+ </system-err>
</testsuite>
diff --git a/tests/auto/selftests/xunit/tst_xunit.cpp b/tests/auto/selftests/xunit/tst_xunit.cpp
index d0b585f..dbe9fec 100644
--- a/tests/auto/selftests/xunit/tst_xunit.cpp
+++ b/tests/auto/selftests/xunit/tst_xunit.cpp
@@ -67,7 +67,7 @@ void tst_Xunit::testFunc1()
void tst_Xunit::testFunc2()
{
- qDebug("a qDebug() call!");
+ qDebug("a qDebug() call with comment-ending stuff -->");
QCOMPARE(2, 3);
}