Skip to content

Commit 46b5915

Browse files
joyeecheungMylesBorins
authored andcommitted
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: #19107 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 12f19a6 commit 46b5915

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎test/parallel/test-postmortem-metadata.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ const nm = spawnSync('nm', args);
2626
if(nm.error&&nm.error.errno==='ENOENT')
2727
common.skip('nm not found on system');
2828

29+
conststderr=nm.stderr.toString();
30+
if(stderr.length>0){
31+
common.skip(`Failed to execute nm: ${stderr}`);
32+
}
33+
2934
constsymbolRe=/\s_?(v8dbg_.+)$/;
3035
constsymbols=nm.stdout.toString().split('\n').reduce((filtered,line)=>{
3136
constmatch=line.match(symbolRe);

0 commit comments

Comments
(0)