diff options
author | Robert Löhning <robert.loehning@qt.io> | 2024-02-21 21:09:51 +0100 |
---|---|---|
committer | Robert Löhning <robert.loehning@qt.io> | 2024-03-11 09:13:51 +0000 |
commit | 7813ce9335f63e658cbd89b522275c302a552481 (patch) | |
tree | 43b47f93a57889c6cb074e9d3921bc0c47c552e7 | |
parent | 5895ad5659161a5864066844174837c763ae1663 (diff) |
SquishTests: Avoid warnings when reading build issues
tst_APTW01 explicitly disables the Clang Code Model
so there is no filter category of that name.
Change-Id: I7378e11582bb0231a24404cca212a234ef7f37ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | tests/system/shared/build_utils.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index fbc89c5920..a47416ca33 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -25,13 +25,21 @@ def toggleIssuesFilter(filterName, checked): def getBuildIssues(ignoreCodeModel=True): + # Heuristically determine whether the ClandCodeModel is loaded. + # The current implementation is inaccurate: + # The value may be "True" although the CCM was not loaded due to existing settings or + # insufficient memory. This would result in a slightly longer execution and false positive + # warnings. Since neither would cause an actual damage and a precise handling would require + # a bigger refactoring, this seems acceptable. + clangLoaded = " -noload ClangCodeModel" not in currentApplicationContext().commandLine + ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton" , silent=True) model = waitForObject(":Qt Creator.Issues_QListView").model() - if ignoreCodeModel: + if ignoreCodeModel and clangLoaded: # filter out possible code model issues present inside the Issues pane toggleIssuesFilter("Clang Code Model", False) result = dumpBuildIssues(model) - if ignoreCodeModel: + if ignoreCodeModel and clangLoaded: # reset the filter toggleIssuesFilter("Clang Code Model", True) return result |