Skip to content

test: move common.isCPPSymbolsNotMapped to tick-processor tests #22459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>]

Expand Down
6 changes: 0 additions & 6 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
6 changes: 2 additions & 4 deletions test/common/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ const {
getBufferSources,
disableCrashOnUnhandledRejection,
getTTYfd,
runWithInvalidFD,
isCPPSymbolsNotMapped
runWithInvalidFD
} = common;

export {
Expand Down Expand Up @@ -104,6 +103,5 @@ export {
getBufferSources,
disableCrashOnUnhandledRejection,
getTTYfd,
runWithInvalidFD,
isCPPSymbolsNotMapped
runWithInvalidFD
};
3 changes: 2 additions & 1 deletion test/tick-processor/test-tick-processor-builtin.js
Original file line number Diff line number Diff line change
@@ -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.');
}

Expand Down
3 changes: 2 additions & 1 deletion test/tick-processor/test-tick-processor-cpp-core.js
Original file line number Diff line number Diff line change
@@ -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.');
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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.');
}

Expand Down
3 changes: 2 additions & 1 deletion test/tick-processor/test-tick-processor-preprocess-flag.js
Original file line number Diff line number Diff line change
@@ -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.');
}

Expand Down
18 changes: 18 additions & 0 deletions test/tick-processor/util.js
Original file line number Diff line number Diff line change
@@ -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
};