test: parallelize test/run via xargs -P; 180s per-tool timeout
test/run fans test/wcc/*.c across $(nproc) workers via xargs -0 -n2 -P $JOBS; each worker writes <prefix>.status and an optional <prefix>.fail sentinel into a mktemp results dir. The driver collects in glob order so output stays deterministic across runs. Wraps every ww/w6c/w6a/w6l/wwdump invocation in 990-995 with `timeout 180`, bounding orphan compilers under 8-way contention. The direct runwait(exe) calls for fresh-built test binaries get the same treatment via a "timeout 180 %s" snprintf hop. Motivation: pid 2101 was a w6c_ww that ran 42h on /tmp/wcas_asm_1326_15.ww until we killed it during this session; timeout makes that impossible. 993's /tmp/ww_d_hello.ww is now pid-keyed (snprintf %d getpid); without it concurrent runs (or future shards of 993 itself) would race on the staging file. Wall: 9m59s → 4m31s on 8 cores. Same 132/132 status.
This commit is contained in:
@@ -79,12 +79,12 @@ rebuild_one(const char *bin, const char *cwd, const char *tool,
|
||||
|
||||
if (inc_local && inc_local[0]) {
|
||||
snprintf(cmd, sizeof cmd,
|
||||
"cd %s && %s/ww_ww build -I %s/%s -I %s/lib/ww -I %s/lib/ww/lex -I %s/lib/ww/parse -I %s/selfhost/cmd/wcc "
|
||||
"cd %s && timeout 180 %s/ww_ww build -I %s/%s -I %s/lib/ww -I %s/lib/ww/lex -I %s/lib/ww/parse -I %s/selfhost/cmd/wcc "
|
||||
"%s/%s >/dev/null 2>&1",
|
||||
workdir, bin, cwd, inc_local, cwd, cwd, cwd, cwd, cwd, src_rel);
|
||||
} else {
|
||||
snprintf(cmd, sizeof cmd,
|
||||
"cd %s && %s/ww_ww build -I %s/lib/ww -I %s/lib/ww/lex -I %s/lib/ww/parse -I %s/selfhost/cmd/wcc "
|
||||
"cd %s && timeout 180 %s/ww_ww build -I %s/lib/ww -I %s/lib/ww/lex -I %s/lib/ww/parse -I %s/selfhost/cmd/wcc "
|
||||
"%s/%s >/dev/null 2>&1",
|
||||
workdir, bin, cwd, cwd, cwd, cwd, cwd, src_rel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user