diff options
author | toofar <toofar@spalge.com> | 2023-07-16 22:33:41 +1200 |
---|---|---|
committer | toofar <toofar@spalge.com> | 2023-10-28 08:47:34 +1300 |
commit | c8a030439b01dc92f6e1b1de467b5d8922a973bb (patch) | |
tree | c170de40612adce7ad59c7d5ed61c8ef3890bb78 | |
parent | 71b804acbeec46fa4c44fec818aba4954b179aef (diff) | |
download | qutebrowser-c8a030439b01dc92f6e1b1de467b5d8922a973bb.tar.gz qutebrowser-c8a030439b01dc92f6e1b1de467b5d8922a973bb.zip |
build_release: print output on nonzero exit code too
Also print output on --debug runs too
-rwxr-xr-x | scripts/dev/build_release.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index 65eef720c..c7cebbe3a 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -121,7 +121,7 @@ def _smoke_test_run( 'about:blank', ':cmd-later 500 quit', ] - return subprocess.run(argv, check=True, capture_output=True) + return subprocess.run(argv, capture_output=True) def smoke_test(executable: pathlib.Path, debug: bool, qt5: bool) -> None: @@ -182,15 +182,14 @@ def smoke_test(executable: pathlib.Path, debug: bool, qt5: bool) -> None: ]) proc = _smoke_test_run(executable) - if debug: - print("Skipping output check for debug build") - return stdout = '\n'.join(_filter_whitelisted(proc.stdout, stdout_whitelist)) stderr = '\n'.join(_filter_whitelisted(proc.stderr, stderr_whitelist)) - if stdout or stderr: - print("Unexpected output, running with --debug") + if stdout or stderr or proc.returncode > 0: + print( + f"Unexpected output, running with --debug (returncode={proc.returncode})" + ) proc = _smoke_test_run(executable, '--debug') debug_stdout = proc.stdout.decode('utf-8') debug_stderr = proc.stderr.decode('utf-8') @@ -232,6 +231,9 @@ def smoke_test(executable: pathlib.Path, debug: bool, qt5: bool) -> None: "", ] + if debug: + print("Skipping output check for debug build") + return raise Exception("\n".join(lines)) # pylint: disable=broad-exception-raised |