forked from qt-creator/qt-creator
SquishTests: Autodetect cdb
Creator automatically detects the debuggers anyway and then can't handle the fixed ID. Change-Id: I732f86649b02016be2ca513c896a80ce254d721f Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -4,23 +4,6 @@
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>DebuggerItem.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuelist type="QVariantList" key="Abis">
|
||||
<value type="QString">x86-windows-msvc2015-pe-SQUISH_DEBUGGER_BITNESSbit</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="AutoDetected">true</value>
|
||||
<value type="QString" key="AutoDetectionSource"></value>
|
||||
<value type="QString" key="Binary">C:/Program Files (x86)/Windows Kits/10/Debuggers/SQUISH_DEBUGGER_ARCHITECTURE/cdb.exe</value>
|
||||
<value type="QString" key="DisplayName">Auto-detected CDB at C:\Program Files (x86)\Windows Kits\10\Debuggers\SQUISH_DEBUGGER_ARCHITECTURE\cdb.exe</value>
|
||||
<value type="int" key="EngineType">4</value>
|
||||
<value type="QString" key="Id">{1b25f20a-d584-4fb7-85b3-74dd15b82f6f}</value>
|
||||
<value type="QDateTime" key="LastModified"></value>
|
||||
<value type="QString" key="Version"></value>
|
||||
<value type="QString" key="WorkingDirectory"></value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>DebuggerItem.1</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuelist type="QVariantList" key="Abis">
|
||||
<value type="QString">x86-windows-msys-pe-unknown</value>
|
||||
@@ -36,7 +19,7 @@
|
||||
</data>
|
||||
<data>
|
||||
<variable>DebuggerItem.Count</variable>
|
||||
<value type="int">2</value>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
|
@@ -37,7 +37,6 @@
|
||||
<value type="QString" key="PE.Profile.AutoDetectionSource"></value>
|
||||
<valuemap type="QVariantMap" key="PE.Profile.Data">
|
||||
<value type="QString" key="Android.GdbServer.Information"></value>
|
||||
<value type="QString" key="Debugger.Information">{1b25f20a-d584-4fb7-85b3-74dd15b82f6f}</value>
|
||||
<value type="QString" key="PE.Profile.Device">Desktop Device</value>
|
||||
<value type="QByteArray" key="PE.Profile.DeviceType">Desktop</value>
|
||||
<valuelist type="QVariantList" key="PE.Profile.Environment"/>
|
||||
@@ -65,7 +64,6 @@
|
||||
<valuemap type="QVariantMap" key="PE.Profile.Data">
|
||||
<value type="QString"></value>
|
||||
<value type="QString" key="Android.GdbServer.Information"></value>
|
||||
<value type="QString" key="Debugger.Information">{1b25f20a-d584-4fb7-85b3-74dd15b82f6f}</value>
|
||||
<value type="QString" key="PE.Profile.Device">Desktop Device</value>
|
||||
<value type="QByteArray" key="PE.Profile.DeviceType">Desktop</value>
|
||||
<valuelist type="QVariantList" key="PE.Profile.Environment">
|
||||
@@ -94,7 +92,6 @@
|
||||
<value type="bool" key="PE.Profile.AutoDetected">false</value>
|
||||
<value type="QString" key="PE.Profile.AutoDetectionSource"></value>
|
||||
<valuemap type="QVariantMap" key="PE.Profile.Data">
|
||||
<value type="QString" key="Debugger.Information">{1b25f20a-d584-4fb7-85b3-74dd15b82f6f}</value>
|
||||
<value type="QString" key="PE.Profile.Device">Desktop Device</value>
|
||||
<value type="QString" key="PE.Profile.DeviceType">Desktop</value>
|
||||
<valuemap type="QVariantMap" key="PE.Profile.ToolChainsV3">
|
||||
|
@@ -201,31 +201,6 @@ def substituteDefaultCompiler(settingsDir):
|
||||
__substitute__(qtversion, "SQUISH_DEFAULT_COMPILER", compiler)
|
||||
test.log("Injected default compiler '%s' to qtversion.xml..." % compiler)
|
||||
|
||||
def substituteCdb(settingsDir):
|
||||
def canUse64bitCdb():
|
||||
try:
|
||||
serverIni = readFile(os.path.join(os.getenv("APPDATA"), "froglogic",
|
||||
"Squish", "ver1", "server.ini"))
|
||||
autLine = next(iter(filter(lambda line: "AUT/qtcreator" in line,
|
||||
serverIni.splitlines())))
|
||||
autPath = autLine.split("\"")[1]
|
||||
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 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)
|
||||
test.log("Injected architecture '%s' and bitness '%s' in cdb path..." % (architecture, bitness))
|
||||
|
||||
|
||||
def substituteMsvcPaths(settingsDir, version, targetBitness=64):
|
||||
if not version in ['2017', '2019']:
|
||||
@@ -298,7 +273,6 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]):
|
||||
substituteTildeWithinQtVersion(tmpSettingsDir)
|
||||
substituteDefaultCompiler(tmpSettingsDir)
|
||||
elif platform.system() in ('Windows', 'Microsoft'):
|
||||
substituteCdb(tmpSettingsDir)
|
||||
substituteMsvcPaths(tmpSettingsDir, '2017', 64)
|
||||
substituteMsvcPaths(tmpSettingsDir, '2017', 32)
|
||||
substituteMsvcPaths(tmpSettingsDir, '2019', 64)
|
||||
|
Reference in New Issue
Block a user