From ddc8b03053452a8975b9397e5d15fd98a8247046 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Thu, 7 Jan 2021 17:28:38 -0800 Subject: [PATCH 1/3] Print compile error --- testing/run_tests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testing/run_tests.py b/testing/run_tests.py index 9cdd1e63331da..a35488138cb28 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -214,7 +214,14 @@ def SnapshotTest(build_dir, dart_file, kernel_file_output, verbose_dart_snapshot if verbose_dart_snapshot: RunCmd(snapshot_command, cwd=buildroot_dir) else: - subprocess.check_output(snapshot_command, cwd=buildroot_dir) + try: + subprocess.check_output(snapshot_command, cwd=buildroot_dir) + except subprocess.CalledProcessError as error: + # CalledProcessError's string doesn't print the output. Print it for + # easier inspection. + print('Error occurred from the subprocess, with the output:') + print(error.output) + raise assert os.path.exists(kernel_file_output) From d4ef1a4f57e343339d8878f68fa0e56e40d56684 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Thu, 7 Jan 2021 17:33:06 -0800 Subject: [PATCH 2/3] Better comment --- testing/run_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/run_tests.py b/testing/run_tests.py index a35488138cb28..da662be5cf125 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -217,8 +217,8 @@ def SnapshotTest(build_dir, dart_file, kernel_file_output, verbose_dart_snapshot try: subprocess.check_output(snapshot_command, cwd=buildroot_dir) except subprocess.CalledProcessError as error: - # CalledProcessError's string doesn't print the output. Print it for - # easier inspection. + # CalledProcessError's string doesn't print the output. Print it before + # the crash for easier inspection. print('Error occurred from the subprocess, with the output:') print(error.output) raise From 86dafc3c396b5c7f542a0157790ac7b2b7c437a0 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Thu, 7 Jan 2021 18:07:36 -0800 Subject: [PATCH 3/3] Update run_tests.py --- testing/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/run_tests.py b/testing/run_tests.py index da662be5cf125..d5dd747ffd43d 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -221,7 +221,7 @@ def SnapshotTest(build_dir, dart_file, kernel_file_output, verbose_dart_snapshot # the crash for easier inspection. print('Error occurred from the subprocess, with the output:') print(error.output) - raise + raise assert os.path.exists(kernel_file_output)