summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/tst_selftests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/testlib/selftests/tst_selftests.cpp')
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index d25ea57183..def96e8a65 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -229,6 +229,13 @@ bool compareOutput(const QString &logger, const QString &subdir,
QString expectedLine = QString::fromLatin1(expected.at(i));
expectedLine.replace(qtVersionPlaceHolder(), qtVersion);
+ if (logger.endsWith(QLatin1String("junitxml"))) {
+ static QRegularExpression timestampRegex("timestamp=\".*?\"");
+ actualLine.replace(timestampRegex, "timestamp=\"@TEST_START_TIME@\"");
+ static QRegularExpression timeRegex("time=\".*?\"");
+ actualLine.replace(timeRegex, "time=\"@TEST_DURATION@\"");
+ }
+
// Special handling for ignoring _FILE_ and _LINE_ if logger is teamcity
if (logger.endsWith(QLatin1String("teamcity"))) {
static QRegularExpression teamcityLocRegExp("\\|\\[Loc: .*\\(\\d*\\)\\|\\]");