CI: Include stdout/stderr in test failures

This commit is contained in:
Miro Hrončok 2023-01-19 17:36:21 +01:00 committed by churchyard
parent 9d7ca941e7
commit 1bdd94dd1d
2 changed files with 6 additions and 1 deletions

View File

@ -53,6 +53,11 @@ def run_pythondistdeps(provides_params, requires_params, dist_egg_info_path, exp
requires = subprocess.run((sys.executable, PYTHONDISTDEPS_PATH, *shlex.split(requires_params)), requires = subprocess.run((sys.executable, PYTHONDISTDEPS_PATH, *shlex.split(requires_params)),
input=files, capture_output=True, check=False, encoding="utf-8") input=files, capture_output=True, check=False, encoding="utf-8")
print(provides_params, provides.stdout, sep=':\n', file=sys.stdout)
print(requires_params, requires.stdout, sep=':\n', file=sys.stdout)
print(provides_params, provides.stderr, sep=':\n', file=sys.stderr)
print(requires_params, requires.stderr, sep=':\n', file=sys.stderr)
if expect_failure: if expect_failure:
if provides.returncode == 0 or requires.returncode == 0: if provides.returncode == 0 or requires.returncode == 0:
raise RuntimeError(f"pythondistdeps.py did not exit with a non-zero code as expected.\n" raise RuntimeError(f"pythondistdeps.py did not exit with a non-zero code as expected.\n"

View File

@ -36,7 +36,7 @@
- pytest: - pytest:
dir: ./tests dir: ./tests
# Use update-test-sources.sh to update the test data # Use update-test-sources.sh to update the test data
run: python3 -m pytest --capture=no -vvv run: python3 -m pytest -vvv
required_packages: required_packages:
- rpm-build - rpm-build
- rpmdevtools - rpmdevtools