Skip to content

Commit

Permalink
test: run tests even if os.cpus() fails
Browse files Browse the repository at this point in the history
Currently if the os.cpus() call fails every test will fail. As there is
already a test for os.cpus(), the other tests should run even if the
os.cpus() call fails.

PR-URL: #9616

Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
BethGriggs authored and addaleax committed Dec 8, 2016
1 parent 1bb6266 commit 333e5d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ exports.isOSX = process.platform === 'darwin';
exports.enoughTestMem = os.totalmem() > 0x40000000; /* 1 Gb */

const cpus = os.cpus();
exports.enoughTestCpu = cpus.length > 1 || cpus[0].speed > 999;
exports.enoughTestCpu = Array.isArray(cpus) &&
(cpus.length > 1 || cpus[0].speed > 999);

exports.rootDir = exports.isWindows ? 'c:\\' : '/';
exports.buildType = process.config.target_defaults.default_configuration;
Expand Down

0 comments on commit 333e5d1

Please sign in to comment.