Squish: Prefer 64bit debugger over 32bit on Windows

We nowadays build with 64bit Qt and need a matching compiler.
Especially when testing packages that ship both cdbext versions
the preference of 32bit breaks debugging.
As a drive by, fix tst_simple_debug by triggering rebuild via
locator as menu items are nowadays harder to distinguish.

Change-Id: I6f0c1083472713c48b4d558d6c6f9b8b0da2ca77
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2021-08-06 09:26:50 +02:00
committed by Robert Löhning
parent a9f90eea03
commit bd5c36530b
2 changed files with 7 additions and 7 deletions

View File

@@ -204,24 +204,24 @@ def substituteDefaultCompiler(settingsDir):
test.log("Injected default compiler '%s' to qtversion.xml..." % compiler)
def substituteCdb(settingsDir):
def canUse32bitCdb():
def canUse64bitCdb():
try:
serverIni = readFile(os.path.join(os.getenv("APPDATA"), "froglogic",
"Squish", "ver1", "server.ini"))
autLine = filter(lambda line: "AUT/qtcreator" in line, serverIni.splitlines())[0]
autPath = autLine.split("\"")[1]
return os.path.exists(os.path.join(autPath, "..", "lib", "qtcreatorcdbext32"))
return os.path.exists(os.path.join(autPath, "..", "lib", "qtcreatorcdbext64"))
except:
test.fatal("Something went wrong when determining debugger bitness",
"Did Squish's file structure change? Guessing 32-bit cdb can be used...")
return True
if canUse32bitCdb():
architecture = "x86"
bitness = "32"
else:
if canUse64bitCdb():
architecture = "x64"
bitness = "64"
else:
architecture = "x86"
bitness = "32"
debuggers = os.path.join(settingsDir, "QtProject", 'qtcreator', 'debuggers.xml')
__substitute__(debuggers, "SQUISH_DEBUGGER_ARCHITECTURE", architecture)
__substitute__(debuggers, "SQUISH_DEBUGGER_BITNESS", bitness)

View File

@@ -58,7 +58,7 @@ def main():
test.log("Selecting '%s' as build config" % config)
verifyBuildConfig(kit, config, True, True, True)
# explicitly build before start debugging for adding the executable as allowed program to WinFW
invokeMenuItem("Build", "Rebuild All Projects")
selectFromLocator("t rebuild", "Rebuild (Rebuild All Projects)")
waitForCompile(300000)
if not checkCompile():
test.fatal("Compile had errors... Skipping current build config")