diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2022-02-16 21:52:40 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2022-02-16 21:52:40 +0100 |
commit | 6e2c8d0cddfc626e74728ece87b3974c4ffd5536 (patch) | |
tree | e0c39da5093156488d3655153a444d2de582d680 | |
parent | 9494ec3b00dd07932571742c5aceb991a6fd6050 (diff) | |
download | cython-6e2c8d0cddfc626e74728ece87b3974c4ffd5536.tar.gz |
runtests: Improve exception output.
-rwxr-xr-x | runtests.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/runtests.py b/runtests.py index 8f83e2229..55f244ab0 100755 --- a/runtests.py +++ b/runtests.py @@ -2514,21 +2514,18 @@ def runtests(options, cmd_args, coverage=None): # Run the collected tests. try: if options.shard_num > -1: - sys.stderr.write("Tests in shard %d starting" % options.shard_num) + sys.stderr.write("Tests in shard %d/%d starting\n" % (options.shard_num, options.shard_count)) result = test_runner.run(test_suite) except Exception as exc: # Make sure we print exceptions also from shards. if options.shard_num > -1: - sys.stderr.write("Tests in shard %d crashed: %s" % (options.shard_num, exc)) + sys.stderr.write("Tests in shard %d/%d crashed: %s\n" % (options.shard_num, options.shard_count, exc)) import traceback traceback.print_exc() raise finally: if enable_faulthandler: faulthandler.disable() - if options.shard_num > -1: - sys.stderr.write("Tests in shard %d terminated (%s)" % ( - options.shard_num, sys.exc_info()[1] or "no crash")) if common_utility_dir and options.shard_num < 0 and options.cleanup_workdir: shutil.rmtree(common_utility_dir) |