feat: reconcile WebAVP desktop parity and releases
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const { spawn } = require('node:child_process');
|
||||
const path = require('node:path');
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname, '..');
|
||||
const electronPath = require('electron');
|
||||
const env = {
|
||||
...process.env,
|
||||
WEBAVP_DISABLE_GPU: process.env.WEBAVP_DISABLE_GPU || '1',
|
||||
WEBAVP_SMOKE_QUIT_AFTER_MS: process.env.WEBAVP_SMOKE_QUIT_AFTER_MS || '250',
|
||||
};
|
||||
|
||||
const child = spawn(electronPath, ['.'], {
|
||||
cwd: ROOT_DIR,
|
||||
env,
|
||||
stdio: 'inherit',
|
||||
shell: false,
|
||||
windowsHide: true,
|
||||
});
|
||||
child.on('error', (err) => {
|
||||
console.error(`[WebAVP] Failed to start Electron smoke test: ${err.message}`);
|
||||
process.exit(1);
|
||||
});
|
||||
child.on('exit', (code, signal) => {
|
||||
if (signal) {
|
||||
console.error(`[WebAVP] Electron smoke test exited via signal ${signal}`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(code || 0);
|
||||
});
|
||||
Reference in New Issue
Block a user