Skip to content

Commit

Permalink
test: skip less scenarios for test-linux-perf.js
Browse files Browse the repository at this point in the history
  • Loading branch information
refack committed Apr 23, 2019
1 parent fcb98bb commit 1d512ee
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions test/v8-updates/test-linux-perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/;
Expand Down

0 comments on commit 1d512ee

Please sign in to comment.