diff --git a/tools/gate.py b/tools/gate.py index 538a87892..5e0e8294e 100644 --- a/tools/gate.py +++ b/tools/gate.py @@ -41,7 +41,7 @@ def steps(args): yield "doc tests", ["cargo", "+stable", "test", "--locked", "--workspace", "--doc"] yield "python tests", [sys.executable, "-m", "unittest", "discover", "-s", "tests", "-q"] if not args.no_parity: - yield "vanilla harnesses", [sys.executable, "tools/parity.py", "-j", str(args.jobs)] + yield "vanilla harnesses", [sys.executable, "tools/parity.py", *(["-j", str(args.jobs)] if args.jobs is not None else [])] def head(): @@ -53,7 +53,7 @@ def main(): parser.add_argument("--no-parity", action="store_true", help="skip the vanilla harnesses") parser.add_argument("--quick", action="store_true", help="only formatting, lints and Python tests") parser.add_argument("--known-failures", default="", help="comma-separated harnesses allowed to keep failing") - parser.add_argument("-j", "--jobs", type=int, default=max(1, (os.cpu_count() or 4) // 3), help="parallel harnesses") + parser.add_argument("-j", "--jobs", type=int, help="harnesses at once on this machine (default: tools/parity.py's)") args = parser.parse_args() logs = ROOT / ".local" / "gate" logs.mkdir(parents=True, exist_ok=True) diff --git a/tools/parity_hosts.json b/tools/parity_hosts.json index fcb96e171..a6583a673 100644 --- a/tools/parity_hosts.json +++ b/tools/parity_hosts.json @@ -1,5 +1,5 @@ { - "default": [], + "default": ["macmini"], "hosts": { "macmini": { "ssh": "macmini", @@ -8,7 +8,20 @@ "setup": "source ~/.cargo/env && export JAVA_HOME=$(/usr/libexec/java_home -v 25) && export PATH=$JAVA_HOME/bin:$PATH", "python": "/opt/homebrew/bin/python3.13", "rsync": "/opt/homebrew/bin/rsync", - "jobs": 14 + "jobs": 14, + "exclude": { + "options": "Rust's f64::powf uses the platform libm, which rounds differently on macOS", + "chunk_generation": "one ocean ruined portal differs on macOS (platform float math)" + } + }, + "thinkpad": { + "ssh": "thinkpad", + "root": "code/horizon-parity", + "shell": "sh -c", + "jobs": 2, + "nice": 19, + "environment": {"PARITY_BUILD_JOBS": "2"}, + "note": "hosts the Claude account pool: two harnesses at most, at the lowest priority" } }, "local_only": { diff --git a/tools/supervise.py b/tools/supervise.py index 6886a15ca..49b00d803 100644 --- a/tools/supervise.py +++ b/tools/supervise.py @@ -133,7 +133,8 @@ def integrate(args): if git("rev-parse", "HEAD", cwd=base_tree) == before: print(f"{names}: nothing new for {args.base}.") return 0 - gate = [sys.executable, "tools/gate.py", "-j", str(args.jobs), "--known-failures", ",".join(known)] + gate = [sys.executable, "tools/gate.py", "--known-failures", ",".join(known)] + gate += ["-j", str(args.jobs)] if args.jobs is not None else [] gate += ["--no-parity"] if args.no_parity else [] if subprocess.run(gate, cwd=base_tree).returncode: git("reset", "--hard", before, cwd=base_tree) @@ -158,7 +159,7 @@ def main(): command.set_defaults(run=save) command = commands.add_parser("integrate") command.add_argument("branches", nargs="+", help="merged in order, then gated together") - command.add_argument("-j", "--jobs", type=int, default=8) + command.add_argument("-j", "--jobs", type=int, help="harnesses at once on this machine (default: tools/parity.py's)") command.add_argument("--no-parity", action="store_true", help="skip the vanilla harnesses in the gate") command.set_defaults(run=integrate) args = parser.parse_args() diff --git a/tools/test_rust_parity.py b/tools/test_rust_parity.py index beffc2baa..90725e1a5 100644 --- a/tools/test_rust_parity.py +++ b/tools/test_rust_parity.py @@ -127,7 +127,8 @@ def compare(reference, candidate): raise AssertionError('Parity outputs changed during comparison') def run(command, **kwargs): - subprocess.run(command, cwd=lab.ROOT, check=True, timeout=300, **kwargs) + # A hang guard only: a loaded machine (14 harnesses at once on the Mac mini) can take minutes for one oracle. + subprocess.run(command, cwd=lab.ROOT, check=True, timeout=900, **kwargs) def source_hashes(sources):