MCPcopy Create free account
hub / github.com/KDE/kdevelop / testRunDebuggerScript

Method testRunDebuggerScript

plugins/debuggercommon/tests/debuggertestbase.cpp:335–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335void DebuggerTestBase::testRunDebuggerScript()
336{
337 auto* const session = createTestDebugSession();
338
339 QTemporaryFile runScript;
340
341 const auto makeScriptContents = [this] {
342 if (isLldb()) {
343 return QLatin1String{"break set --file %1 --line 28\n"}.arg(debugeeFilePath());
344 } else {
345 return QLatin1String{R"(file %1
346break main
347run
348)"}
349 .arg(KShell::quoteArg(findExecutable("debuggee_debugee").toLocalFile()));
350 }
351 };
352 OPEN_WRITE_AND_CLOSE_TEMPORARY_FILE(runScript, makeScriptContents());
353
354 TestLaunchConfiguration cfg;
355 cfg.config().writeEntry(runScriptEntryKey(), QUrl::fromLocalFile(runScript.fileName()));
356
357 const ActiveStateSessionSpy sessionSpy(session);
358 START_DEBUGGING_AND_WAIT_FOR_PAUSED_STATE_E(session, cfg, sessionSpy);
359 QCOMPARE(currentMiLine(session), 28);
360
361 session->run();
362 WAIT_FOR_STATE(session, IDebugSession::EndedState);
363}
364
365void DebuggerTestBase::testUnsupportedUrlExpressionBreakpoints()
366{

Callers

nothing calls this directly

Calls 7

currentMiLineFunction · 0.85
toLocalFileMethod · 0.80
writeEntryMethod · 0.80
findExecutableFunction · 0.70
configMethod · 0.45
fileNameMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected