Skip to content
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

tools: fix prof polyfill readline #18641

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test: add common.isSymbolAvailable
  • Loading branch information
killagu committed Feb 11, 2018
commit 45730d5936502b1aa76e5ff7dfe5e8d015eff92c
5 changes: 5 additions & 0 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ Platform check for Windows.

Platform check for Windows 32-bit on Windows 64-bit.

### isSymbolAvailable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a more descriptive name than this please?

Copy link
Contributor Author

@killagu killagu Feb 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad,it should be isCPPSymbolsNotMapped. @cjihrig

* [<Boolean>]

Platform check for if symbol available.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, can you provide a more in depth description.


### leakedGlobals()
* return [<Array>]

Expand Down
5 changes: 5 additions & 0 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,3 +802,8 @@ exports.hijackStdout = hijackStdWritable.bind(null, 'stdout');
exports.hijackStderr = hijackStdWritable.bind(null, 'stderr');
exports.restoreStdout = restoreWritable.bind(null, 'stdout');
exports.restoreStderr = restoreWritable.bind(null, 'stderr');
exports.isSymbolAvailable = exports.isWindows ||
exports.isSunOS ||
Copy link
Contributor

@XadillaX XadillaX Feb 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: align with exports above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XadillaX as you wish.

exports.isAIX ||
exports.isLinuxPPCBE ||
exports.isFreeBSD;
8 changes: 1 addition & 7 deletions test/tick-processor/test-tick-processor-builtin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ const common = require('../common');
if (!common.enoughTestCpu)
common.skip('test is CPU-intensive');

if (
common.isWindows ||
common.isSunOS ||
common.isAIX ||
common.isLinuxPPCBE ||
common.isFreeBSD
) {
if (common.isSymbolAvailable) {
common.skip('C++ symbols are not mapped for this os.');
}

Expand Down
8 changes: 1 addition & 7 deletions test/tick-processor/test-tick-processor-cpp-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ const common = require('../common');
if (!common.enoughTestCpu)
common.skip('test is CPU-intensive');

if (
common.isWindows ||
common.isSunOS ||
common.isAIX ||
common.isLinuxPPCBE ||
common.isFreeBSD
) {
if (common.isSymbolAvailable) {
common.skip('C++ symbols are not mapped for this os.');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ tmpdir.refresh();
if (!common.enoughTestCpu)
common.skip('test is CPU-intensive');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: would you be so kind and use a capital letter as first character? :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the node test,the first character in skip message is always lower case.


if (
common.isWindows ||
common.isSunOS ||
common.isAIX ||
common.isLinuxPPCBE ||
common.isFreeBSD
) {
if (common.isSymbolAvailable) {
common.skip('C++ symbols are not mapped for this os.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether the linter (make lint) will complain or not, but this is difficult to read. Please use braces here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Operating system should be upper cased as in OS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the advice.It should be upper cased.

}

Expand Down
8 changes: 1 addition & 7 deletions test/tick-processor/test-tick-processor-preprocess-flag.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ const common = require('../common');
if (!common.enoughTestCpu)
common.skip('test is CPU-intensive');

if (
common.isWindows ||
common.isSunOS ||
common.isAIX ||
common.isLinuxPPCBE ||
common.isFreeBSD
) {
if (common.isSymbolAvailable) {
common.skip('C++ symbols are not mapped for this os.');
}

Expand Down