AutoTest: Add automatic run after build

Add an option to automatically run tests if the build
succeeded and the current project has tests.

Change-Id: I1fe028be84279b9b488f78590565c6d4b0449e34
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Christian Stenger
2019-08-08 09:57:42 +02:00
parent 43e27f76b3
commit 51382a846d
8 changed files with 54 additions and 5 deletions

View File

@@ -44,6 +44,7 @@ static const char displayApplicationKey[] = "DisplayApp";
static const char popupOnStartKey[] = "PopupOnStart";
static const char popupOnFinishKey[] = "PopupOnFinish";
static const char popupOnFailKey[] = "PopupOnFail";
static const char runAfterBuildKey[] = "RunAfterBuild";
static const char groupSuffix[] = ".group";
constexpr int defaultTimeout = 60000;
@@ -66,6 +67,7 @@ void TestSettings::toSettings(QSettings *s) const
s->setValue(popupOnStartKey, popupOnStart);
s->setValue(popupOnFinishKey, popupOnFinish);
s->setValue(popupOnFailKey, popupOnFail);
s->setValue(runAfterBuildKey, runAfterBuild);
// store frameworks and their current active and grouping state
for (const Core::Id &id : frameworks.keys()) {
s->setValue(QLatin1String(id.name()), frameworks.value(id));
@@ -87,6 +89,7 @@ void TestSettings::fromSettings(QSettings *s)
popupOnStart = s->value(popupOnStartKey, true).toBool();
popupOnFinish = s->value(popupOnFinishKey, true).toBool();
popupOnFail = s->value(popupOnFailKey, false).toBool();
runAfterBuild = s->value(runAfterBuildKey, false).toBool();
// try to get settings for registered frameworks
TestFrameworkManager *frameworkManager = TestFrameworkManager::instance();
const QList<Core::Id> &registered = frameworkManager->registeredFrameworkIds();