test: detect missing postmortem metadata

This commit updates test-postmortem-metadata to provide a
more useful error message in the scenario where Node is
compiled without postmortem support.

PR-URL: https://github.com/nodejs/node/pull/27828
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
pull/27828/head
cjihrig 2019-05-22 15:40:23 -04:00
parent 6f924b60c5
commit 76b9cf5424
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
1 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,9 @@ const symbols = nm.stdout.toString().split('\n').reduce((filtered, line) => {
return filtered;
}, []);
assert.notStrictEqual(symbols.length, 0, 'No postmortem metadata detected');
const missing = getExpectedSymbols().filter((symbol) => {
return !symbols.includes(symbol);
});