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>
This commit is contained in:
James M Snell 2018-08-22 08:14:31 -07:00
parent 5673017c33
commit 6bb96a1183
No known key found for this signature in database
GPG Key ID: 7341B15C070877AC
8 changed files with 28 additions and 19 deletions

View File

@ -224,11 +224,6 @@ Platform check for Windows.
Platform check for Windows 32-bit on Windows 64-bit.
### isCPPSymbolsNotMapped
* [&lt;boolean>]
Platform check for C++ symbols are mapped or not.
### leakedGlobals()
* return [&lt;Array>]

View File

@ -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;

View File

@ -51,8 +51,7 @@ const {
getBufferSources,
disableCrashOnUnhandledRejection,
getTTYfd,
runWithInvalidFD,
isCPPSymbolsNotMapped
runWithInvalidFD
} = common;
export {
@ -104,6 +103,5 @@ export {
getBufferSources,
disableCrashOnUnhandledRejection,
getTTYfd,
runWithInvalidFD,
isCPPSymbolsNotMapped
runWithInvalidFD
};

View File

@ -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.');
}

View File

@ -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.');
}

View File

@ -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.');
}

View File

@ -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.');
}

View File

@ -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
};