diff options
| author | practicalswift <[email protected]> | 2020-02-19 14:27:19 +0000 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2020-02-19 14:27:19 +0000 |
| commit | f2472f64604a0c583f950c56e8753d0bee246388 (patch) | |
| tree | d340891bcc867d164cbb84d5887779db4d16654b /test/fuzz | |
| parent | tests: Add --exclude integer,parse_iso8601 (temporarily) to make Travis pass ... (diff) | |
| download | discoin-f2472f64604a0c583f950c56e8753d0bee246388.tar.xz discoin-f2472f64604a0c583f950c56e8753d0bee246388.zip | |
tests: Improve test runner output in case of target errors
Diffstat (limited to 'test/fuzz')
| -rwxr-xr-x | test/fuzz/test_runner.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/fuzz/test_runner.py b/test/fuzz/test_runner.py index 0f7a349e4..a56651cca 100755 --- a/test/fuzz/test_runner.py +++ b/test/fuzz/test_runner.py @@ -168,7 +168,15 @@ def run_once(*, corpus, test_list, build_dir, export_coverage, use_valgrind): result = subprocess.run(args, stderr=subprocess.PIPE, universal_newlines=True) output = result.stderr logging.debug('Output: {}'.format(output)) - result.check_returncode() + try: + result.check_returncode() + except subprocess.CalledProcessError as e: + if e.stdout: + logging.info(e.stdout) + if e.stderr: + logging.info(e.stderr) + logging.info("Target \"{}\" failed with exit code {}: {}".format(t, e.returncode, " ".join(args))) + sys.exit(1) if not export_coverage: continue for l in output.splitlines(): |