diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-01-13 15:28:40 +0100 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-01-13 15:29:58 +0100 |
commit | 677414730b21b1932c4a1d708829e290f8e9df1e (patch) | |
tree | c20c2a6daa444fe48bc2085af6e8f049cfe305f4 /python/servo/bootstrap.py | |
parent | 806db676b01dae7b57b64a5118b21f57c9e21f8c (diff) | |
download | servo-677414730b21b1932c4a1d708829e290f8e9df1e.tar.gz servo-677414730b21b1932c4a1d708829e290f8e9df1e.zip |
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.
Diffstat (limited to 'python/servo/bootstrap.py')
-rw-r--r-- | python/servo/bootstrap.py | 10 |
1 files changed, 6 insertions, 4 deletions
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): |