Private
Public Access
0
0

push latest related to default layout

This commit is contained in:
2026-06-07 23:50:24 -04:00
parent 2db1436130
commit 746dde8286
5 changed files with 26 additions and 18 deletions
+9 -8
View File
@@ -56,32 +56,33 @@ def run_tests(batch_size: int, timeout: int) -> int:
start: float = time.perf_counter()
try:
subprocess.run(cmd, check=True, timeout=timeout)
batch_failed: bool = False
except subprocess.TimeoutExpired:
elapsed: float = time.perf_counter() - start
batch_timings.append(elapsed)
print(f" >>> Batch {batch_idx} TIMED OUT after {elapsed:.1f}s (limit {timeout}s)")
batch_failed = True
failed_files.extend(batch)
except subprocess.CalledProcessError as e:
elapsed = time.perf_counter() - start
batch_timings.append(elapsed)
print(f" >>> Batch {batch_idx} FAILED after {elapsed:.1f}s (pytest exit {e.returncode})")
batch_failed = True
failed_files.extend(batch)
else:
elapsed = time.perf_counter() - start
batch_timings.append(elapsed)
print(f" >>> Batch {batch_idx} passed in {elapsed:.1f}s")
if batch_failed:
failed_files.extend(batch)
print()
print("=" * 70)
if failed_files:
print(f"Total batches: {len(batches)}; failed: {len(batches) - batch_timings[:len(batches)].count(...) if False else sum(1 for t, b in zip(batch_timings, batches) if any(f in failed_files for f in b))}")
failed_batch_count: int = sum(
1 for batch in batches if any(f in failed_files for f in batch)
)
print(f"Total batches: {len(batches)}; failed batches: {failed_batch_count}")
print(f"Failed files: {len(failed_files)}")
print("=" * 70)
for f in failed_files:
print(f" - {f}")
print("=" * 70)
return 1
total_time: float = sum(batch_timings)
avg: float = total_time / max(len(batch_timings), 1)
@@ -92,8 +93,8 @@ def run_tests(batch_size: int, timeout: int) -> int:
def main() -> None:
ap: argparse.ArgumentParser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
ap.add_argument("--batch-size", type=int, default=64, help="tests per batch (default: 32)")
ap.add_argument("--timeout", type=int, default=1000, help="seconds per batch (default: 180)")
ap.add_argument("--batch-size", type=int, default=32, help="tests per batch (default: 32)")
ap.add_argument("--timeout", type=int, default=180, help="seconds per batch (default: 180)")
args: argparse.Namespace = ap.parse_args()
if args.batch_size <= 0:
print("ERROR: --batch-size must be positive", file=sys.stderr)