diff options
| author | Scott Gasch <[email protected]> | 2022-06-02 21:43:08 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-06-02 21:43:08 -0700 |
| commit | ba21e38cdb3d504a69f6808913ea2a649ab4e916 (patch) | |
| tree | b262b0a0d968c84ab3c16ebc0927f932ca14a3ec /tests/run_tests.py | |
| parent | 19c9d04094b49b25826b875bf06e5e622f97e1d5 (diff) | |
Make the bar graph thing do fractions.
Diffstat (limited to 'tests/run_tests.py')
| -rwxr-xr-x | tests/run_tests.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py index 5162e23..6f4b399 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -372,6 +372,10 @@ def main() -> Optional[int]: failed = 0 for thread in threads: + (s, tr) = thread.get_status() + started += s + failed += len(tr.tests_failed) + len(tr.tests_timed_out) + done += failed + len(tr.tests_succeeded) if not thread.is_alive(): tid = thread.name if tid not in results: @@ -383,11 +387,6 @@ def main() -> Optional[int]: 'Thread %s returned abnormal results; killing the others.', tid ) halt_event.set() - else: - (s, tr) = thread.get_status() - started += s - failed += len(tr.tests_failed) + len(tr.tests_timed_out) - done += failed + len(tr.tests_succeeded) if started > 0: percent_done = done / started @@ -401,18 +400,19 @@ def main() -> Optional[int]: if percent_done < 100.0: print( - text_utils.bar_graph( - percent_done, + text_utils.bar_graph_string( + done, + started, + text=text_utils.BarGraphText.FRACTION, width=80, fgcolor=color, ), end='\r', flush=True, ) - else: - print("Finished.\n") time.sleep(0.5) + print('[2K\rFinal Report:') if config.config['coverage']: code_coverage_report() total_problems = test_results_report(results) |
