The Wayback Machine - https://web.archive.org/web/20250407173200/https://github.com/nodejs/node/commit/776d291a07
Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Commit 776d291

Browse filesBrowse files
BethGriggsaddaleax
authored andcommitted
test: run tests even if os.cpus() fails
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>
1 parent 8bf42b4 commit 776d291
Copy full SHA for 776d291

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎test/common.js

Copy file name to clipboardexpand all lines: test/common.js
+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ exports.isOSX = process.platform === 'darwin';
3232
exports.enoughTestMem = os.totalmem() > 0x40000000; /* 1 Gb */
3333

3434
const cpus = os.cpus();
35-
exports.enoughTestCpu = cpus.length > 1 || cpus[0].speed > 999;
35+
exports.enoughTestCpu = Array.isArray(cpus) &&
36+
(cpus.length > 1 || cpus[0].speed > 999);
3637

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.