diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-03-03 17:25:58 +0800 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-09-06 09:40:51 -0700 |
commit | d3a10c70f1b43d91bc1239365ff04b02cd0f173a (patch) | |
tree | 884cdd23e9aca8b4f183a88972eb1b2b3aa55bf0 /test | |
parent | 1116d3274d8e1aa2b232dc915b64f47a932d56a7 (diff) | |
download | node-new-d3a10c70f1b43d91bc1239365ff04b02cd0f173a.tar.gz |
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: https://github.com/nodejs/node/pull/22380
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-postmortem-metadata.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/parallel/test-postmortem-metadata.js b/test/parallel/test-postmortem-metadata.js index 75cc7bdda3..1860028333 100644 --- a/test/parallel/test-postmortem-metadata.js +++ b/test/parallel/test-postmortem-metadata.js @@ -23,6 +23,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); |