2018-11-07 20:16:16 -05:00
|
|
|
#!/usr/bin/env python
|
2021-05-24 17:17:11 -04:00
|
|
|
# pip installs packages in editable mode using pip_install.py
|
2020-06-08 15:14:02 -04:00
|
|
|
#
|
|
|
|
|
# cryptography is currently using this script in their CI at
|
|
|
|
|
# https://github.com/pyca/cryptography/blob/a02fdd60d98273ca34427235c4ca96687a12b239/.travis/downstream.d/certbot.sh#L8-L9.
|
|
|
|
|
# We should try to remember to keep their repo updated if we make any changes
|
|
|
|
|
# to this script which may break things for them.
|
2018-11-07 20:16:16 -05:00
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
import pip_install
|
|
|
|
|
|
2019-12-09 15:50:20 -05:00
|
|
|
|
2018-11-07 20:16:16 -05:00
|
|
|
def main(args):
|
|
|
|
|
new_args = []
|
|
|
|
|
for arg in args:
|
|
|
|
|
new_args.append('-e')
|
|
|
|
|
new_args.append(arg)
|
[URGENT] Fix the CI system (#6485)
It is about the exit codes that are returned from the various scripts in tools during tox execution.
Indeed, tox relies on the non-zero exit code from a given script to know that something failed during the execution.
Previously, theses scripts were in bash, and a bash script returns an exit code that is the higher code returned from any of the command executed by the script. So if any command return a non-zero (in particular pylint or pytest), then the script return also non-zero.
Now that these scripts are converted into python, pylint and pytest are executed via subprocess, that returns the exit code as variables. But if theses codes are not handled explicitly, the python script itself will return zero if no python exception occured. As a consequence currently, Certbot CI system is unable to detect any test error or lint error, because there is no exception in this case, only exit codes from the binaries executed.
This PR fixes that, by handling correctly the exit code from the most critical scripts, install_and_test.py and tox.cover.py, but also all the scripts that I converted into Python and that could be executed in the context of a shell (via tox or directly for instance).
2018-11-08 11:35:07 -05:00
|
|
|
|
2018-11-14 16:57:40 -05:00
|
|
|
pip_install.main(new_args)
|
2018-11-07 20:16:16 -05:00
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2018-11-14 16:57:40 -05:00
|
|
|
main(sys.argv[1:])
|