Autotest: Add more "without deployment" actions

When debugging tests, if there was no change in code, user should be
able to just rerun tests of his choice. However, currently there are not
so many options to just rerun tests without the build.
This patch adds more options to run tests without deployment, which can
speed up development in some environments

Change-Id: I9f998fee90f2e61a1623bd0840a9d5ddf8eb58d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Petar Perisin
2021-07-08 16:57:00 +02:00
parent 622a03f63c
commit d005e71da0
4 changed files with 95 additions and 27 deletions

View File

@@ -648,6 +648,13 @@ void TestResultsPane::onCustomContextMenuRequested(const QPoint &pos)
});
menu.addAction(action);
action = new QAction(tr("Run This Test Without Deployment"), &menu);
action->setEnabled(correlatingItem && correlatingItem->canProvideTestConfiguration());
connect(action, &QAction::triggered, this, [this, clicked] {
onRunThisTestTriggered(TestRunMode::RunWithoutDeploy, clicked);
});
menu.addAction(action);
action = new QAction(tr("Debug This Test"), &menu);
bool debugEnabled = false;
if (correlatingItem) {
@@ -662,6 +669,13 @@ void TestResultsPane::onCustomContextMenuRequested(const QPoint &pos)
});
menu.addAction(action);
action = new QAction(tr("Debug This Test Without Deployment"), &menu);
action->setEnabled(debugEnabled);
connect(action, &QAction::triggered, this, [this, clicked] {
onRunThisTestTriggered(TestRunMode::DebugWithoutDeploy, clicked);
});
menu.addAction(action);
menu.exec(m_treeView->mapToGlobal(pos));
}