wwtest: bounded package concurrency via exec start/poll
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user