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

test: use common platform helpers everywhere #7845

Merged
merged 1 commit into from
Jul 27, 2016

Conversation

santigimeno
Copy link
Member

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

Use the common.isWindows, common.isFreeBSD and common.isSunOS where possible. Add common.isOSX and common.isLinux.
Fix test-fs-read-file-sync-hostname as in its current form was not being run anywhere.

/cc @nodejs/testing

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jul 22, 2016

require('../common');
// FIXME add sunos support
if ('linux freebsd darwin'.indexOf(process.platform) === -1) {
if (!common.isFreeBSD && !common.isOSX && !common.isLinux) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be more readable as !(common.isFreeBSD || common.isOSX || common.isLinux)

@cjihrig
Copy link
Contributor

cjihrig commented Jul 22, 2016

LGTM with a couple comments.

@santigimeno
Copy link
Member Author

@santigimeno
Copy link
Member Author

PR updated. Thanks

@cjihrig
Copy link
Contributor

cjihrig commented Jul 23, 2016

CI came back all green. I wonder if the linux2 thing was essentially a no-op, and now a test is being skipped that doesn't need to be skipped.

@bnoordhuis
Copy link
Member

LGTM

I wonder if the linux2 thing was essentially a no-op, and now a test is being skipped that doesn't need to be skipped.

The way I read it, the test was simply always skipped on all platforms.

@jasnell
Copy link
Member

jasnell commented Jul 26, 2016

LGTM

@santigimeno
Copy link
Member Author

The way I read it, the test was simply always skipped on all platforms.

@cjihrig, after Ben's explanation, does the PR LGTY?

@cjihrig
Copy link
Contributor

cjihrig commented Jul 26, 2016

@santigimeno yes. I think we were saying the same thing... I just said it wrong.

@santigimeno
Copy link
Member Author

Use the common.isWindows, common.isFreeBSD and common.isSunOS where
possible.
Add common.isOSX and common.isLinux.
Fix `test-fs-read-file-sync-hostname` as in its current form was not
being run anywhere.

PR-URL: nodejs#7845
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@santigimeno
Copy link
Member Author

All green except a known FreeBSD flaky test: #7650.
Squashing and merging.

@santigimeno santigimeno merged commit dee0e3a into nodejs:master Jul 27, 2016
@santigimeno
Copy link
Member Author

Landed in dee0e3a

@cjihrig cjihrig mentioned this pull request Aug 8, 2016
cjihrig pushed a commit that referenced this pull request Aug 10, 2016
Use the common.isWindows, common.isFreeBSD and common.isSunOS where
possible.
Add common.isOSX and common.isLinux.
Fix `test-fs-read-file-sync-hostname` as in its current form was not
being run anywhere.

PR-URL: #7845
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@cjihrig cjihrig mentioned this pull request Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants