AutoTest: Give at least minor hint about ctest failures

When running ctest we get by default only the output of ctest
without any "real" test output. Finding the respective issue
especially in bigger test applications is impossible without
re-running the test manually.
So, turn on output on failure for running ctest as long there
is no settings page for ctest.

Change-Id: I9a6468d0d43173bfcb2b140c96301449840d9517
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2021-06-15 11:41:45 +02:00
parent 439bb9c4ae
commit cb024acdaf

View File

@@ -107,6 +107,7 @@ QList<ITestConfiguration *> CTestTreeItem::testConfigurationsFor(const QStringLi
const ProjectExplorer::BuildSystem *buildSystem = target->buildSystem();
QStringList options{"--timeout", QString::number(AutotestPlugin::settings()->timeout / 1000)};
// TODO add ctest options from settings?
options << "--output-on-failure";
Utils::CommandLine command = buildSystem->commandLineForTests(selected, options);
if (command.executable().isEmpty())
return {};