diff options
author | bors-servo <infra@servo.org> | 2023-01-17 11:43:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 11:43:47 +0100 |
commit | 5a33a91bc909e6de807070fbec11325a554a8766 (patch) | |
tree | 8f77db8b13c3ade0325f61737c81e796a924abb9 /python/servo | |
parent | b52547b24e08e894045432b21e4b79b440d23c13 (diff) | |
parent | 677414730b21b1932c4a1d708829e290f8e9df1e (diff) | |
download | servo-5a33a91bc909e6de807070fbec11325a554a8766.tar.gz servo-5a33a91bc909e6de807070fbec11325a554a8766.zip |
Auto merge of #29238 - servo:ci-fail-install-deps, r=jdm
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.
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they just change minor script issues.
Diffstat (limited to 'python/servo')
-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): |