From 41e78b9e57065311d3019c38e813b49e1323cc90 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 6 Apr 2023 12:52:22 +0200 Subject: [PATCH] SquishTests: Fix compiler substitution on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I970622c888d6c8b7c63e8b1674419ba900ea6d24 Reviewed-by: Robert Löhning --- tests/system/shared/qtcreator.py | 4 +++- tests/system/suite_debugger/tst_build_new_project/test.py | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index f82f3c6e09d..543c3c7ad4f 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -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 diff --git a/tests/system/suite_debugger/tst_build_new_project/test.py b/tests/system/suite_debugger/tst_build_new_project/test.py index 86d0c1b5f38..ca0d6f70879 100644 --- a/tests/system/suite_debugger/tst_build_new_project/test.py +++ b/tests/system/suite_debugger/tst_build_new_project/test.py @@ -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)