diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-09-06 18:38:54 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-09-13 14:51:00 +0200 |
commit | 5832087859c72c1e6566b0fceeaf334dba61de3d (patch) | |
tree | 6ef722d18cef9cbd1e1c424978addaf22c19fc97 /src/testlib/qteamcitylogger.cpp | |
parent | ceba44a3bf916b5e01eca5852b12e3cfa9102df4 (diff) |
Include global data tags in teamcity's test function names
Use the standard mechanism instead of a hand-rolled way of identifying
function/data-tag combinations. Adds missing data relevant to
identifying test cases, some of which previously had apparently the
same name, with no hint at why the test-case was seemingly run
repeatedly.
Change-Id: I6225c6d1990069c94a1f1c8dbb179993b96076e7
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/testlib/qteamcitylogger.cpp')
-rw-r--r-- | src/testlib/qteamcitylogger.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/testlib/qteamcitylogger.cpp b/src/testlib/qteamcitylogger.cpp index 7fe58f4792..8f2fab23d7 100644 --- a/src/testlib/qteamcitylogger.cpp +++ b/src/testlib/qteamcitylogger.cpp @@ -257,14 +257,8 @@ void QTeamCityLogger::tcEscapedString(QTestCharBuffer *buf, const char *str) con void QTeamCityLogger::escapedTestFuncName(QTestCharBuffer *buf) const { - QTestCharBuffer fn, tag; - const char *raw = QTestResult::currentTestFunction(); - tcEscapedString(&fn, raw ? raw : "UnknownTestFunc"); - raw = QTestResult::currentDataTag(); - if (raw) - tcEscapedString(&tag, raw); - - QTest::qt_asprintf(buf, "%s(%s)", fn.constData(), tag.constData()); + constexpr int TestTag = QTestPrivate::TestFunction | QTestPrivate::TestDataTag; + QTestPrivate::generateTestIdentifier(buf, TestTag); } void QTeamCityLogger::addPendingMessage(const char *type, const char *msg, |