From cc15248592d5469507ced309ef450fa5ccafc3e8 Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Fri, 20 Oct 2023 14:48:17 -0700 Subject: [PATCH 1/3] Both Python and C++ formatters fail initially... --- libcxx/utils/adb_run.py | 13 +++++++++---- llvm/utils/git/test1.cpp | 8 ++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 llvm/utils/git/test1.cpp diff --git a/libcxx/utils/adb_run.py b/libcxx/utils/adb_run.py index b54198fed44a4..a49b09027cab2 100755 --- a/libcxx/utils/adb_run.py +++ b/libcxx/utils/adb_run.py @@ -43,10 +43,15 @@ def run_adb_sync_command(command: List[str]) -> None: # on failure, it should be shown. Print it to stderr because it's # unrelated to the test program's stdout output. A common error caught # here is "No space left on device". - sys.stderr.write(f"{proc.stdout}\n" - f"error: adb command exited with {proc.returncode}: " - f"{shlex.join(command)}\n") - sys.exit(proc.returncode) + sys.stderr.write( + f"{proc.stdout}\n" + f"error: adb command exited with {proc.returncode}: " + f"{shlex.join(command)}\n") + + + + + sys.exit(proc.returncode + 23) def sync_test_dir(local_dir: str, remote_dir: str) -> None: diff --git a/llvm/utils/git/test1.cpp b/llvm/utils/git/test1.cpp new file mode 100644 index 0000000000000..a72666f5a210a --- /dev/null +++ b/llvm/utils/git/test1.cpp @@ -0,0 +1,8 @@ +int +main +( + int x +) +{ + return x +1; +} From 50c93142f5f237516caa33c7067921e2651d9839 Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Fri, 20 Oct 2023 14:59:56 -0700 Subject: [PATCH 2/3] change the CL, but leave the formatters broken --- libcxx/utils/adb_run.py | 2 +- llvm/utils/git/test1.cpp | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/libcxx/utils/adb_run.py b/libcxx/utils/adb_run.py index a49b09027cab2..97ba3c29da863 100755 --- a/libcxx/utils/adb_run.py +++ b/libcxx/utils/adb_run.py @@ -44,7 +44,7 @@ def run_adb_sync_command(command: List[str]) -> None: # unrelated to the test program's stdout output. A common error caught # here is "No space left on device". sys.stderr.write( - f"{proc.stdout}\n" + f"{proc.stdout}\n" f"error: adb command exited with {proc.returncode}: " f"{shlex.join(command)}\n") diff --git a/llvm/utils/git/test1.cpp b/llvm/utils/git/test1.cpp index a72666f5a210a..ff96adec319df 100644 --- a/llvm/utils/git/test1.cpp +++ b/llvm/utils/git/test1.cpp @@ -1,8 +1,3 @@ -int -main -( - int x -) -{ - return x +1; +int main(int x) { + return x + 1; } From 2a6cc93a9919c965228c4b57750eff6f938ee8e0 Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Fri, 20 Oct 2023 15:03:32 -0700 Subject: [PATCH 3/3] fix the formatting --- libcxx/utils/adb_run.py | 8 +++----- llvm/utils/git/test1.cpp | 4 +--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/libcxx/utils/adb_run.py b/libcxx/utils/adb_run.py index 97ba3c29da863..a2a9a3082d26e 100755 --- a/libcxx/utils/adb_run.py +++ b/libcxx/utils/adb_run.py @@ -45,11 +45,9 @@ def run_adb_sync_command(command: List[str]) -> None: # here is "No space left on device". sys.stderr.write( f"{proc.stdout}\n" - f"error: adb command exited with {proc.returncode}: " - f"{shlex.join(command)}\n") - - - + f"error: adb command exited with {proc.returncode}: " + f"{shlex.join(command)}\n" + ) sys.exit(proc.returncode + 23) diff --git a/llvm/utils/git/test1.cpp b/llvm/utils/git/test1.cpp index ff96adec319df..ba6e2cd5a1b27 100644 --- a/llvm/utils/git/test1.cpp +++ b/llvm/utils/git/test1.cpp @@ -1,3 +1 @@ -int main(int x) { - return x + 1; -} +int main(int x) { return x + 1; }