From f17d8909f0457b947649fa2a8becce48dd01e9a9 Mon Sep 17 00:00:00 2001 From: Eric Miotto Date: Thu, 31 Jul 2025 08:52:55 -0700 Subject: [PATCH 1/2] [6.2] Do not require CMake to be in the path for build-script tests (cherry picked from commit 4e854dea88bbb2b1a0ac4e218d0f37903291309a) --- utils/swift_build_support/tests/test_toolchain.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/swift_build_support/tests/test_toolchain.py b/utils/swift_build_support/tests/test_toolchain.py index 34470d578aaa5..e2dc6f743225a 100644 --- a/utils/swift_build_support/tests/test_toolchain.py +++ b/utils/swift_build_support/tests/test_toolchain.py @@ -53,9 +53,8 @@ def test_misc_tools(self): tc = host_toolchain() # CMake - self.assertIsNotNone(tc.cmake) - self.assertTrue( - os.path.basename(tc.cmake).startswith('cmake')) + self.assertTrue(tc.cmake is None or + os.path.basename(tc.cmake).startswith('cmake')) # Ninja self.assertTrue(tc.ninja is None or From 5324f20b7cb394a0c9203443c2faf24fee355542 Mon Sep 17 00:00:00 2001 From: Anthony Latsis Date: Thu, 7 Aug 2025 00:09:10 +0100 Subject: [PATCH 2/2] [6.2][test] Pass cmake location to build-script invocation in test The test fails without it if CMake is not in the path (and Xcode does not find an instance either) (cherry picked from commit 54322b22d5af24ece58f71061c8ebcf2bdef88e0) --- validation-test/BuildSystem/build_worktree.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validation-test/BuildSystem/build_worktree.test b/validation-test/BuildSystem/build_worktree.test index f72ffc38f0f57..1f1f7c40cbef0 100644 --- a/validation-test/BuildSystem/build_worktree.test +++ b/validation-test/BuildSystem/build_worktree.test @@ -12,7 +12,7 @@ # RUN: git -C %t/swift worktree add --detach %t/swift-worktree # Invoke the build script from the worktree. -# RUN: %t/swift-worktree/utils/build-script --dry-run | %FileCheck -DARCH=%target-arch %s +# RUN: %t/swift-worktree/utils/build-script --dry-run --cmake %cmake | %FileCheck -DARCH=%target-arch %s # We should generate a build system for the linked worktree, not the main # worktree.