From 3062a04de422eb57f73f333e65b5248f1d42e950 Mon Sep 17 00:00:00 2001 From: Eric Miotto <1094986+edymtt@users.noreply.github.com> Date: Mon, 22 May 2023 10:55:53 -0700 Subject: [PATCH 1/2] [5.8] Relax FileCheck directives for `skip_clean_llbuild.test` This is needed short term to allow the test to pass when running on Python 3.11 and later and avoid errors like ``` :44:1: note: non-matching line after previous match is here :1: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13 ^ ``` Long term we want to replace uses of the obsolete `pipes.quotes` function with `shlex.quotes`. Addresses rdar://109664710 (cherry picked from commit 1534925f2171f56640840b324855ea3800d2442b, #66062) --- validation-test/BuildSystem/skip_clean_llbuild.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validation-test/BuildSystem/skip_clean_llbuild.test b/validation-test/BuildSystem/skip_clean_llbuild.test index 7a9e6adf4aa2e..725402046d94d 100644 --- a/validation-test/BuildSystem/skip_clean_llbuild.test +++ b/validation-test/BuildSystem/skip_clean_llbuild.test @@ -8,8 +8,8 @@ # RUN: mkdir -p %t # RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --llbuild --skip-clean-llbuild --cmake %cmake 2>&1 | %FileCheck --check-prefix=SKIP-CLEAN-LLBUILD-CHECK %s -# CLEAN-LLBUILD-CHECK: Cleaning the llbuild build directory -# CLEAN-LLBUILD-CHECK-NEXT: rm -rf +# CLEAN-LLBUILD-CHECK-DAG: Cleaning the llbuild build directory +# CLEAN-LLBUILD-CHECK: rm -rf # SKIP-CLEAN-LLBUILD-CHECK-NOT: Cleaning the llbuild build directory # SKIP-CLEAN-LLBUILD-CHECK-NOT: rm -rf {{.*/llbuild-[^/]*}} From 58729dfc2f929a71246583bc694490d93688b1ff Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Wed, 25 Jan 2023 11:06:44 -0800 Subject: [PATCH 2/2] [5.8][gardening] change an ambiguous variable name - lowercase-l trips some python lint configurations (cherry picked from commit 36d230ed2836c20d8a0bd0f9577775604743fe18, #63237) --- utils/round-trip-syntax-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/round-trip-syntax-test b/utils/round-trip-syntax-test index 5dd3c83436c36..8ad3849bf7b09 100755 --- a/utils/round-trip-syntax-test +++ b/utils/round-trip-syntax-test @@ -74,7 +74,7 @@ class RoundTripTask(object): logging.error(self.stderr.decode('utf-8', errors='replace')) raise RuntimeError() - contents = ''.join(map(lambda l: l.decode('utf-8', errors='replace'), + contents = ''.join(map(lambda _: _.decode('utf-8', errors='replace'), open(self.input_filename, 'rb').readlines())) stdout_contents = self.stdout.decode('utf-8', errors='replace')