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: using common.isWindows consistently #2269

Closed

Conversation

thefourtheye
Copy link
Contributor

No description provided.

@thefourtheye thefourtheye added the test Issues and PRs related to the tests. label Jul 29, 2015
@thefourtheye thefourtheye force-pushed the isWindows-consistent-fix branch 3 times, most recently from abd0432 to 0c6c1c4 Compare July 29, 2015 12:07
@cjihrig
Copy link
Contributor

cjihrig commented Jul 29, 2015

LGTM if the CI is happy. You might want to change some of the var isWindows type lines to const isWindows while you're already changing the lines.

@bnoordhuis
Copy link
Member

Rubber-stamp LGTM if CI is happy. Maybe change to commit line to something like "test: use common.isWindows() check everywhere" (or "consistently"), I think that explains it just a little bit better.

@thefourtheye
Copy link
Contributor Author

@cjihrig Actually I am working on another PR which will replace all the requires with const. Can we deal with it in that? Also, can you please trigger a CI run?

@bnoordhuis Sure, I ll change it when I am landing it.

@thefourtheye
Copy link
Contributor Author

@@ -4,7 +4,7 @@ var assert = require('assert');

var spawn = require('child_process').spawn;

var is_windows = process.platform === 'win32';
var is_windows = common.isWindows;
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 just use common.isWindows on line 28?

@Fishrock123
Copy link
Contributor

Mostly LGTM

@thefourtheye
Copy link
Contributor Author

@Fishrock123 You want to replace the variables with common.isWindows if they are used only once?

@Fishrock123
Copy link
Contributor

@thefourtheye might as well.

@thefourtheye thefourtheye force-pushed the isWindows-consistent-fix branch 2 times, most recently from 89422b1 to 0dba4ed Compare July 30, 2015 06:19
@thefourtheye
Copy link
Contributor Author

@Fishrock123 I did that change and I had to rebase, so that I can pull in #2265.

@bnoordhuis I fixed the commit line, PTAL.

CI run 2: iojs+any-pr+multi/213

Edit: Sorry, I pushed few more files. Restarting the CI and the latest is at iojs+any-pr+multi/215

@thefourtheye thefourtheye changed the title test: making isWindows check consistent with common test: using common.isWindows consistently Jul 30, 2015
@bnoordhuis
Copy link
Member

I'd s/using/use/, that's the prevalent tense in commit messages. Ideally, you'd add one or two lines describing the what and why of the change but in this case it's pretty self-explanatory.

@thefourtheye
Copy link
Contributor Author

@bnoordhuis ah, your original comment had use only. My bad. I ll fix it while landing :-)

@thefourtheye
Copy link
Contributor Author

CI is almost green and about the SmartOS failure, @targos and @bnoordhuis are working on it in #2220

@cjihrig Oh sorry, I totally misunderstood what you were saying. BTW, as per Fishrock123's comments, I removed all those variables. Does it look fine to you now? cc @Fishrock123

@cjihrig
Copy link
Contributor

cjihrig commented Jul 30, 2015

Still LGTM

@@ -39,7 +39,7 @@ var dgram = require('dgram');
// supported while using cluster, though servers still cause the master to error
// with ENOTSUP.

var windows = process.platform === 'win32';
var windows = common.isWindows;
Copy link
Contributor

Choose a reason for hiding this comment

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

Might as well also do it here then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And then I thought I covered everything :D

@Fishrock123
Copy link
Contributor

LGTM.

You didn't have to change the ones that were used a bunch of times in the file, but, either way
¯\_(ツ)_/¯.

@thefourtheye
Copy link
Contributor Author

CI run 3: iojs+any-pr+multi/216/

I'll land this, if it turns green.

thefourtheye added a commit that referenced this pull request Jul 30, 2015
In the tests, we use "process.platform === 'win32'" in some places.
This patch replaces them with the "common.isWindows" for consistency.

PR-URL: #2269
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
@thefourtheye
Copy link
Contributor Author

Thanks people. Landed at d5ab92b

@thefourtheye thefourtheye deleted the isWindows-consistent-fix branch July 30, 2015 19:04
@rvagg rvagg mentioned this pull request Aug 4, 2015
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.

4 participants