Skip to content
Closed
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
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.
  • Loading branch information
joyeecheung committed Mar 6, 2018
commit 783c03713a225fa229d8842dd9f048bf954acf6e
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