CONTRIBUTING.md states:
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:
$ python tools/test.py -v --mode=release parallel/test-stream2-transform
Is -v key intended here? I can't find this key in Makefile and vcbuild.bat. It seems it just adds more debug info:
j:\temp\node-master> python tools/test.py --mode=release parallel/test-stream2-transform
[00:00|% 100|+ 1|- 0]: Done
j:\temp\node-master> python tools/test.py -v --mode=release parallel/test-stream2-transform
# j:\temp\node-master\Release\node.exe -p process.arch
[00:00|% 0|+ 0|- 0]: release test-stream2-transform # j:\temp\node-master\Release\node.exe j:\temp\node-master\test\parallel\test-stream2-transform.js
[00:00|% 100|+ 1|- 0]: Done
It should probably be removed to match Makefile#L198-199 exactly. The -v was originally added in https://github.com/nodejs/node/commit/8a6c36dc3707212a83e44bdc01a09cf122a8e809, and has never been in the Makefile AFAICT.
Might as well add the -J option while we're at it, as that's what the Makefile uses.
-$ python tools/test.py -v --mode=release parallel/test-stream2-transform
+$ python tools/test.py -J --mode=release parallel/test-stream2-transform
@gibfahn What these flags change, BTW?
@vsemozhetbyt if you run tools/test.py --help it'll show you. You can also read the options in the source (e.g. here for -J.
-j4 means run 4 tests at a time (only does it for the parallel suite).-J means calculate the number of cores and run that many tests at a time-v is verbose (as you mentioned)@gibfahn Thank you!
Might as well add the
-Joption while we're at it, as that's what the Makefile uses.
It's extra characters to type though for no actual effect in the original use case (running a single test through the harness).
@richardlau @gibfahn So maybe it is useful also to add an example how to run a test suite (section, folder).
It's extra characters to type though for no actual effect in the original use case (running a single test through the harness).
In the original case yes, but people won't be running the original case (and if they are they'll be copy-pasting right?) It's useful to know about -J because it makes the tests run faster, and also because it's possible the parallelism is triggering a bug in the test (which would be really hard to diagnose otherwise).
So maybe it is useful also to add an example how to run a test suite (section, folder).
Maybe, the problem with the test runner is that there are loads of options to go into. Maybe what we should do is note that you can do tools/test.py --help to see the available options, and then add some examples into that --help section (not sure how easy that is to do).
@gibfahn BTW: https://github.com/nodejs/node/issues/12786
I would like to try this issue tonight or tomorrow, okay?
hello.... I am kind of new here... I would like to help.
@avhincu there's already a PR open for this (@kysnm has opened https://github.com/nodejs/node/pull/12830). If you want to help there should be some other good first contribution issues that haven't already been taken by someone, if you aren't finding any let us know and we'll find you one!
Most helpful comment
I would like to try this issue tonight or tomorrow, okay?