Squish: Update and improve isMsvcConfig()

Change-Id: Icff3a8178e89623097e2da7ff8f1e72197f1a4dc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Löhning
2022-09-15 19:41:53 +02:00
parent ccf84a70af
commit a35ebe2753

View File

@@ -174,6 +174,8 @@ def doSimpleDebugging(currentKit, currentConfigName, expectedBPOrder=[], enableQ
# param currentKit specifies the ID of the kit to use (see class Targets) # param currentKit specifies the ID of the kit to use (see class Targets)
def isMsvcConfig(currentKit): def isMsvcConfig(currentKit):
if platform.system() not in ('Microsoft' 'Windows'):
return False
switchViewTo(ViewConstants.PROJECTS) switchViewTo(ViewConstants.PROJECTS)
switchToBuildOrRunSettingsFor(currentKit, ProjectSettings.BUILD) switchToBuildOrRunSettingsFor(currentKit, ProjectSettings.BUILD)
@@ -186,7 +188,8 @@ def isMsvcConfig(currentKit):
raise Exception("Kit '%s' is not activated in the project." % wantedKitName) raise Exception("Kit '%s' is not activated in the project." % wantedKitName)
index = waitForObject(wantedKitIndexString) index = waitForObject(wantedKitIndexString)
toolTip = str(index.data(Qt.ToolTipRole).toString()) toolTip = str(index.data(Qt.ToolTipRole).toString())
compilerPattern = re.compile("<tr><td><b>Compiler:</b></td><td>(?P<compiler>.+)</td></tr>") compilerPattern = re.compile('<dt style="font-weight:bold">Compiler:</dt><dd>(?P<compiler>.+)'
'</dd><dt style="font-weight:bold">Environment:')
match = compilerPattern.search(toolTip) match = compilerPattern.search(toolTip)
if match is None: if match is None:
test.warning("UI seems to have changed - failed to check for compiler.") test.warning("UI seems to have changed - failed to check for compiler.")