diff options
author | Liang Qi <liang.qi@qt.io> | 2019-02-08 09:28:00 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-02-08 12:31:02 +0100 |
commit | fbfacd33be482fa3cf0aa5cffaf7006d538a2f92 (patch) | |
tree | 92da72786b3740e37004623612c4fc1c9640d30f /src/testlib/qtaptestlogger.cpp | |
parent | c1f4286a5cbc1794fe7be5bdbbd6a0bf29ef84d4 (diff) | |
parent | 74e04d6ace7aa949db97ae2e46c38a4dc0d4d36a (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/android/templates/AndroidManifest.xml
src/network/ssl/qsslsocket_mac.cpp
src/widgets/styles/qstylesheetstyle.cpp
tests/auto/corelib/kernel/qtimer/BLACKLIST
tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
tests/auto/testlib/selftests/expected_blacklisted.lightxml
tests/auto/testlib/selftests/expected_blacklisted.tap
tests/auto/testlib/selftests/expected_blacklisted.teamcity
tests/auto/testlib/selftests/expected_blacklisted.txt
tests/auto/testlib/selftests/expected_blacklisted.xml
tests/auto/testlib/selftests/expected_blacklisted.xunitxml
tests/auto/testlib/selftests/expected_float.tap
tests/auto/testlib/selftests/expected_float.teamcity
tests/auto/testlib/selftests/expected_float.txt
tests/auto/testlib/selftests/expected_float.xunitxml
Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
Diffstat (limited to 'src/testlib/qtaptestlogger.cpp')
-rw-r--r-- | src/testlib/qtaptestlogger.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/testlib/qtaptestlogger.cpp b/src/testlib/qtaptestlogger.cpp index 37ab89ac91..540b36e273 100644 --- a/src/testlib/qtaptestlogger.cpp +++ b/src/testlib/qtaptestlogger.cpp @@ -43,7 +43,9 @@ #include "qtestresult_p.h" #include "qtestassert.h" -#include <QtCore/qregularexpression.h> +#if QT_CONFIG(regularexpression) +# include <QtCore/qregularexpression.h> +#endif QT_BEGIN_NAMESPACE @@ -121,13 +123,15 @@ void QTapTestLogger::addIncident(IncidentTypes type, const char *description, return; } - bool ok = type == Pass || type == XPass || type == BlacklistedPass; + bool ok = type == Pass || type == XPass || type == BlacklistedPass || type == BlacklistedXPass; QTestCharBuffer directive; - if (type == XFail || type == XPass || type == BlacklistedFail || type == BlacklistedPass) + if (type == XFail || type == XPass || type == BlacklistedFail || type == BlacklistedPass + || type == BlacklistedXFail || type == BlacklistedXPass) { // We treat expected or blacklisted failures/passes as TODO-failures/passes, // which should be treated as soft issues by consumers. Not all do though :/ QTest::qt_asprintf(&directive, " # TODO %s", description); + } int testNumber = QTestLog::totalCount(); if (type == XFail) { @@ -146,6 +150,7 @@ void QTapTestLogger::addIncident(IncidentTypes type, const char *description, outputString(YAML_INDENT "---\n"); if (type != XFail) { +#if QT_CONFIG(regularexpression) // This is fragile, but unfortunately testlib doesn't plumb // the expected and actual values to the loggers (yet). static QRegularExpression verifyRegex( @@ -206,6 +211,12 @@ void QTapTestLogger::addIncident(IncidentTypes type, const char *description, YAML_INDENT "# %s\n", description); outputString(unparsableDescription.data()); } +#else + QTestCharBuffer unparsableDescription; + QTest::qt_asprintf(&unparsableDescription, + YAML_INDENT "# %s\n", description); + outputString(unparsableDescription.data()); +#endif } if (file) { |