forked from qt-creator/qt-creator
Debugger: Remove use of setRunParameter() for state auto test
... which are disabled anyway. Change-Id: Id15de0e5b766373570d89bacf02464e46f5b2b89 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -3699,19 +3699,16 @@ void DebuggerUnitTests::testStateMachine()
|
|||||||
ProjectExplorerPlugin::buildProject(SessionManager::startupProject());
|
ProjectExplorerPlugin::buildProject(SessionManager::startupProject());
|
||||||
loop.exec();
|
loop.exec();
|
||||||
|
|
||||||
ExecuteOnDestruction guard([] () {
|
ExecuteOnDestruction guard([] { EditorManager::closeAllEditors(false); });
|
||||||
EditorManager::closeAllEditors(false);
|
|
||||||
});
|
|
||||||
DebuggerRunParameters rp;
|
|
||||||
Target *t = SessionManager::startupProject()->activeTarget();
|
Target *t = SessionManager::startupProject()->activeTarget();
|
||||||
QVERIFY(t);
|
QVERIFY(t);
|
||||||
RunConfiguration *rc = t->activeRunConfiguration();
|
RunConfiguration *rc = t->activeRunConfiguration();
|
||||||
QVERIFY(rc);
|
QVERIFY(rc);
|
||||||
rp.inferior = rc->runnable().as<StandardRunnable>();
|
|
||||||
rp.testCase = TestNoBoundsOfCurrentFunction;
|
|
||||||
|
|
||||||
auto debugger = DebuggerRunTool::createFromRunConfiguration(rc);
|
auto debugger = DebuggerRunTool::createFromRunConfiguration(rc);
|
||||||
debugger->setRunParameters(rp);
|
debugger->setInferior(rc->runnable().as<StandardRunnable>());
|
||||||
|
debugger->setTestCase(TestNoBoundsOfCurrentFunction);
|
||||||
|
|
||||||
connect(debugger, &DebuggerRunTool::stopped,
|
connect(debugger, &DebuggerRunTool::stopped,
|
||||||
&QTestEventLoop::instance(), &QTestEventLoop::exitLoop);
|
&QTestEventLoop::instance(), &QTestEventLoop::exitLoop);
|
||||||
|
@@ -286,6 +286,11 @@ void DebuggerRunTool::setNeedFixup(bool on)
|
|||||||
m_runParameters.needFixup = on;
|
m_runParameters.needFixup = on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebuggerRunTool::setTestCase(int testCase)
|
||||||
|
{
|
||||||
|
m_runParameters.testCase = testCase;
|
||||||
|
}
|
||||||
|
|
||||||
void DebuggerRunTool::setInferior(const Runnable &runnable)
|
void DebuggerRunTool::setInferior(const Runnable &runnable)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(runnable.is<StandardRunnable>(), reportFailure(); return);
|
QTC_ASSERT(runnable.is<StandardRunnable>(), reportFailure(); return);
|
||||||
|
@@ -121,6 +121,7 @@ public:
|
|||||||
void setDeviceSymbolsRoot(const QString &deviceSymbolsRoot);
|
void setDeviceSymbolsRoot(const QString &deviceSymbolsRoot);
|
||||||
|
|
||||||
void setNeedFixup(bool on);
|
void setNeedFixup(bool on);
|
||||||
|
void setTestCase(int testCase);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void aboutToNotifyInferiorSetupOk();
|
void aboutToNotifyInferiorSetupOk();
|
||||||
|
Reference in New Issue
Block a user