mirror of
https://github.com/servo/servo.git
synced 2025-10-01 17:19:16 +01:00
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 <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
5510ea91b3
commit
f4c618924f
1 changed files with 12 additions and 1 deletions
|
@ -700,7 +700,15 @@ class MachCommands(CommandBase):
|
||||||
except OSError:
|
except OSError:
|
||||||
return ""
|
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([hdc_path, "shell", "rm", log_path])
|
||||||
subprocess.call(
|
subprocess.call(
|
||||||
|
@ -737,6 +745,9 @@ class MachCommands(CommandBase):
|
||||||
sleep(2)
|
sleep(2)
|
||||||
whole_file = read_log_file(hdc_path)
|
whole_file = read_log_file(hdc_path)
|
||||||
break
|
break
|
||||||
|
if not subprocess.check_output([hdc_path, "shell", "pidof", "org.servo.servo"]):
|
||||||
|
print("Servo crashed, aborting speedometer test")
|
||||||
|
exit(1)
|
||||||
else:
|
else:
|
||||||
print("Error failed to find console logs in log file")
|
print("Error failed to find console logs in log file")
|
||||||
print(f"log-file contents: `{whole_file}`")
|
print(f"log-file contents: `{whole_file}`")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue