diff options
author | Simon Glass <sjg@chromium.org> | 2024-12-14 11:20:21 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-01-25 16:27:24 -0600 |
commit | 64d5a0550a148c9266f5f66538f0d56bb2278bef (patch) | |
tree | 3b70b62d7d94f011aa2bf9123dbccf6367fb0be4 /test/py/conftest.py | |
parent | ba87a2fcfbfb79813983f106c212684907ca6c55 (diff) |
test/py: Handle u-boot-test-getrole failure
This script can fail if there is no toolchain available for the board.
At present this is not handled very nicely, in that only the error
output is reported. It is much more useful to see everything, so
combine stdout and stderr and report them both.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py/conftest.py')
-rw-r--r-- | test/py/conftest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/py/conftest.py b/test/py/conftest.py index 44b22761a8b..3bd333bfd24 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -165,10 +165,11 @@ def get_details(config): # Make sure the script sees that it is being run from pytest env['U_BOOT_SOURCE_DIR'] = source_dir - proc = subprocess.run(cmd, capture_output=True, encoding='utf-8', + proc = subprocess.run(cmd, stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, encoding='utf-8', env=env) if proc.returncode: - raise ValueError(proc.stderr) + raise ValueError(f"Error {proc.returncode} running {cmd}: '{proc.stderr} '{proc.stdout}'") # For debugging # print('conftest: lab:', proc.stdout) vals = {} |