From a6c14b2f4259a9ca080a7b486dc934e4ccef8938 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sat, 3 Mar 2018 17:25:58 +0800 Subject: 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. PR-URL: https://github.com/nodejs/node/pull/19107 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Matheus Marchini Reviewed-By: James M Snell --- test/parallel/test-postmortem-metadata.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/parallel/test-postmortem-metadata.js b/test/parallel/test-postmortem-metadata.js index a326438e45..1f4cc7e605 100644 --- a/test/parallel/test-postmortem-metadata.js +++ b/test/parallel/test-postmortem-metadata.js @@ -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); -- cgit v1.2.3