JUnit: Don't turn seconds into kilo-seconds

Overlooked in the review where this changed, this value was already in
seconds and needs to be converted to millis before converting back.

Now printing output such as:

<testcase name="initTestCase" classname="tst_QHash" time="0.001"/>

Amends bb74e72aa92b599cb4c80c23161ce9b66639ec01

Pick-to: 6.2 6.3 6.4 6.4.0
Fixes: QTBUG-106222
Change-Id: I1f8b774eea3dcbe2b4e822e2b0b2efb1ccc01abb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Mårten Nordheim 2022-09-07 11:07:32 +02:00
parent 522a93e303
commit 95e315a66e

View File

@ -179,7 +179,7 @@ void QJUnitTestLogger::leaveTestFunction()
void QJUnitTestLogger::leaveTestCase()
{
currentTestCase->addAttribute(QTest::AI_Time,
toSecondsFormat(elapsedTestCaseSeconds()).constData());
toSecondsFormat(elapsedTestCaseSeconds() * 1000).constData());
if (!systemOutputElement->childElements().empty())
currentTestCase->addChild(systemOutputElement);