aboutsummaryrefslogtreecommitdiff
path: root/tests/run.py
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.one>2026-10-16 20:53:55 +0800
committer_ov4 <ov4@ov4.one>2026-10-16 20:53:55 +0800
commitd19f9ddb866ac2415cbfe66966897a8efe8ddb63 (patch)
tree6be1a9a6e316e776a396813f7cb22c688287b21a /tests/run.py
parent5c00b8cd03cbfc516cce92229f3f4974d7549c24 (diff)
test(compiler): add seeded C++ differential tests across seven groups
Generate 10000 random records per group plus boundary inputs using a portable SHA-256 stream. Compare native and runner output independently. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'tests/run.py')
-rw-r--r--tests/run.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/run.py b/tests/run.py
index 432d1b9..0d57728 100644
--- a/tests/run.py
+++ b/tests/run.py
@@ -201,7 +201,8 @@ def main(argv=None):
if not records or int(records[0]) != len(records) - 1:
raise Failure("generator must emit record count followed by one record per line")
work = workspace(case_dir, directory, "reference")
- reference = commands.run([args.reference], work, data)
+ reference = commands.run([args.reference], work, data,
+ timeout=config.get("timeout", 30))
if reference.returncode != 0 or reference.stderr:
raise Failure(f"reference failed ({reference.returncode}): {reference.stderr!r}")
expected = reference.stdout
@@ -221,7 +222,7 @@ def main(argv=None):
command = [target]
else:
command = [args.cpsc, source, "-r"]
- result = commands.run(command, work, data)
+ result = commands.run(command, work, data, timeout=config.get("timeout", 30))
if suite == "ii" and normalized(result.stdout) != normalized(expected):
wanted, got = normalized(expected).splitlines(), normalized(result.stdout).splitlines()
index = next((i for i in range(min(len(wanted), len(got)))