diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-08-08 09:57:42 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-09-02 07:08:38 +0000 |
commit | 51382a846d284f3b4239f4678bde060969a6b507 (patch) | |
tree | 81a55f7b0c47591e72c7b9821acb0d7e2d4db521 /src/plugins/autotest/testsettings.cpp | |
parent | 43e27f76b3ac96ae4d13e5410be28831ffdbb059 (diff) |
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>
Diffstat (limited to 'src/plugins/autotest/testsettings.cpp')
-rw-r--r-- | src/plugins/autotest/testsettings.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/autotest/testsettings.cpp b/src/plugins/autotest/testsettings.cpp index ddb4f49e81b..48a447ff2cf 100644 --- a/src/plugins/autotest/testsettings.cpp +++ b/src/plugins/autotest/testsettings.cpp @@ -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> ®istered = frameworkManager->registeredFrameworkIds(); |