From 1d512eecf76f98aabf793f493472649191bf4c78 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Tue, 23 Apr 2019 10:13:17 -0400 Subject: [PATCH] test: skip less scenarios for test-linux-perf.js --- test/v8-updates/test-linux-perf.js | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/test/v8-updates/test-linux-perf.js b/test/v8-updates/test-linux-perf.js index 0a7f199e040d58..2dde0feb97231c 100644 --- a/test/v8-updates/test-linux-perf.js +++ b/test/v8-updates/test-linux-perf.js @@ -47,22 +47,14 @@ if (!common.isLinux) common.skip('only testing Linux for now'); const perf = spawnSync('perf', perfArgs, options); - -if (perf.error && perf.error.errno === 'ENOENT') - common.skip('perf not found on system'); - -if (perf.status !== 0) { - common.skip(`Failed to execute perf: ${perf.stderr}`); -} +assert.ifError(perf.error); +if (perf.status !== 0) + throw new Error(`Failed to execute 'perf': ${perf.stderr}`); const perfScript = spawnSync('perf', perfScriptArgs, options); - -if (perf.error) - common.skip(`perf script aborted: ${perf.error.errno}`); - -if (perfScript.status !== 0) { - common.skip(`Failed to execute perf script: ${perfScript.stderr}`); -} +assert.ifError(perfScript.error); +if (perfScript.status !== 0) + throw new Error(`Failed to execute perf script: ${perfScript.stderr}`); const interpretedFunctionOneRe = /InterpretedFunction:functionOne/; const compiledFunctionOneRe = /LazyCompile:\*functionOne/;