Skip to content

Commit 9430ac2

Browse files
fasterederjasnell
authored andcommitted
doc: add info how to run single tests to BUILDING.md
The information on how to run single tests was missing in BUILDING.md. PR-URL: #23490 Fixes: #23491 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 945f9d7 commit 9430ac2

File tree

1 file changed

+75
-47
lines changed

1 file changed

+75
-47
lines changed

BUILDING.md

+75-47
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,42 @@ file a new issue.
1010

1111
## Table of Contents
1212

13-
* [Supported platforms](#supported-platforms)
14-
* [Input](#input)
15-
* [Strategy](#strategy)
16-
* [Supported platforms](#supported-platforms-1)
17-
* [Supported toolchains](#supported-toolchains)
18-
* [Unix](#unix)
19-
* [AIX](#aix)
20-
* [Windows](#windows)
21-
* [OpenSSL asm support](#openssl-asm-support)
22-
* [Building Node.js on supported platforms](#building-nodejs-on-supported-platforms)
23-
* [Unix/macOS](#unixmacos)
24-
* [Prerequisites](#prerequisites)
25-
* [Building Node.js](#building-nodejs-1)
26-
* [Running Tests](#running-tests)
27-
* [Building the documentation](#building-the-documentation)
28-
* [Building a debug build](#building-a-debug-build)
29-
* [Windows](#windows-1)
30-
* [Android/Android-based devices (e.g. Firefox OS)](#androidandroid-based-devices-eg-firefox-os)
31-
* [`Intl` (ECMA-402) support](#intl-ecma-402-support)
32-
* [Default: `small-icu` (English only) support](#default-small-icu-english-only-support)
33-
* [Build with full ICU support (all locales supported by ICU)](#build-with-full-icu-support-all-locales-supported-by-icu)
34-
* [Unix/macOS](#unixmacos-1)
35-
* [Windows](#windows-2)
36-
* [Building without Intl support](#building-without-intl-support)
37-
* [Unix/macOS](#unixmacos-2)
38-
* [Windows](#windows-3)
39-
* [Use existing installed ICU (Unix/macOS only)](#use-existing-installed-icu-unixmacos-only)
40-
* [Build with a specific ICU](#build-with-a-specific-icu)
41-
* [Unix/macOS](#unixmacos-3)
42-
* [Windows](#windows-4)
43-
* [Building Node.js with FIPS-compliant OpenSSL](#building-nodejs-with-fips-compliant-openssl)
44-
* [Building Node.js with external core modules](#building-nodejs-with-external-core-modules)
45-
* [Unix/macOS](#unixmacos-4)
46-
* [Windows](#windows-5)
13+
- [Building Node.js](#building-nodejs)
14+
- [Table of Contents](#table-of-contents)
15+
- [Supported platforms](#supported-platforms)
16+
- [Input](#input)
17+
- [Strategy](#strategy)
18+
- [Supported platforms](#supported-platforms)
19+
- [Supported toolchains](#supported-toolchains)
20+
- [Unix](#unix)
21+
- [AIX](#aix)
22+
- [Windows](#windows)
23+
- [OpenSSL asm support](#openssl-asm-support)
24+
- [Building Node.js on supported platforms](#building-nodejs-on-supported-platforms)
25+
- [Unix/macOS](#unixmacos)
26+
- [Prerequisites](#prerequisites)
27+
- [Building Node.js](#building-nodejs)
28+
- [Running Tests](#running-tests)
29+
- [Building the documentation](#building-the-documentation)
30+
- [Building a debug build](#building-a-debug-build)
31+
- [Windows](#windows)
32+
- [Android/Android-based devices (e.g. Firefox OS)](#androidandroid-based-devices-eg-firefox-os)
33+
- [`Intl` (ECMA-402) support:](#intl-ecma-402-support)
34+
- [Default: `small-icu` (English only) support](#default-small-icu-english-only-support)
35+
- [Build with full ICU support (all locales supported by ICU):](#build-with-full-icu-support-all-locales-supported-by-icu)
36+
- [Unix/macOS:](#unixmacos)
37+
- [Windows:](#windows)
38+
- [Building without Intl support](#building-without-intl-support)
39+
- [Unix/macOS:](#unixmacos)
40+
- [Windows:](#windows)
41+
- [Use existing installed ICU (Unix/macOS only):](#use-existing-installed-icu-unixmacos-only)
42+
- [Build with a specific ICU:](#build-with-a-specific-icu)
43+
- [Unix/macOS](#unixmacos)
44+
- [Windows](#windows)
45+
- [Building Node.js with FIPS-compliant OpenSSL](#building-nodejs-with-fips-compliant-openssl)
46+
- [Building Node.js with external core modules](#building-nodejs-with-external-core-modules)
47+
- [Unix/macOS](#unixmacos)
48+
- [Windows](#windows)
4749

4850
## Supported platforms
4951

@@ -73,19 +75,19 @@ The community does not build or test against end-of-life distributions (EoL).
7375
Thus, we do not recommend that you use Node on end-of-life or unsupported
7476
platforms in production.
7577

76-
| System | Support type | Version | Architectures | Notes |
77-
|--------------|--------------|----------------------------------|----------------------|------------------|
78-
| GNU/Linux | Tier 1 | kernel >= 2.6.32, glibc >= 2.12 | x64, arm | |
79-
| GNU/Linux | Tier 1 | kernel >= 3.10, glibc >= 2.17 | arm64 | |
80-
| macOS/OS X | Tier 1 | >= 10.11 | x64 | |
81-
| Windows | Tier 1 | >= Windows 7/2008 R2/2012 R2 | x86, x64 | [2](#fn2),[3](#fn3),[4](#fn4) |
82-
| SmartOS | Tier 2 | >= 15 < 16.4 | x86, x64 | [1](#fn1) |
83-
| FreeBSD | Tier 2 | >= 11 | x64 | |
84-
| GNU/Linux | Tier 2 | kernel >= 3.13.0, glibc >= 2.19 | ppc64le >=power8 | |
85-
| AIX | Tier 2 | >= 7.1 TL04 | ppc64be >=power7 | |
86-
| GNU/Linux | Tier 2 | kernel >= 3.10, glibc >= 2.17 | s390x | |
87-
| GNU/Linux | Experimental | kernel >= 2.6.32, glibc >= 2.12 | x86 | limited CI |
88-
| Linux (musl) | Experimental | musl >= 1.0 | x64 | |
78+
| System | Support type | Version | Architectures | Notes |
79+
| ------------ | ------------ | ------------------------------- | ---------------- | ----------------------------- |
80+
| GNU/Linux | Tier 1 | kernel >= 2.6.32, glibc >= 2.12 | x64, arm | |
81+
| GNU/Linux | Tier 1 | kernel >= 3.10, glibc >= 2.17 | arm64 | |
82+
| macOS/OS X | Tier 1 | >= 10.11 | x64 | |
83+
| Windows | Tier 1 | >= Windows 7/2008 R2/2012 R2 | x86, x64 | [2](#fn2),[3](#fn3),[4](#fn4) |
84+
| SmartOS | Tier 2 | >= 15 < 16.4 | x86, x64 | [1](#fn1) |
85+
| FreeBSD | Tier 2 | >= 11 | x64 | |
86+
| GNU/Linux | Tier 2 | kernel >= 3.13.0, glibc >= 2.19 | ppc64le >=power8 | |
87+
| AIX | Tier 2 | >= 7.1 TL04 | ppc64be >=power7 | |
88+
| GNU/Linux | Tier 2 | kernel >= 3.10, glibc >= 2.17 | s390x | |
89+
| GNU/Linux | Experimental | kernel >= 2.6.32, glibc >= 2.12 | x86 | limited CI |
90+
| Linux (musl) | Experimental | musl >= 1.0 | x64 | |
8991

9092
<em id="fn1">1</em>: The gcc4.8-libs package needs to be installed, because node
9193
binaries have been built with GCC 4.8, for which runtime libraries are not
@@ -223,6 +225,32 @@ $ make -j4 test
223225
`make -j4 test` does a full check on the codebase, including running linters and
224226
documentation tests.
225227

228+
If you are updating tests and just want to run a single test to check it:
229+
230+
```text
231+
$ python tools/test.py -J --mode=release parallel/test-stream2-transform
232+
```
233+
234+
You can execute the entire suite of tests for a given subsystem
235+
by providing the name of a subsystem:
236+
237+
```text
238+
$ python tools/test.py -J --mode=release child-process
239+
```
240+
241+
If you want to check the other options, please refer to the help by using
242+
the `--help` option
243+
244+
```text
245+
$ python tools/test.py --help
246+
```
247+
248+
You can usually run tests directly with node:
249+
250+
```text
251+
$ ./node ./test/parallel/test-stream2-transform.js
252+
```
253+
226254
Optionally, continue below.
227255

228256
To run the tests and generate code coverage reports:

0 commit comments

Comments
 (0)