Skip to content

Commit 5487ea8

Browse files
committed
Document commands
1 parent cc31407 commit 5487ea8

File tree

1 file changed

+294
-2
lines changed

1 file changed

+294
-2
lines changed

tools/make/lib/test/README.md

Lines changed: 294 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,296 @@ $ make test
5757
The command supports the following environment variables:
5858

5959
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
60+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
6061

61-
The command supports the environment variables supported by the `test-local` command documented below.
62+
#### test-files
6263

63-
This command is useful when wanting to glob for test files (e.g., run all tests for a particular package).
64+
Runs a specified list of files containing unit tests.
65+
66+
<!-- run-disable -->
67+
68+
```bash
69+
$ make test-files FILES='/foo/test.js /bar/test.js'
70+
```
71+
72+
The command supports the following environment variables:
73+
74+
- **FILES**: list of test file paths.
75+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
76+
77+
#### test-local
78+
79+
Runs unit tests in the local environment.
80+
81+
<!-- run-disable -->
82+
83+
```bash
84+
$ make test-local
85+
```
86+
87+
The command supports the following environment variables:
88+
89+
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
90+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
91+
92+
#### test-files-local
93+
94+
Runs, in the local environment, a specified list of files containing unit tests.
95+
96+
<!-- run-disable -->
97+
98+
```bash
99+
$ make test-files-local FILES='/foo/test.js /bar/test.js'
100+
```
101+
102+
The command supports the following environment variables:
103+
104+
- **FILES**: list of test file paths.
105+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
106+
107+
#### test-summary
108+
109+
Runs unit tests and summarizes aggregated TAP output.
110+
111+
<!-- run-disable -->
112+
113+
```bash
114+
$ make test-summary
115+
```
116+
117+
The command supports the following environment variables:
118+
119+
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
120+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
121+
122+
#### test-files-summary
123+
124+
Runs, in the local environment, a specified list of files containing unit tests.
125+
126+
<!-- run-disable -->
127+
128+
```bash
129+
$ make test-files-summary FILES='/foo/test.js /bar/test.js'
130+
```
131+
132+
The command supports the following environment variables:
133+
134+
- **FILES**: list of test file paths.
135+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
136+
137+
#### test-tap
138+
139+
Runs unit tests and generates raw TAP output.
140+
141+
<!-- run-disable -->
142+
143+
```bash
144+
$ make test-tap
145+
```
146+
147+
The command supports the following environment variables:
148+
149+
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
150+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
151+
152+
#### test-files-tap
153+
154+
Runs, in the local environment, a specified list of files containing unit tests and generates raw TAP output.
155+
156+
<!-- run-disable -->
157+
158+
```bash
159+
$ make test-files-tap FILES='/foo/test.js /bar/test.js'
160+
```
161+
162+
The command supports the following environment variables:
163+
164+
- **FILES**: list of test file paths.
165+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
166+
167+
#### test-xunit
168+
169+
Runs unit tests and converts TAP output to xUnit XML.
170+
171+
<!-- run-disable -->
172+
173+
```bash
174+
$ make test-xunit
175+
```
176+
177+
The command supports the following environment variables:
178+
179+
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
180+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
181+
182+
#### test-files-xunit
183+
184+
Runs, in the local environment, a specified list of files containing unit tests and converts TAP output to xUnit XML.
185+
186+
<!-- run-disable -->
187+
188+
```bash
189+
$ make test-files-xunit FILES='/foo/test.js /bar/test.js'
190+
```
191+
192+
The command supports the following environment variables:
193+
194+
- **FILES**: list of test file paths.
195+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
196+
197+
* * *
198+
199+
### JavaScript
200+
201+
#### test-javascript
202+
203+
Runs JavaScript unit tests.
204+
205+
<!-- run-disable -->
206+
207+
```bash
208+
$ make test-javascript
209+
```
210+
211+
The command supports the following environment variables:
212+
213+
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
214+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
215+
216+
#### test-javascript-files
217+
218+
Runs a specified list of files containing JavaScript unit tests.
219+
220+
<!-- run-disable -->
221+
222+
```bash
223+
$ make test-javascript-files FILES='/foo/test.js /bar/test.js'
224+
```
225+
226+
The command supports the following environment variables:
227+
228+
- **FILES**: list of test file paths.
229+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
230+
231+
#### test-javascript-local
232+
233+
Runs JavaScript unit tests in the local environment.
234+
235+
<!-- run-disable -->
236+
237+
```bash
238+
$ make test-javascript-local
239+
```
240+
241+
The command supports the following environment variables:
242+
243+
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
244+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
245+
246+
#### test-javascript-files-local
247+
248+
Runs, in the local environment, a specified list of files containing JavaScript unit tests.
249+
250+
<!-- run-disable -->
251+
252+
```bash
253+
$ make test-javascript-files-local FILES='/foo/test.js /bar/test.js'
254+
```
255+
256+
The command supports the following environment variables:
257+
258+
- **FILES**: list of test file paths.
259+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
260+
261+
#### test-javascript-summary
262+
263+
Runs JavaScript unit tests and summarizes aggregated TAP output.
264+
265+
<!-- run-disable -->
266+
267+
```bash
268+
$ make test-javascript-summary
269+
```
270+
271+
The command supports the following environment variables:
272+
273+
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
274+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
275+
276+
#### test-javascript-files-summary
277+
278+
Runs, in the local environment, a specified list of files containing JavaScript unit tests.
279+
280+
<!-- run-disable -->
281+
282+
```bash
283+
$ make test-javascript-files-summary FILES='/foo/test.js /bar/test.js'
284+
```
285+
286+
The command supports the following environment variables:
287+
288+
- **FILES**: list of test file paths.
289+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
290+
291+
#### test-javascript-tap
292+
293+
Runs JavaScript unit tests and generates raw TAP output.
294+
295+
<!-- run-disable -->
296+
297+
```bash
298+
$ make test-javascript-tap
299+
```
300+
301+
The command supports the following environment variables:
302+
303+
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
304+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
305+
306+
#### test-javascript-files-tap
307+
308+
Runs, in the local environment, a specified list of files containing JavaScript unit tests and generates raw TAP output.
309+
310+
<!-- run-disable -->
311+
312+
```bash
313+
$ make test-javascript-files-tap FILES='/foo/test.js /bar/test.js'
314+
```
315+
316+
The command supports the following environment variables:
317+
318+
- **FILES**: list of test file paths.
319+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
320+
321+
#### test-javascript-xunit
322+
323+
Runs JavaScript unit tests and converts TAP output to xUnit XML.
324+
325+
<!-- run-disable -->
326+
327+
```bash
328+
$ make test-javascript-xunit
329+
```
330+
331+
The command supports the following environment variables:
332+
333+
- **TESTS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
334+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
335+
336+
#### test-javascript-files-xunit
337+
338+
Runs, in the local environment, a specified list of files containing JavaScript unit tests and converts TAP output to xUnit XML.
339+
340+
<!-- run-disable -->
341+
342+
```bash
343+
$ make test-javascript-files-xunit FILES='/foo/test.js /bar/test.js'
344+
```
345+
346+
The command supports the following environment variables:
347+
348+
- **FILES**: list of test file paths.
349+
- **FAST_FAIL**: flag indicating whether to stop running tests upon encountering a test failure.
64350

65351
</section>
66352

@@ -70,6 +356,12 @@ This command is useful when wanting to glob for test files (e.g., run all tests
70356

71357
<section class="notes">
72358

359+
## Notes
360+
361+
- Commands supporting a `FILES` environment variable are useful when wanting to run a list of test files generated by some other command (e.g., a list of changed test files obtained via `git diff`).
362+
- Commands supporting a `TESTS_FILTER` environment variable are useful when wanting to glob for test files (e.g., run all tests for a particular package).
363+
- For `-local` commands, "local" refers to the local development environment, as opposed to running in a headless browser or on CI.
364+
73365
</section>
74366

75367
<!-- /.notes -->

0 commit comments

Comments
 (0)