From 1633d76b7674ff07e8938aa8f81ef2b07c92a202 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 7 Dec 2023 13:35:58 +0100 Subject: [PATCH] SquishTests: Allow designer test to progress further MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly chose a newer kit as the kit we would use by default lacks some compiler features on Windows. This patch here only fixes the test crash when trying to access a disabled menu item due to cmake dropping out with error when parsing the project with the active kit. Drive by change: removed workaround for fixed bug. Change-Id: I783626f30d27ab1852536ae0d1f936ec8323feb8 Reviewed-by: Robert Löhning --- tests/system/shared/project.py | 17 +++++++++++++---- .../tst_designer_autocomplete/test.py | 9 +++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 317067142a4..5bb724a0b1d 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -139,8 +139,13 @@ def __createProjectHandleQtQuickSelection__(minimumQtVersion): # param buildSystem is a string holding the build system selected for the project # param checks turns tests in the function on if set to True # param available a list holding the available targets -def __selectQtVersionDesktop__(buildSystem, checks, available=None): - wanted = Targets.desktopTargetClasses() +# param targets a list holding the wanted targets - defaults to all desktop targets if empty +# returns checked targets +def __selectQtVersionDesktop__(buildSystem, checks, available=None, targets=[]): + if len(targets): + wanted = targets + else: + wanted = Targets.desktopTargetClasses() checkedTargets = __chooseTargets__(wanted, available) if checks: for target in checkedTargets: @@ -162,6 +167,7 @@ def __selectQtVersionDesktop__(buildSystem, checks, available=None): verifyChecked(cbObject % ("Profile", objectMap.realName(detailsWidget))) clickButton(detailsButton) clickButton(waitForObject(":Next_QPushButton")) + return checkedTargets def __createProjectHandleLastPage__(expectedFiles=[], addToVersionControl="", addToProject=None): if len(expectedFiles): @@ -205,8 +211,10 @@ def __getProjectFileName__(projectName, buildSystem): # param checks turns tests in the function on if set to True # param addToVersionControl selects the specified VCS from Creator's wizard # param buildSystem selects the specified build system from Creator's wizard +# param targets specifies targets that should be checked +# returns the checked targets def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="", - buildSystem=None): + buildSystem=None, targets=[]): template = "Qt Widgets Application" available = __createProjectOrFileSelectType__(" Application (Qt)", template) __createProjectSetNameAndPath__(path, projectName, checks) @@ -229,7 +237,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="