SquishTests: Fix compiler substitution on Windows

Change-Id: I970622c888d6c8b7c63e8b1674419ba900ea6d24
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2023-04-06 12:52:22 +02:00
parent 6536ea7f05
commit 41e78b9e57
2 changed files with 3 additions and 4 deletions

View File

@@ -248,7 +248,9 @@ def substituteMsvcPaths(settingsDir, version, targetBitness=64):
try:
msvcPath = os.path.join("C:\\Program Files (x86)", "Microsoft Visual Studio",
version, msvcFlavor, "VC", "Tools", "MSVC")
msvcPath = os.path.join(msvcPath, os.listdir(msvcPath)[0], "bin", hostArch, targetArch)
foundVersions = os.listdir(msvcPath) # undetermined order
foundVersions.sort(reverse=True) # we explicitly want the latest and greatest
msvcPath = os.path.join(msvcPath, foundVersions[0], "bin", hostArch, targetArch)
__substitute__(os.path.join(settingsDir, "QtProject", 'qtcreator', 'toolchains.xml'),
"SQUISH_MSVC%s_%d_PATH" % (version, targetBitness), msvcPath)
return

View File

@@ -19,9 +19,6 @@ def main():
if platform.system() in ('Microsoft', 'Windows'):
expectConfigureToFail = [ Targets.DESKTOP_5_4_1_GCC ] # gcc 4.9 does not know C++17
# Qt5.10 does not default enable C++17
expectBuildToFail = [ Targets.DESKTOP_5_10_1_DEFAULT ]
for kit, config in availableConfigs:
selectBuildConfig(kit, config)
test.log("Testing build configuration: " + config)