AutoTest: Fix debugging of gtest based tests

Amends 6ae6390661.

Fixes: QTCREATORBUG-28504
Change-Id: I7617b080f4ac872c1f806a8e89fa9084a0ac948f
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2022-11-25 13:45:28 +01:00
parent cb8742ccab
commit c210ffb2d6

View File

@@ -60,8 +60,12 @@ QStringList GTestConfiguration::argumentsForTestRunner(QStringList *omitted) con
}
const QStringList &testSets = testCases();
if (!testSets.isEmpty())
arguments << "--gtest_filter=\"" + testSets.join(':') + '"';
if (!testSets.isEmpty()) {
if (isDebugRunMode()) // debugger does its own special quoting
arguments << "--gtest_filter=" + testSets.join(':');
else
arguments << "--gtest_filter=\"" + testSets.join(':') + '"';
}
auto gSettings = static_cast<GTestSettings *>(framework()->testSettings());
if (!gSettings)