Files
RustPython/scripts/cargo-llvm-cov.py
Jeong, YunWon b366369119 Run llvm-cov in release so coverage finishes under 6h
Debug+instrumented `-m test -u all` spent 5.5h on 41 tests. Use
--release, a 120s per-test timeout, and -j0. Bound the suite step
at 180 minutes so a hang still leaves time to report.

Assisted-by: Grok:4.6
2026-09-22 23:47:36 +09:00

32 lines
681 B
Python

import os
import subprocess
TARGET = "extra_tests/snippets"
def run_llvm_cov(file_path: str):
"""Run cargo llvm-cov on a file."""
if file_path.endswith(".py"):
command = [
"cargo",
"llvm-cov",
"--no-report",
"--release",
"run",
"--",
file_path,
]
subprocess.call(command)
def iterate_files(folder: str):
"""Iterate over all files in a folder."""
for root, _, files in os.walk(folder):
for file in files:
file_path = os.path.join(root, file)
run_llvm_cov(file_path)
if __name__ == "__main__":
iterate_files(TARGET)