Commit 503a73d5 authored by hjk's avatar hjk Committed by Christian Stenger

AutoTest: Use new setter based DebuggerRunTool interface

Change-Id: I559bef1b088af9009247542730208d18b514b118
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent d34f33d8
......@@ -330,13 +330,6 @@ void TestRunner::debugTests()
return;
}
Debugger::DebuggerStartParameters sp;
sp.inferior.executable = commandFilePath;
sp.inferior.commandLineArguments = config->argumentsForTestRunner().join(' ');
sp.inferior.environment = config->environment();
sp.inferior.workingDirectory = config->workingDirectory();
sp.displayName = config->displayName();
QString errorMessage;
auto runControl = new ProjectExplorer::RunControl(config->runConfiguration(),
ProjectExplorer::Constants::DEBUG_RUN_MODE);
......@@ -347,7 +340,15 @@ void TestRunner::debugTests()
return;
}
(void) new Debugger::DebuggerRunTool(runControl, sp);
ProjectExplorer::StandardRunnable inferior;
inferior.executable = commandFilePath;
inferior.commandLineArguments = config->argumentsForTestRunner().join(' ');
inferior.environment = config->environment();
inferior.workingDirectory = config->workingDirectory();
auto debugger = new Debugger::DebuggerRunTool(runControl);
debugger->setInferior(inferior);
debugger->setRunControlName(config->displayName());
bool useOutputProcessor = true;
if (ProjectExplorer::Target *targ = config->project()->activeTarget()) {
......
......@@ -246,6 +246,11 @@ void DebuggerRunTool::setInferior(const Runnable &runnable)
m_runParameters.inferior = runnable.as<StandardRunnable>();
}
void DebuggerRunTool::setRunControlName(const QString &name)
{
m_runParameters.displayName = name;
}
void DebuggerRunTool::appendInferiorCommandLineArgument(const QString &arg)
{
if (!m_runParameters.inferior.commandLineArguments.isEmpty())
......
......@@ -83,6 +83,7 @@ public:
static void setBreakOnMainNextTime();
void setInferior(const ProjectExplorer::Runnable &runnable);
void setRunControlName(const QString &name);
void appendInferiorCommandLineArgument(const QString &arg);
void prependInferiorCommandLineArgument(const QString &arg);
void addQmlServerInferiorCommandLineArgumentIfNeeded();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment