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

doc: enrich test commands with executable #44347

Merged
merged 10 commits into from
Feb 6, 2023
15 changes: 10 additions & 5 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,36 +318,41 @@ If you are updating tests and want to run tests in a single test file
(e.g. `test/parallel/test-stream2-transform.js`):

```text
$ tools/test.py test/parallel/test-stream2-transform.js
$ python3 tools/test.py test/parallel/test-stream2-transform.js
```

tony-go marked this conversation as resolved.
Show resolved Hide resolved
> Note: Using `pyhton3` alias is necessary only if you don't have
tony-go marked this conversation as resolved.
Show resolved Hide resolved
> a python executable on your path.
tony-go marked this conversation as resolved.
Show resolved Hide resolved

RaisinTen marked this conversation as resolved.
Show resolved Hide resolved
You can execute the entire suite of tests for a given subsystem
by providing the name of a subsystem:

```text
$ tools/test.py child-process
$ python3 tools/test.py child-process
```

You can also execute the tests in a test suite directory
(such as `test/message`):

```text
$ tools/test.py test/message
$ python3 tools/test.py test/message
```

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

```text
$ tools/test.py --help
$ python3 tools/test.py --help
```

You can usually run tests directly with node:

```text
$ ./node ./test/parallel/test-stream2-transform.js
$ ./node test/parallel/test-stream2-transform.js
tony-go marked this conversation as resolved.
Show resolved Hide resolved
```

> Info: `./node` points to your local Node.js build.

Remember to recompile with `make -j4` in between test runs if you change code in
the `lib` or `src` directories.

Expand Down