wwtest: bounded package concurrency via exec start/poll

This commit is contained in:
2026-08-08 13:43:55 +09:00
parent 0f0fd36563
commit 15137054e2
2 changed files with 162 additions and 62 deletions

View File

@@ -492,6 +492,19 @@ fn packagepath(relative: str) str = {
assert(!has(outc.stdout, ".hidden"));
assert(!has(outc.stdout, "_skip"));
// Concurrent scheduling must not reorder the emitted byte stream.
let seq: str = strings.dup(outc.stdout);
let j4: []str = [driver("ww"), "test", "-j", "4", spec];
runcommand(root, "tree-j4", j4,
(30i64 * (time.second: i64)): time.duration, &outc);
expectexit(&outc, 0);
assert(same(outc.stdout, seq));
let j0: []str = [driver("ww"), "test", "-j", "0", spec];
runcommand(root, "tree-j0", j0, time.second, &outc);
expectexit(&outc, 2);
assert(has(outc.stderr, "usage: wwtest package"));
let patc: []str = [driver("ww"), "test", spec, "glob*"];
let patw: []str = [driver("ww_ww"), "test", spec, "glob*"];
runcommand(root, "tree-pattern-c", patc, time.second, &outc);