summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-03-03 17:25:58 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2018-03-08 01:39:59 +0800
commita6c14b2f4259a9ca080a7b486dc934e4ccef8938 (patch)
tree3c234598f907c96ddaf8a75ba59d6b5f3f01570e
parent6c25f2ea49c2521dfd2423bf3a06222633ec4dc9 (diff)
downloadandroid-node-v8-a6c14b2f4259a9ca080a7b486dc934e4ccef8938.tar.gz
android-node-v8-a6c14b2f4259a9ca080a7b486dc934e4ccef8938.tar.bz2
android-node-v8-a6c14b2f4259a9ca080a7b486dc934e4ccef8938.zip
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 <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>
-rw-r--r--test/parallel/test-postmortem-metadata.js5
1 files changed, 5 insertions, 0 deletions
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);