Skip to content

Commit

Permalink
test: skip postmortem metadata test when nm fails
Browse files Browse the repository at this point in the history
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.

PR-URL: nodejs#19107
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
joyeecheung committed Mar 7, 2018
1 parent 6c25f2e commit a6c14b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/parallel/test-postmortem-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ const nm = spawnSync('nm', args);
if (nm.error && nm.error.errno === 'ENOENT')
common.skip('nm not found on system');

const stderr = nm.stderr.toString();
if (stderr.length > 0) {
common.skip(`Failed to execute nm: ${stderr}`);
}

const symbolRe = /\s_?(v8dbg_.+)$/;
const symbols = nm.stdout.toString().split('\n').reduce((filtered, line) => {
const match = line.match(symbolRe);
Expand Down

0 comments on commit a6c14b2

Please sign in to comment.