From 2d650a624df71671d41a971483396b55c03e1f1f Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 20 Jun 2023 09:10:26 +0200 Subject: [PATCH] AutoTest: Fix quoting for boost tests Especially needed for templated boost tests to avoid handling angle brackets as redirection. Change-Id: If8c4ec87c542b6e5ba750d38e00fd6bcf0d3d952 Reviewed-by: David Schulz --- src/plugins/autotest/boost/boosttestconfiguration.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/autotest/boost/boosttestconfiguration.cpp b/src/plugins/autotest/boost/boosttestconfiguration.cpp index e581cff50ee..768161a5c0c 100644 --- a/src/plugins/autotest/boost/boosttestconfiguration.cpp +++ b/src/plugins/autotest/boost/boosttestconfiguration.cpp @@ -102,8 +102,13 @@ QStringList BoostTestConfiguration::argumentsForTestRunner(QStringList *omitted) arguments << "--detect_memory_leaks=0"; // TODO improve the test case gathering and arguments building to avoid too long command lines - for (const QString &test : testCases()) - arguments << "-t" << test; + if (isDebugRunMode()) { // debugger has its own quoting + for (const QString &test : testCases()) + arguments << "-t" << test; + } else { + for (const QString &test : testCases()) + arguments << "-t" << "\"" + test + "\""; + } if (TestSettings::instance()->processArgs()) { arguments << filterInterfering(runnable().command.arguments().split(