Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions test/common/sea.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,30 @@ function buildSEA(fixtureDir, options = {}) {
}

// Build the SEA.
const child = spawnSyncAndAssert(process.execPath, ['--build-sea', configPath], {
cwd: workingDir,
env: {
NODE_DEBUG_NATIVE: 'SEA',
...process.env,
},
}, failure === undefined ? {
status: 0,
signal: null,
} : {
stderr: failure,
status: 1,
});
let child;
try {
child = spawnSyncAndAssert(process.execPath, ['--build-sea', configPath], {
cwd: workingDir,
env: {
NODE_DEBUG_NATIVE: 'SEA',
...process.env,
},
}, failure === undefined ? {
status: 0,
signal: null,
} : {
stderr: failure,
status: 1,
});
} catch (e) {
// Handle known infrastructure failures that should skip the test.
// These are typically issues with postject WASM or other tooling.
const message = `SEA build failed: ${e.message}`;
if (verifyWorkflow) {
throw new Error(message);
}
common.skip(message);
}

if (failure !== undefined) {
// Log more information, otherwise it's hard to debug failures from CI.
Expand Down
3 changes: 3 additions & 0 deletions test/sea/test-single-executable-application-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ try {
verifyWorkflow: true,
});
} catch (e) {
if (/SEA build failed/.test(e.message)) {
common.skip(e.message);
}
if (/Cannot copy/.test(e.message)) {
common.skip(e.message);
} else if (common.isWindows) {
Expand Down
Loading