diff options
author | James M Snell <jasnell@gmail.com> | 2018-08-22 08:14:31 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-08-24 11:14:07 -0700 |
commit | 6bb96a1183d9492a34a745a5d1bb48552a4eef24 (patch) | |
tree | 1ac28be66c48f0511f36fffd24eb03027a960e06 | |
parent | 5673017c33c96a20c39cd5deb70714a41267d029 (diff) | |
download | android-node-v8-6bb96a1183d9492a34a745a5d1bb48552a4eef24.tar.gz android-node-v8-6bb96a1183d9492a34a745a5d1bb48552a4eef24.tar.bz2 android-node-v8-6bb96a1183d9492a34a745a5d1bb48552a4eef24.zip |
test: move common.isCPPSymbolsNotMapped to tick-processor tests
`common.isCPPSymbolsNotMapped` is used only by the tests in the
`test/tick-processor` folder. Move it local to those to get it
out of `common`.
PR-URL: https://github.com/nodejs/node/pull/22459
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
-rw-r--r-- | test/common/README.md | 5 | ||||
-rw-r--r-- | test/common/index.js | 6 | ||||
-rw-r--r-- | test/common/index.mjs | 6 | ||||
-rw-r--r-- | test/tick-processor/test-tick-processor-builtin.js | 3 | ||||
-rw-r--r-- | test/tick-processor/test-tick-processor-cpp-core.js | 3 | ||||
-rw-r--r-- | test/tick-processor/test-tick-processor-polyfill-brokenfile.js | 3 | ||||
-rw-r--r-- | test/tick-processor/test-tick-processor-preprocess-flag.js | 3 | ||||
-rw-r--r-- | test/tick-processor/util.js | 18 |
8 files changed, 28 insertions, 19 deletions
diff --git a/test/common/README.md b/test/common/README.md index 63d3b16361..36f3afb5c9 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -224,11 +224,6 @@ Platform check for Windows. Platform check for Windows 32-bit on Windows 64-bit. -### isCPPSymbolsNotMapped -* [<boolean>] - -Platform check for C++ symbols are mapped or not. - ### leakedGlobals() * return [<Array>] diff --git a/test/common/index.js b/test/common/index.js index a4f31022b0..ad2a82f3ac 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -799,9 +799,3 @@ exports.runWithInvalidFD = function(func) { exports.printSkipMessage('Could not generate an invalid fd'); }; - -exports.isCPPSymbolsNotMapped = exports.isWindows || - exports.isSunOS || - exports.isAIX || - exports.isLinuxPPCBE || - exports.isFreeBSD; diff --git a/test/common/index.mjs b/test/common/index.mjs index 5a0d547d59..c8e6295b5c 100644 --- a/test/common/index.mjs +++ b/test/common/index.mjs @@ -51,8 +51,7 @@ const { getBufferSources, disableCrashOnUnhandledRejection, getTTYfd, - runWithInvalidFD, - isCPPSymbolsNotMapped + runWithInvalidFD } = common; export { @@ -104,6 +103,5 @@ export { getBufferSources, disableCrashOnUnhandledRejection, getTTYfd, - runWithInvalidFD, - isCPPSymbolsNotMapped + runWithInvalidFD }; diff --git a/test/tick-processor/test-tick-processor-builtin.js b/test/tick-processor/test-tick-processor-builtin.js index 3d4e1b9d23..1f38abe08c 100644 --- a/test/tick-processor/test-tick-processor-builtin.js +++ b/test/tick-processor/test-tick-processor-builtin.js @@ -1,10 +1,11 @@ 'use strict'; const common = require('../common'); +const { isCPPSymbolsNotMapped } = require('./util'); if (!common.enoughTestCpu) common.skip('test is CPU-intensive'); -if (common.isCPPSymbolsNotMapped) { +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 26daf60aa3..e76d99ab09 100644 --- a/test/tick-processor/test-tick-processor-cpp-core.js +++ b/test/tick-processor/test-tick-processor-cpp-core.js @@ -1,10 +1,11 @@ 'use strict'; const common = require('../common'); +const { isCPPSymbolsNotMapped } = require('./util'); if (!common.enoughTestCpu) common.skip('test is CPU-intensive'); -if (common.isCPPSymbolsNotMapped) { +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 3348b6f11b..d0a6eb9f81 100644 --- a/test/tick-processor/test-tick-processor-polyfill-brokenfile.js +++ b/test/tick-processor/test-tick-processor-polyfill-brokenfile.js @@ -1,12 +1,13 @@ 'use strict'; const common = require('../common'); +const { isCPPSymbolsNotMapped } = require('./util'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); if (!common.enoughTestCpu) common.skip('test is CPU-intensive'); -if (common.isCPPSymbolsNotMapped) { +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 93367361ac..8b1ec9920f 100644 --- a/test/tick-processor/test-tick-processor-preprocess-flag.js +++ b/test/tick-processor/test-tick-processor-preprocess-flag.js @@ -1,10 +1,11 @@ 'use strict'; const common = require('../common'); +const { isCPPSymbolsNotMapped } = require('./util'); if (!common.enoughTestCpu) common.skip('test is CPU-intensive'); -if (common.isCPPSymbolsNotMapped) { +if (isCPPSymbolsNotMapped) { common.skip('C++ symbols are not mapped for this os.'); } diff --git a/test/tick-processor/util.js b/test/tick-processor/util.js new file mode 100644 index 0000000000..d25a2a7dcb --- /dev/null +++ b/test/tick-processor/util.js @@ -0,0 +1,18 @@ +'use strict'; + +// Utilities for the tick-processor tests +const { + isWindows, + isSunOS, + isAIX, + isLinuxPPCBE, + isFreeBSD +} = require('../common'); + +module.exports = { + isCPPSymbolsNotMapped: isWindows || + isSunOS || + isAIX || + isLinuxPPCBE || + isFreeBSD +}; |