From bd5c36530bb4d1e58508b22631e34f37afe7423b Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 6 Aug 2021 09:26:50 +0200 Subject: [PATCH] Squish: Prefer 64bit debugger over 32bit on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/system/shared/qtcreator.py | 12 ++++++------ tests/system/suite_debugger/tst_simple_debug/test.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 01b0a1375f7..8959e3669dc 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -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) diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py index 97f4420cf82..9468ac4f8a0 100644 --- a/tests/system/suite_debugger/tst_simple_debug/test.py +++ b/tests/system/suite_debugger/tst_simple_debug/test.py @@ -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")