Skip to content

Commit

Permalink
test: remove unnecessary syscall to cpuinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Feb 8, 2025
1 parent b181535 commit 6cf2fca
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-crypto-dh-hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-crypto-dh-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-dh-regr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-fs-watch-system-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-hash-seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-heapsnapshot-near-heap-limit-bounded.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const common = require('../common');

if (common.isPi) {
if (common.isPi()) {
common.skip('Too slow for Raspberry Pi devices');
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-heapsnapshot-near-heap-limit-by-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const common = require('../common');

if (common.isPi) {
if (common.isPi()) {
common.skip('Too slow for Raspberry Pi devices');
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-heapsnapshot-near-heap-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const common = require('../common');

if (common.isPi) {
if (common.isPi()) {
common.skip('Too slow for Raspberry Pi devices');
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-next-tick-infinite-calls.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'use strict';
const common = require('../common');

if (common.isPi) {
if (common.isPi()) {
common.skip('Too slow for Raspberry Pi devices');
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-webcrypto-derivebits-pbkdf2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 6cf2fca

Please sign in to comment.