From f4c618924fc81c4328dd1a95c7a9a93a8e16ca5b Mon Sep 17 00:00:00 2001 From: Narfinger Date: Wed, 1 Oct 2025 10:41:07 +0200 Subject: [PATCH] OHOS CI: Abort early when speedometer crashes in test-speedometer-ohos (#39511) Check for the pid of servo for test-speedometer-ohos to see if it did not crash and abort early if it crashed. Testing: Ran test-speedometer-ohos with closing servo and without closing servo on the phone. Fixes: https://github.com/servo/servo/issues/37742 Signed-off-by: Narfinger --- python/servo/testing_commands.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 15802213a65..c7f8f04bf84 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -700,7 +700,15 @@ class MachCommands(CommandBase): except OSError: return "" - subprocess.call([hdc_path, "shell", "aa", "force-stop", "org.servo.servo"]) + subprocess.call( + [ + hdc_path, + "shell", + "aa", + "force-stop", + "org.servo.servo", + ] + ) subprocess.call([hdc_path, "shell", "rm", log_path]) subprocess.call( @@ -737,6 +745,9 @@ class MachCommands(CommandBase): sleep(2) whole_file = read_log_file(hdc_path) break + if not subprocess.check_output([hdc_path, "shell", "pidof", "org.servo.servo"]): + print("Servo crashed, aborting speedometer test") + exit(1) else: print("Error failed to find console logs in log file") print(f"log-file contents: `{whole_file}`")