Merge remote-tracking branch 'origin/9.0'

Change-Id: I73396bcd07852ff5e01d73b06ebd64ab6af802e5
This commit is contained in:
Eike Ziller
2023-01-18 10:02:35 +01:00
3 changed files with 17 additions and 12 deletions

View File

@@ -10,11 +10,22 @@
#include "../itestframework.h"
#include "../testsettings.h"
#include <utils/algorithm.h>
#include <utils/stringutils.h>
namespace Autotest {
namespace Internal {
static QStringList quoteIfNeeded(const QStringList &testCases, bool debugMode)
{
if (debugMode)
return testCases;
return Utils::transform(testCases, [](const QString &testCase){
return testCase.contains(' ') ? '"' + testCase + '"' : testCase;
});
}
TestOutputReader *QtTestConfiguration::outputReader(const QFutureInterface<TestResultPtr> &fi,
Utils::QtcProcess *app) const
{
@@ -39,7 +50,7 @@ QStringList QtTestConfiguration::argumentsForTestRunner(QStringList *omitted) co
if (qtSettings->useXMLOutput.value())
arguments << "-xml";
if (!testCases().isEmpty())
arguments << testCases();
arguments << quoteIfNeeded(testCases(), isDebugRunMode());
const QString &metricsOption = QtTestSettings::metricsTypeToOption(MetricsType(qtSettings->metrics.value()));
if (!metricsOption.isEmpty())