forked from qt-creator/qt-creator
Add stop button and minor preparation for progress bar
This commit is contained in:
committed by
Christian Stenger
parent
345b4de47a
commit
431d15bd0c
@@ -104,10 +104,16 @@ void TestRunner::runTests()
|
||||
}
|
||||
}
|
||||
|
||||
int testCaseCount = 0;
|
||||
foreach (const TestConfiguration *config, m_selectedTests)
|
||||
testCaseCount += config->testCaseCount();
|
||||
|
||||
// clear old log and output pane
|
||||
m_xmlLog.clear();
|
||||
TestResultsPane::instance()->clearContents();
|
||||
|
||||
emit testRunStarted();
|
||||
|
||||
foreach (TestConfiguration *tc, m_selectedTests) {
|
||||
QString cmd = tc->targetFile();
|
||||
QString workDir = tc->workingDirectory();
|
||||
@@ -121,11 +127,18 @@ void TestRunner::runTests()
|
||||
exec(cmd, args, workDir, env);
|
||||
}
|
||||
qDebug("test run finished");
|
||||
emit testRunFinished();
|
||||
}
|
||||
|
||||
void TestRunner::stopTestRun()
|
||||
{
|
||||
|
||||
if (m_runner.state() != QProcess::NotRunning) {
|
||||
m_runner.kill();
|
||||
m_runner.waitForFinished();
|
||||
TestResultsPane::instance()->addTestResult(
|
||||
TestResult(QString(), QString(), QString(), ResultType::MESSAGE_FATAL,
|
||||
tr("*** Test Run canceled by user ***")));
|
||||
}
|
||||
}
|
||||
|
||||
/******************** XML line parser helper ********************/
|
||||
|
||||
Reference in New Issue
Block a user