-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
doc: Change test option at STEP 5: Test in CONTRIBUTING.md #12830
Conversation
CONTRIBUTING.md
Outdated
You can run tests in parallel with option `-J` | ||
|
||
```text | ||
$ python tools/test.py -J --mode=release parallel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is make test-parallel
for this so I wouldn't add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for reviewing.
I will remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a nit: line 191 is 81 characters long, and this may break approaching doc linting. Could you please wrap this line, say, before the last word?
I fix it. Do I have to squash this branch? |
CONTRIBUTING.md
Outdated
$ python tools/test.py --mode=release parallel/test-stream2-transform | ||
``` | ||
|
||
If you want to check the other option, please refer the help with option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: take this with a grain of salt as I'm not a native speaker but maybe it better to use "the other options, please refer to the help with the option".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agreed
Thank you! I may squash if it is not difficult. Or this may be squashed before landing by somebody else. |
@vsemozhetbyt |
@kysnm I think the last commit removed more words than it had to :) |
@lpinca |
Yes, thank you! |
Thank you for your reviewing. |
CONTRIBUTING.md
Outdated
$ python tools/test.py --mode=release parallel/test-stream2-transform | ||
``` | ||
|
||
If you want to check the other option, please refer to the help with the option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"...other options..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, can you please avoid using personal pronouns like "you"?
EDIT: on the other hand, that's how this document is already written, and such wording is common in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see
CONTRIBUTING.md
Outdated
``` | ||
|
||
If you want to check the other option, please refer to the help with the option | ||
`--help` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary space at the beginning of the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see
Fixed |
CONTRIBUTING.md
Outdated
@@ -185,7 +185,14 @@ If you are updating tests and just want to run a single test to check it, you | |||
can use this syntax to run it exactly as the test harness would: | |||
|
|||
```text | |||
$ python tools/test.py -v --mode=release parallel/test-stream2-transform | |||
$ python tools/test.py --mode=release parallel/test-stream2-transform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a -J
? Given that it says "exactly as the test harness would" we should probably be exact:
-$ python tools/test.py --mode=release parallel/test-stream2-transform
+$ python tools/test.py -J --mode=release parallel/test-stream2-transform
LGTM otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be run "exactly as the test harness would" either way given that tools/test.py
is the test harness, regardless of the options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that users would understand by looking at help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be run "exactly as the test harness would" either way given that
tools/test.py
is the test harness, regardless of the options.
I assume the test harness means make test
, otherwise that part of the sentence is kinda meaningless. The reason I think this is necessary is that using -J
can cause subtle bugs (when tests interact with each other), and that is impossible to debug if you don't use the flag by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I think this is necessary is that using -J can cause subtle bugs (when tests interact with each other)
Yeah, I agree with that if we are talking about running multiple tests. But that sentence is about running a single test, isn't it? Do I miss the point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't a PR changing -J to default (with -j1 as the opt-out) make sense?
Maaaybe, I think I'd be +1 on that, but I suspect it might be contentious...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other option, a wrapper script test-ci
(.sh & .cmd).
This one I'm doing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other option, a wrapper script test-ci (.sh & .cmd).
Doesn't that duplicate the Makefile
and vcbuild.bat
test-ci
target? What's the gain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll take $*, so it's useful for single files, or single suits.
I don't know about make test-ci
but vcbuild test-ci
builds first (with Feet of clay), very demotivating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL #12874
CONTRIBUTING.md
Outdated
If you want to check the other option, please refer to the help with the option | ||
`--help` | ||
If you want to check the other options, please refer to the help with the | ||
option `--help` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: please refer to the help with the option `--help`
=> please refer to the documentation by using the `--help` option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the word documentation
gives the users impression that they should see the https://nodejs.org/en/docs/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several options
please refer to the built in documentation by using the `--help` option
please refer to the help by using the `--help` option
please refer to the help by passing the `--help` flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for suggestions
I will change to the No.2
Is there anything i should fix the patch, yet? |
I'd still like the -$ python tools/test.py --mode=release parallel/test-stream2-transform
+$ python tools/test.py -J --mode=release parallel/test-stream2-transform |
Added the option |
@aqrln |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Thanks for all reviewers. |
PR-URL: nodejs#12830 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]>
Landed in d7d16f7 |
PR-URL: nodejs#12830 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]>
PR-URL: #12830 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]>
PR-URL: #12830 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]>
Refs #12771
Checklist
Affected core subsystem(s)
none