diff --git a/tests/system/settings/windows/QtProject/qtcreator/debuggers.xml b/tests/system/settings/windows/QtProject/qtcreator/debuggers.xml
index e5518c8c99d..b8d5b705e11 100644
--- a/tests/system/settings/windows/QtProject/qtcreator/debuggers.xml
+++ b/tests/system/settings/windows/QtProject/qtcreator/debuggers.xml
@@ -6,12 +6,12 @@
DebuggerItem.0
- x86-windows-msvc2015-pe-64bit
+ x86-windows-msvc2015-pe-SQUISH_DEBUGGER_BITNESSbit
true
- C:/Program Files (x86)/Windows Kits/10/Debuggers/x64/cdb.exe
- Auto-detected CDB at C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe
+ C:/Program Files (x86)/Windows Kits/10/Debuggers/SQUISH_DEBUGGER_ARCHITECTURE/cdb.exe
+ Auto-detected CDB at C:\Program Files (x86)\Windows Kits\10\Debuggers\SQUISH_DEBUGGER_ARCHITECTURE\cdb.exe
4
{1b25f20a-d584-4fb7-85b3-74dd15b82f6f}
diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py
index afed6c118d4..71efd63f428 100644
--- a/tests/system/shared/qtcreator.py
+++ b/tests/system/shared/qtcreator.py
@@ -186,6 +186,30 @@ def substituteDefaultCompiler(settingsDir):
__substitute__(qtversion, "SQUISH_DEFAULT_COMPILER", compiler)
test.log("Injected default compiler '%s' to qtversion.xml..." % compiler)
+def substituteCdb(settingsDir):
+ def canUse32bitCdb():
+ 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"))
+ 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:
+ architecture = "x64"
+ bitness = "64"
+ debuggers = os.path.join(settingsDir, "QtProject", 'qtcreator', 'debuggers.xml')
+ __substitute__(debuggers, "SQUISH_DEBUGGER_ARCHITECTURE", architecture)
+ __substitute__(debuggers, "SQUISH_DEBUGGER_BITNESS", bitness)
+ test.log("Injected architecture '%s' and bitness '%s' in cdb path..." % (architecture, bitness))
+
def __guessABI__(supportedABIs, use64Bit):
if platform.system() == 'Linux':
supportedABIs = filter(lambda x: 'linux' in x, supportedABIs)
@@ -277,6 +301,8 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]):
if platform.system() in ('Linux', 'Darwin'):
substituteTildeWithinToolchains(tmpSettingsDir)
substituteDefaultCompiler(tmpSettingsDir)
+ elif platform.system() in ('Windows', 'Microsoft'):
+ substituteCdb(tmpSettingsDir)
substituteUnchosenTargetABIs(tmpSettingsDir)
SettingsPath = ' -settingspath "%s"' % tmpSettingsDir