Skip to content

Commit 4d3463c

Browse files
committed
doc: udpate BUILDING.md section on running tests
Refs: #40920
1 parent d9de812 commit 4d3463c

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

BUILDING.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ platforms. This is true regardless of entries in the table below.
143143
community will only address issues that reproduce on native GNU/Linux
144144
systems. Issues that only reproduce on WSL should be reported in the
145145
[WSL issue tracker](https://github.com/Microsoft/WSL/issues). Running the
146-
Windows binary (`node.exe`) in WSL is not recommended. It will not work
147-
without workarounds such as stdio redirection.
146+
Windows binary (`node.exe`) in WSL will not work without workarounds such as
147+
stdio redirection.
148148

149149
[^6]: Running Node.js on x86 Windows should work and binaries
150150
are provided. However, tests in our infrastructure only run on WoW64.
@@ -300,53 +300,55 @@ To install this version of Node.js into a system directory:
300300

301301
To verify the build:
302302

303-
```console
304-
$ make test-only
303+
```text
304+
make test-only
305305
```
306306

307307
At this point, you are ready to make code changes and re-run the tests.
308308

309-
If you are running tests before submitting a pull request, the recommended
310-
command is:
309+
If you are running tests before submitting a pull request, use:
311310

312-
```console
313-
$ make -j4 test
311+
```text
312+
make test
314313
```
315314

316315
`make -j4 test` does a full check on the codebase, including running linters and
317316
documentation tests.
318317

319-
Make sure the linter does not report any issues and that all tests pass. Please
320-
do not submit patches that fail either check.
321-
322-
If you want to run the linter without running tests, use
318+
To run the linter without running tests, use
323319
`make lint`/`vcbuild lint`. It will lint JavaScript, C++, and Markdown files.
324320

325321
If you are updating tests and want to run tests in a single test file
326322
(e.g. `test/parallel/test-stream2-transform.js`):
327323

328324
```text
329-
$ python tools/test.py test/parallel/test-stream2-transform.js
325+
python tools/test.py test/parallel/test-stream2-transform.js
330326
```
331327

332328
You can execute the entire suite of tests for a given subsystem
333329
by providing the name of a subsystem:
334330

335331
```text
336-
$ python tools/test.py -J --mode=release child-process
332+
python tools/test.py child-process
333+
```
334+
335+
You can also execute the tests in a tests directory (such as `test/messages`):
336+
337+
```text
338+
python tools/test.py messages
337339
```
338340

339341
If you want to check the other options, please refer to the help by using
340342
the `--help` option:
341343

342344
```text
343-
$ python tools/test.py --help
345+
python tools/test.py --help
344346
```
345347

346348
You can usually run tests directly with node:
347349

348350
```text
349-
$ ./node ./test/parallel/test-stream2-transform.js
351+
./node ./test/parallel/test-stream2-transform.js
350352
```
351353

352354
Remember to recompile with `make -j4` in between test runs if you change code in
@@ -355,16 +357,16 @@ the `lib` or `src` directories.
355357
The tests attempt to detect support for IPv6 and exclude IPv6 tests if
356358
appropriate. If your main interface has IPv6 addresses, then your
357359
loopback interface must also have '::1' enabled. For some default installations
358-
on Ubuntu that does not seem to be the case. To enable '::1' on the
360+
on Ubuntu, that does not seem to be the case. To enable '::1' on the
359361
loopback interface on Ubuntu:
360362

361-
```bash
363+
```text
362364
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
363365
```
364366

365367
You can use
366368
[node-code-ide-configs](https://github.com/nodejs/node-code-ide-configs)
367-
to run/debug tests, if your IDE configs are present.
369+
to run/debug tests if your IDE configs are present.
368370

369371
#### Running coverage
370372

0 commit comments

Comments
 (0)