From c1ce00fac05f544cc9359a2d07e39079f1deb237 Mon Sep 17 00:00:00 2001 From: Morgan Chen Date: Thu, 10 Apr 2025 12:56:49 -0700 Subject: [PATCH 1/4] [Infra] Add `--legacy` flag to `xcresulttool` (cherry picked from commit 9b630144a63d49d4e5b68df954fe77dca7b027b1) --- scripts/xcresult_logs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/xcresult_logs.py b/scripts/xcresult_logs.py index de73f926a45..abb2f0b35e2 100755 --- a/scripts/xcresult_logs.py +++ b/scripts/xcresult_logs.py @@ -245,7 +245,8 @@ def export_log(xcresult_path, log_id): Returns: The logged output, as a string. """ - contents = xcresulttool_json('get', '--path', xcresult_path, '--id', log_id) + # Note: --legacy is required for Xcode 16. + contents = xcresulttool_json('get', '--path', xcresult_path, '--id', log_id, '--legacy') result = [] collect_log_output(contents, result) From 1baf29f689fcd9629202a6ae7509101e9eb2d2a2 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Tue, 15 Apr 2025 10:43:57 -0400 Subject: [PATCH 2/4] Format to 80 chars wide --- scripts/xcresult_logs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/xcresult_logs.py b/scripts/xcresult_logs.py index abb2f0b35e2..a031d8f995e 100755 --- a/scripts/xcresult_logs.py +++ b/scripts/xcresult_logs.py @@ -246,7 +246,10 @@ def export_log(xcresult_path, log_id): The logged output, as a string. """ # Note: --legacy is required for Xcode 16. - contents = xcresulttool_json('get', '--path', xcresult_path, '--id', log_id, '--legacy') + contents = xcresulttool_json( + 'get', '--path', xcresult_path, '--id', log_id, '--legacy' + ) + result = [] collect_log_output(contents, result) From 591cdf8432307c77533f2b3a0ddd9d3fd14d3f38 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Tue, 15 Apr 2025 10:49:27 -0400 Subject: [PATCH 3/4] Fix extraneous newline --- scripts/xcresult_logs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/xcresult_logs.py b/scripts/xcresult_logs.py index a031d8f995e..661154a7f68 100755 --- a/scripts/xcresult_logs.py +++ b/scripts/xcresult_logs.py @@ -250,7 +250,6 @@ def export_log(xcresult_path, log_id): 'get', '--path', xcresult_path, '--id', log_id, '--legacy' ) - result = [] collect_log_output(contents, result) return ''.join(result) From 6a904c5fa2e68f019c8a3d94f3fd72f67e85a562 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Tue, 15 Apr 2025 11:07:07 -0400 Subject: [PATCH 4/4] Add more indenting --- scripts/xcresult_logs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/xcresult_logs.py b/scripts/xcresult_logs.py index 661154a7f68..980c701da95 100755 --- a/scripts/xcresult_logs.py +++ b/scripts/xcresult_logs.py @@ -247,7 +247,7 @@ def export_log(xcresult_path, log_id): """ # Note: --legacy is required for Xcode 16. contents = xcresulttool_json( - 'get', '--path', xcresult_path, '--id', log_id, '--legacy' + 'get', '--path', xcresult_path, '--id', log_id, '--legacy' ) result = []