From 42c653b53c9e6acfd336c133a14a81290784a673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Tue, 4 Apr 2023 00:26:21 +0200 Subject: [PATCH] SquishTests: Don't filter out code model issues when we need them Amends c46dff01995128bd97c03e6d732c85f662355bf9 Change-Id: I5f2613edf15f86161a576ab21f16f079bd12a59f Reviewed-by: Reviewed-by: Christian Stenger --- tests/system/shared/build_utils.py | 13 ++++++++----- .../system/suite_editors/tst_memberoperator/test.py | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index 4cf1bf82dcb..74063c72f9f 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -23,14 +23,17 @@ def toggleIssuesFilter(filterName, checked): test.log("Exception while toggling filter '%s'" % filterName, "%s(%s)" % (str(t), str(v))) -def getBuildIssues(): + +def getBuildIssues(ignoreCodeModel=True): ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton") model = waitForObject(":Qt Creator.Issues_QListView").model() - # filter out possible code model issues present inside the Issues pane - toggleIssuesFilter("Clang Code Model", False) + if ignoreCodeModel: + # filter out possible code model issues present inside the Issues pane + toggleIssuesFilter("Clang Code Model", False) result = dumpBuildIssues(model) - # reset the filter - toggleIssuesFilter("Clang Code Model", True) + if ignoreCodeModel: + # reset the filter + toggleIssuesFilter("Clang Code Model", True) return result # this method checks the last build (if there's one) and logs the number of errors, warnings and diff --git a/tests/system/suite_editors/tst_memberoperator/test.py b/tests/system/suite_editors/tst_memberoperator/test.py index cbdf411f144..ba1f1476850 100644 --- a/tests/system/suite_editors/tst_memberoperator/test.py +++ b/tests/system/suite_editors/tst_memberoperator/test.py @@ -25,7 +25,7 @@ def __noBuildIssues__(): def __syntaxErrorDetected__(): - buildIssues = getBuildIssues() + buildIssues = getBuildIssues(False) for issue in buildIssues: if issue[3] in ["Expected ';' after expression (fix available)", "Expected ';' at end of declaration (fix available)",