mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
test: remove unnecessary syscall to cpuinfo
PR-URL: https://github.com/nodejs/node/pull/56968 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
5d7091f1bc
commit
f9ea8d6dff
12 changed files with 14 additions and 14 deletions
|
@ -124,7 +124,7 @@ const isMacOS = process.platform === 'darwin';
|
|||
const isASan = process.config.variables.asan === 1;
|
||||
const isRiscv64 = process.arch === 'riscv64';
|
||||
const isDebug = process.features.debug;
|
||||
const isPi = (() => {
|
||||
function isPi() {
|
||||
try {
|
||||
// Normal Raspberry Pi detection is to find the `Raspberry Pi` string in
|
||||
// the contents of `/sys/firmware/devicetree/base/model` but that doesn't
|
||||
|
@ -136,7 +136,7 @@ const isPi = (() => {
|
|||
} catch {
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
// When using high concurrency or in the CI we need much more time for each connection attempt
|
||||
net.setDefaultAutoSelectFamilyAttemptTimeout(platformTimeout(net.getDefaultAutoSelectFamilyAttemptTimeout() * 10));
|
||||
|
@ -256,7 +256,7 @@ function platformTimeout(ms) {
|
|||
if (exports.isAIX || exports.isIBMi)
|
||||
return multipliers.two * ms; // Default localhost speed is slower on AIX
|
||||
|
||||
if (isPi)
|
||||
if (isPi())
|
||||
return multipliers.two * ms; // Raspberry Pi devices
|
||||
|
||||
if (isRiscv64) {
|
||||
|
|
|
@ -26,7 +26,7 @@ if (!common.hasCrypto) {
|
|||
common.skip('node compiled without OpenSSL.');
|
||||
}
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ if (!common.hasCrypto) {
|
|||
common.skip('node compiled without OpenSSL.');
|
||||
}
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ if (!common.hasCrypto) {
|
|||
common.skip('missing crypto');
|
||||
}
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ if (!common.isLinux) {
|
|||
common.skip('The fs watch limit is OS-dependent');
|
||||
}
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// Check that spawn child doesn't create duplicated entries
|
||||
const common = require('../common');
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const common = require('../common');
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
const common = require('../common');
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const common = require('../common');
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
'use strict';
|
||||
const common = require('../common');
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ if (!common.hasCrypto) {
|
|||
common.skip('missing crypto');
|
||||
}
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ const common = require('../common');
|
|||
// This test is basically `test-cluster-net-send` but creating lots of workers
|
||||
// so the issue reproduces on OS X consistently.
|
||||
|
||||
if (common.isPi) {
|
||||
if (common.isPi()) {
|
||||
common.skip('Too slow for Raspberry Pi devices');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue