forked from qt-creator/qt-creator
AutoTest: Test execution from result output pane
Enable test execution via context menu in the result output pane. At the moment only gtest is supported. Task-number: QTCREATORBUG-16695 Change-Id: Ib39164c3cb44d249647b11e25dc51c9ac5db89c5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -301,25 +301,7 @@ void TestNavigationWidget::onRunThisTestTriggered(TestRunMode runMode)
|
||||
return;
|
||||
|
||||
TestTreeItem *item = static_cast<TestTreeItem *>(sourceIndex.internalPointer());
|
||||
TestConfiguration *configuration;
|
||||
switch (runMode) {
|
||||
case TestRunMode::Run:
|
||||
case TestRunMode::RunWithoutDeploy:
|
||||
configuration = item->testConfiguration();
|
||||
break;
|
||||
case TestRunMode::Debug:
|
||||
case TestRunMode::DebugWithoutDeploy:
|
||||
configuration = item->debugConfiguration();
|
||||
break;
|
||||
default:
|
||||
configuration = nullptr;
|
||||
}
|
||||
|
||||
if (configuration) {
|
||||
TestRunner *runner = TestRunner::instance();
|
||||
runner->setSelectedTests({configuration});
|
||||
runner->prepareToRunTests(runMode);
|
||||
}
|
||||
TestRunner::instance()->runTest(runMode, item);
|
||||
}
|
||||
|
||||
TestNavigationWidgetFactory::TestNavigationWidgetFactory()
|
||||
|
||||
Reference in New Issue
Block a user