diff options
author | Robert Loehning <robert.loehning@qt.io> | 2022-10-17 13:40:21 +0200 |
---|---|---|
committer | Robert Löhning <robert.loehning@qt.io> | 2022-11-11 09:14:35 +0000 |
commit | c6e08d6940e35970d62f51a7e7792bd18d72600e (patch) | |
tree | 35291641903474bb6266e6587a484a83af2168fd /tests | |
parent | 7b02984088fb91861911af4b7a24ac354e7f3e2d (diff) |
SquishTests: Enable clangd also on machines with low memory
Change-Id: I92caa0da779aacf731a0aa23a86f55e659c51d2b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/shared/qtcreator.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index c4a6218b6af..9f26634ef01 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -36,6 +36,7 @@ source("../../shared/clang.py") source("../../shared/welcome.py") source("../../shared/workarounds.py") # include this at last +settingsPathsWithExplicitlyEnabledClangd = set() def __closeInfoBarEntry__(leftButtonText): toolButton = ("text='%s' type='QToolButton' unnamed='1' visible='1' " @@ -47,6 +48,7 @@ def __closeInfoBarEntry__(leftButtonText): # additionalParameters must be a list or tuple of strings or None def startQC(additionalParameters=None, withPreparedSettingsPath=True, closeLinkToQt=True, cancelTour=True): global SettingsPath + global settingsPathsWithExplicitlyEnabledClangd appWithOptions = ['"Qt Creator"' if platform.system() == 'Darwin' else "qtcreator"] if withPreparedSettingsPath: appWithOptions.extend(SettingsPath) @@ -56,8 +58,22 @@ def startQC(additionalParameters=None, withPreparedSettingsPath=True, closeLinkT appWithOptions.extend(('-platform', 'windows:dialogs=none')) test.log("Starting now: %s" % ' '.join(appWithOptions)) appContext = startApplication(' '.join(appWithOptions)) - if closeLinkToQt or cancelTour: + if (closeLinkToQt or cancelTour or + str(SettingsPath) not in settingsPathsWithExplicitlyEnabledClangd): progressBarWait(3000) # wait for the "Updating documentation" progress bar + if str(SettingsPath) not in settingsPathsWithExplicitlyEnabledClangd: + # This block will incorrectly be skipped when a test calls startQC multiple times in a row + # passing different settings paths in "additionalParameters". Currently we don't have such + # a test. Even if we did, it would only make a difference if the test relied on clangd + # being active and ran on a machine with insufficient memory. + try: + mouseClick(waitForObject("{text='Enable Anyway' type='QToolButton' " + "unnamed='1' visible='1' " + "window=':Qt Creator_Core::Internal::MainWindow'}", 500)) + settingsPathsWithExplicitlyEnabledClangd.add(str(SettingsPath)) + except: + pass + if closeLinkToQt or cancelTour: if closeLinkToQt: __closeInfoBarEntry__("Link with Qt") if cancelTour: |