diff options
author | Christian Stenger <christian.stenger@qt.io> | 2024-04-26 13:45:26 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2024-04-30 08:04:36 +0000 |
commit | 1fc135822f7b049e70a1eadd731089a9e3be8d10 (patch) | |
tree | 4bd9695138908f075968220dee6f474c66776ef0 /src/plugins/autotest/testprojectsettings.cpp | |
parent | 0543085a64b40e8ffffbc65feab6e7200ac7439d (diff) |
AutoTest: Allow limiting scan inside project settings
Enables to limit the scanning for tests and respectively any
further action to a list of user defined patterns.
If limitation is enabled and any of the filter patterns does
match the file will be processed.
If no filter pattern matches the file will be ignored.
Change-Id: I6a6de8f4137485e83b750997fb3c948dc6e79c68
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/autotest/testprojectsettings.cpp')
-rw-r--r-- | src/plugins/autotest/testprojectsettings.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/autotest/testprojectsettings.cpp b/src/plugins/autotest/testprojectsettings.cpp index 0b75dd9804..a8ae11f6d5 100644 --- a/src/plugins/autotest/testprojectsettings.cpp +++ b/src/plugins/autotest/testprojectsettings.cpp @@ -22,6 +22,8 @@ namespace Internal { static const char SK_ACTIVE_FRAMEWORKS[] = "AutoTest.ActiveFrameworks"; static const char SK_RUN_AFTER_BUILD[] = "AutoTest.RunAfterBuild"; static const char SK_CHECK_STATES[] = "AutoTest.CheckStates"; +static const char SK_APPLY_FILTER[] = "AutoTest.ApplyFilter"; +static const char SK_PATH_FILTERS[] = "AutoTest.PathFilters"; static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.projectsettings", QtWarningMsg) @@ -100,6 +102,8 @@ void TestProjectSettings::load() m_runAfterBuild = runAfterBuild.isValid() ? RunAfterBuildMode(runAfterBuild.toInt()) : RunAfterBuildMode::None; m_checkStateCache.fromSettings(m_project->namedSettings(SK_CHECK_STATES).toMap()); + m_limitToFilter = m_project->namedSettings(SK_APPLY_FILTER).toBool(); + m_pathFilters = m_project->namedSettings(SK_PATH_FILTERS).toStringList(); } void TestProjectSettings::save() @@ -115,6 +119,8 @@ void TestProjectSettings::save() m_project->setNamedSettings(SK_ACTIVE_FRAMEWORKS, activeFrameworks); m_project->setNamedSettings(SK_RUN_AFTER_BUILD, int(m_runAfterBuild)); m_project->setNamedSettings(SK_CHECK_STATES, m_checkStateCache.toSettings(Qt::Checked)); + m_project->setNamedSettings(SK_APPLY_FILTER, m_limitToFilter); + m_project->setNamedSettings(SK_PATH_FILTERS, m_pathFilters); } } // namespace Internal |