Skip to content

Commit d3a10c7

Browse files
joyeecheungMylesBorins
authored andcommitted
test: skip postmortem metadata test when nm fails
On Windows with msys installation, `nm` is available but it is not able to grab symbols from the Windows build. Skipping the test if nm outputs anything to stderr fixes that. Backport-PR-URL: #22380 PR-URL: #19107 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 1116d32 commit d3a10c7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/parallel/test-postmortem-metadata.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ const nm = spawnSync('nm', args);
2323
if (nm.error && nm.error.errno === 'ENOENT')
2424
common.skip('nm not found on system');
2525

26+
const stderr = nm.stderr.toString();
27+
if (stderr.length > 0) {
28+
common.skip(`Failed to execute nm: ${stderr}`);
29+
}
30+
2631
const symbolRe = /\s_?(v8dbg_.+)$/;
2732
const symbols = nm.stdout.toString().split('\n').reduce((filtered, line) => {
2833
const match = line.match(symbolRe);

0 commit comments

Comments
 (0)