mirror of
https://github.com/certbot/certbot.git
synced 2026-07-31 02:04:20 +02:00
[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).
This commit is contained in:
committed by
Brad Warren
parent
3d0e16ece3
commit
7352727a65
+3
-2
@@ -5,6 +5,7 @@ from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import _venv_common
|
||||
|
||||
@@ -47,7 +48,7 @@ def get_venv_args():
|
||||
def main():
|
||||
venv_args = get_venv_args()
|
||||
|
||||
_venv_common.main('venv3', venv_args, REQUIREMENTS)
|
||||
return _venv_common.main('venv3', venv_args, REQUIREMENTS)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
sys.exit(main())
|
||||
|
||||
Reference in New Issue
Block a user