fix: close PI-090 review findings
This commit is contained in:
@@ -30,6 +30,28 @@ function runVitest(runtimeRoot) {
|
||||
});
|
||||
}
|
||||
|
||||
function runElectronProductTools() {
|
||||
return new Promise((resolvePromise, reject) => {
|
||||
const child = spawn(process.execPath, [
|
||||
resolve('scripts/run-electron-vitest.mjs'),
|
||||
'tests/unit/pi-extension-bundle.test.ts',
|
||||
], {
|
||||
cwd: process.cwd(),
|
||||
stdio: 'inherit',
|
||||
windowsHide: true,
|
||||
});
|
||||
child.once('error', reject);
|
||||
child.once('exit', (code, signal) => {
|
||||
if (code === 0) resolvePromise();
|
||||
else {
|
||||
reject(new Error(
|
||||
`Packaged product-tools Electron smoke failed with code ${code ?? 'null'} signal ${signal ?? 'none'}`,
|
||||
));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const outputRoot = await mkdtemp(join(tmpdir(), 'makelore-pi-subagent-package-'));
|
||||
try {
|
||||
const [bundle] = await bundlePiRuntime({
|
||||
@@ -38,6 +60,7 @@ try {
|
||||
});
|
||||
if (!bundle) throw new Error('Pi runtime bundler returned no staged runtime');
|
||||
await runVitest(bundle.destination);
|
||||
await runElectronProductTools();
|
||||
} finally {
|
||||
await rm(outputRoot, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user