diff options
author | MacroFake <falke.marco@gmail.com> | 2022-09-09 10:32:42 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-09-09 10:32:46 +0200 |
commit | 013924aa6dc91dd8be93c1eaab6546710ed7fde2 (patch) | |
tree | 02e2c868c768a48d9eb8b24a0f5248ab17db28b0 /test | |
parent | a9049dd296a47319038d8c34bcc1ca46c89dee9c (diff) | |
parent | 07b6e743147f410d8ceb4b6b3282e9fba4cafe50 (diff) |
Merge bitcoin/bitcoin#26031: test: Display skipped tests reason
07b6e743147f410d8ceb4b6b3282e9fba4cafe50 test: Display skipped tests reason (Aurèle Oulès)
Pull request description:
Attempt to fix #26023.
ACKs for top commit:
brunoerg:
ACK 07b6e743147f410d8ceb4b6b3282e9fba4cafe50
Tree-SHA512: 5d8f7fbd8d65772000a5da8c01276948b157d93d359203c6442cf2681cdcc2426b1fee7ec62cee100019c59a486a96ad98d5e819bffe1fd37624dcd28f42aed2
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/test_runner.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 267d8e2177..c47e4d9b84 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -555,14 +555,14 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage= while i < test_count: if failfast and not all_passed: break - for test_result, testdir, stdout, stderr in job_queue.get_next(): + for test_result, testdir, stdout, stderr, skip_reason in job_queue.get_next(): test_results.append(test_result) i += 1 done_str = "{}/{} - {}{}{}".format(i, test_count, BOLD[1], test_result.name, BOLD[0]) if test_result.status == "Passed": logging.debug("%s passed, Duration: %s s" % (done_str, test_result.time)) elif test_result.status == "Skipped": - logging.debug("%s skipped" % (done_str)) + logging.debug(f"{done_str} skipped ({skip_reason})") else: all_passed = False print("%s failed, Duration: %s s\n" % (done_str, test_result.time)) @@ -686,10 +686,12 @@ class TestHandler: log_out.seek(0), log_err.seek(0) [stdout, stderr] = [log_file.read().decode('utf-8') for log_file in (log_out, log_err)] log_out.close(), log_err.close() + skip_reason = None if proc.returncode == TEST_EXIT_PASSED and stderr == "": status = "Passed" elif proc.returncode == TEST_EXIT_SKIPPED: status = "Skipped" + skip_reason = re.search(r"Test Skipped: (.*)", stdout).group(1) else: status = "Failed" self.num_running -= 1 @@ -698,7 +700,7 @@ class TestHandler: clearline = '\r' + (' ' * dot_count) + '\r' print(clearline, end='', flush=True) dot_count = 0 - ret.append((TestResult(name, status, int(time.time() - start_time)), testdir, stdout, stderr)) + ret.append((TestResult(name, status, int(time.time() - start_time)), testdir, stdout, stderr, skip_reason)) if ret: return ret if self.use_term_control: |