From 677414730b21b1932c4a1d708829e290f8e9df1e Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Fri, 13 Jan 2023 15:28:40 +0100 Subject: Fail faster on CI when Linux bootstrap fails Raise an exception when dependencies fail to install. Also split the run phase of the Linux bootstrap so that either of these failing commands will cause the job to fail. --- python/servo/bootstrap.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'python/servo/bootstrap.py') diff --git a/python/servo/bootstrap.py b/python/servo/bootstrap.py index f14f9381a60..8d6b19fb477 100644 --- a/python/servo/bootstrap.py +++ b/python/servo/bootstrap.py @@ -59,11 +59,13 @@ def install_linux_deps(context, pkgs_ubuntu, pkgs_fedora, pkgs_void, force): install = force = True break - if install: - print("Installing missing dependencies...") - run_as_root(command + pkgs, force) + if not install: + return False - return install + print("Installing missing dependencies...") + if run_as_root(command + pkgs, force) != 0: + raise Exception("Installation of dependencies failed.") + return True def install_salt_dependencies(context, force): -- cgit v1.2.3