acceptance: create the --out folder (both CI runs passed every quick cell, then failed writing acceptance/<run>.json), log the warm-up cell
This commit is contained in:
parent
2c14e5318a
commit
17883e1529
1 changed files with 6 additions and 1 deletions
|
|
@ -466,7 +466,11 @@ async function run(argv: string[]): Promise<void> {
|
|||
// warm up: the first npx / bun x call installs the tarball; run it alone so parallel cells do not race the cache
|
||||
const queue = [...list];
|
||||
const first = queue.findIndex(c => c.id === '--version');
|
||||
if (first >= 0) results.push(await runCell(queue.splice(first, 1)[0]!, rt, mock.base, tpl, home, platform, running));
|
||||
if (first >= 0) {
|
||||
const r = await runCell(queue.splice(first, 1)[0]!, rt, mock.base, tpl, home, platform, running);
|
||||
console.log(`${r.ok ? 'ok ' : 'FAIL'} ${r.id} (${r.ms} ms, installs the tarball)${r.error ? `: ${r.error}` : ''}`);
|
||||
results.push(r);
|
||||
}
|
||||
let stopped = false;
|
||||
const budget = setTimeout(() => { stopped = true; console.log(`acceptance: budget of ${budgetMs / 60_000} min used up; killing the running cells`); }, budgetMs);
|
||||
await Promise.all(Array.from({ length: jobs }, async () => {
|
||||
|
|
@ -484,6 +488,7 @@ async function run(argv: string[]): Promise<void> {
|
|||
results.sort((a, b) => (order.get(a.id) ?? 0) - (order.get(b.id) ?? 0));
|
||||
const failed = results.filter(r => !r.ok);
|
||||
const out = resolve(arg('--out') ?? join(ROOT, `acceptance-${platform}-${rt.name.replace(/\s+/g, '')}.json`));
|
||||
mkdirSync(dirname(out), { recursive: true });
|
||||
writeFileSync(out, JSON.stringify({ platform, runtime: rt.name, label: rt.label, version: PKG.version, quick, at: new Date().toISOString(), results }, null, 2));
|
||||
console.log(`acceptance: ${results.length - failed.length}/${results.length} cells passed in ${Math.round((Date.now() - t0) / 1000)} s -> ${out}`);
|
||||
if (failed.length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue