Skip to content

Commit 5f4146d

Browse files
committed
Print durations by default
1 parent 3249528 commit 5f4146d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

graalpython/com.oracle.graal.python.test/src/runner.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ def report_result(self, result: TestResult):
329329
message = f"{result.test_id} ... {result.status}"
330330
if result.status == TestStatus.SKIPPED and result.param:
331331
message = f"{message} {result.param!r}"
332+
else:
333+
message = f"{message} ({result.duration:.2f}s)"
332334
log(message)
333335

334336
def tests_failed(self):
@@ -521,6 +523,8 @@ def run_partitions_in_subprocesses(self, executor, partitions: list[list['Test']
521523

522524
def dump_worker_status():
523525
with logger.lock:
526+
log("=" * 80)
527+
log("Dumping test worker status:")
524528
for i, partition in enumerate(partitions):
525529
not_started = 0
526530
if futures[i].running():
@@ -529,6 +533,7 @@ def dump_worker_status():
529533
not_started += len(partition)
530534
if not_started:
531535
log(f"There are {not_started} tests not assigned to any worker")
536+
log("=" * 80)
532537

533538
try:
534539
def sigterm_handler(_signum, _frame):

mx.graalpython/mx_graalpython.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ def run_python_unittests(python_binary, args=None, paths=None, exclude=None, env
10961096
if use_pytest:
10971097
args += ["-m", "pytest", "-v", "--assert=plain", "--tb=native"]
10981098
else:
1099-
args += [_python_test_runner(), "--durations", "25", "-n", str(parallel), f"--subprocess-args={shlex.join(args)}"]
1099+
args += [_python_test_runner(), "--durations", "10", "-n", str(parallel), f"--subprocess-args={shlex.join(args)}"]
11001100

11011101
if runner_args:
11021102
args += runner_args

0 commit comments

Comments
 (0)