From cdc7a19f48b049eb64a9017a4c232d2290816496 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Jun 2021 08:25:29 -0700 Subject: [PATCH] test: remove common.enoughTestCpu All hosts in CI return true for common.enoughTestCpu. At least for our CI, it is always true, so we can remove it. PR-URL: https://github.com/nodejs/node/pull/39161 Reviewed-By: Luigi Pinca --- test/common/README.md | 7 ------- test/common/index.js | 5 ----- test/common/index.mjs | 2 -- test/pummel/test-fs-watch-system-limit.js | 4 ---- test/tick-processor/test-tick-processor-builtin.js | 3 --- test/tick-processor/test-tick-processor-cpp-core.js | 3 --- .../test-tick-processor-polyfill-brokenfile.js | 3 --- test/tick-processor/test-tick-processor-preprocess-flag.js | 3 --- test/tick-processor/test-tick-processor-unknown.js | 3 --- 9 files changed, 33 deletions(-) diff --git a/test/common/README.md b/test/common/README.md index 7b76c1a746c656..6b42fa1070d015 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -62,13 +62,6 @@ On non-Windows platforms, this always returns `true`. Creates a 10 MB file of all null characters. -### `enoughTestCpu` - -* [<boolean>][] - -Indicates if there is more than 1 CPU or that the single CPU has a speed of at -least 1 GHz. - ### `enoughTestMem` * [<boolean>][] diff --git a/test/common/index.js b/test/common/index.js index a5d74a3c5b49d6..1ffe7b48049d29 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -788,11 +788,6 @@ const common = { skipIfInspectorDisabled, skipIfWorker, - get enoughTestCpu() { - const cpus = require('os').cpus(); - return Array.isArray(cpus) && (cpus.length > 1 || cpus[0].speed > 999); - }, - get enoughTestMem() { return require('os').totalmem() > 0x70000000; /* 1.75 Gb */ }, diff --git a/test/common/index.mjs b/test/common/index.mjs index 9700fe8039c771..1824497ff6533f 100644 --- a/test/common/index.mjs +++ b/test/common/index.mjs @@ -18,7 +18,6 @@ const { isLinux, isOSX, enoughTestMem, - enoughTestCpu, buildType, localIPv6Hosts, opensslCli, @@ -64,7 +63,6 @@ export { isLinux, isOSX, enoughTestMem, - enoughTestCpu, buildType, localIPv6Hosts, opensslCli, diff --git a/test/pummel/test-fs-watch-system-limit.js b/test/pummel/test-fs-watch-system-limit.js index 6662986a1a8ee0..9c378bec6d8cd6 100644 --- a/test/pummel/test-fs-watch-system-limit.js +++ b/test/pummel/test-fs-watch-system-limit.js @@ -9,10 +9,6 @@ if (!common.isLinux) { common.skip('The fs watch limit is OS-dependent'); } -if (!common.enoughTestCpu) { - common.skip('This test is resource-intensive'); -} - if ((process.config.variables.arm_version === '6') || (process.config.variables.arm_version === '7')) { common.skip('Too slow for armv6 and armv7 bots'); diff --git a/test/tick-processor/test-tick-processor-builtin.js b/test/tick-processor/test-tick-processor-builtin.js index 1f38abe08c32e2..f01f0986682dc9 100644 --- a/test/tick-processor/test-tick-processor-builtin.js +++ b/test/tick-processor/test-tick-processor-builtin.js @@ -2,9 +2,6 @@ const common = require('../common'); const { isCPPSymbolsNotMapped } = require('./util'); -if (!common.enoughTestCpu) - common.skip('test is CPU-intensive'); - if (isCPPSymbolsNotMapped) { common.skip('C++ symbols are not mapped for this os.'); } diff --git a/test/tick-processor/test-tick-processor-cpp-core.js b/test/tick-processor/test-tick-processor-cpp-core.js index e76d99ab09db7b..89943cca5c8329 100644 --- a/test/tick-processor/test-tick-processor-cpp-core.js +++ b/test/tick-processor/test-tick-processor-cpp-core.js @@ -2,9 +2,6 @@ const common = require('../common'); const { isCPPSymbolsNotMapped } = require('./util'); -if (!common.enoughTestCpu) - common.skip('test is CPU-intensive'); - if (isCPPSymbolsNotMapped) { common.skip('C++ symbols are not mapped for this os.'); } diff --git a/test/tick-processor/test-tick-processor-polyfill-brokenfile.js b/test/tick-processor/test-tick-processor-polyfill-brokenfile.js index 98cbf5bb414789..926c96e4d7e6cd 100644 --- a/test/tick-processor/test-tick-processor-polyfill-brokenfile.js +++ b/test/tick-processor/test-tick-processor-polyfill-brokenfile.js @@ -4,9 +4,6 @@ const { isCPPSymbolsNotMapped } = require('./util'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); -if (!common.enoughTestCpu) - common.skip('test is CPU-intensive'); - if (isCPPSymbolsNotMapped) { common.skip('C++ symbols are not mapped for this OS.'); } diff --git a/test/tick-processor/test-tick-processor-preprocess-flag.js b/test/tick-processor/test-tick-processor-preprocess-flag.js index 8b1ec9920f47ed..b003f7c6b8b01f 100644 --- a/test/tick-processor/test-tick-processor-preprocess-flag.js +++ b/test/tick-processor/test-tick-processor-preprocess-flag.js @@ -2,9 +2,6 @@ const common = require('../common'); const { isCPPSymbolsNotMapped } = require('./util'); -if (!common.enoughTestCpu) - common.skip('test is CPU-intensive'); - if (isCPPSymbolsNotMapped) { common.skip('C++ symbols are not mapped for this os.'); } diff --git a/test/tick-processor/test-tick-processor-unknown.js b/test/tick-processor/test-tick-processor-unknown.js index f894ae919acf66..42208f3bb36d36 100644 --- a/test/tick-processor/test-tick-processor-unknown.js +++ b/test/tick-processor/test-tick-processor-unknown.js @@ -9,9 +9,6 @@ const common = require('../common'); if (common.isAIX) common.skip('AIX address range too big for scripts.'); -if (!common.enoughTestCpu) - common.skip('test is CPU-intensive'); - const base = require('./tick-processor-base.js'); // Unknown checked for to prevent flakiness, if pattern is not found,