|
21 | 21 | include $(TOOLS_MAKE_LIB_DIR)/test/javascript.mk |
22 | 22 |
|
23 | 23 |
|
24 | | -# TARGETS # |
| 24 | +# RULES # |
25 | 25 |
|
26 | | -# Run unit tests. |
| 26 | +#/ |
| 27 | +# Runs unit tests. |
27 | 28 | # |
28 | | -# This target runs unit tests. |
29 | | - |
| 29 | +# ## Notes |
| 30 | +# |
| 31 | +# - This command is useful when wanting to glob for test files (e.g., run all tests for a particular package). |
| 32 | +# |
| 33 | +# |
| 34 | +# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`) |
| 35 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure |
| 36 | +# |
| 37 | +# @example |
| 38 | +# make test |
| 39 | +# |
| 40 | +# @example |
| 41 | +# make test TESTS_FILTER=".*/blas/base/dasum/.*" |
| 42 | +#/ |
30 | 43 | test: test-local |
31 | 44 |
|
32 | 45 | .PHONY: test |
33 | 46 |
|
34 | | - |
35 | | -# Run unit tests. |
| 47 | +#/ |
| 48 | +# Runs a specified list of files containing unit tests. |
36 | 49 | # |
37 | | -# This target runs unit tests for a specified file set. |
38 | | - |
| 50 | +# ## Notes |
| 51 | +# |
| 52 | +# - This rule is 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`). |
| 53 | +# |
| 54 | +# |
| 55 | +# @param {string} FILES - list of test file paths |
| 56 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure |
| 57 | +# |
| 58 | +# @example |
| 59 | +# make test-files FILES='/foo/test.js /bar/test.js' |
| 60 | +#/ |
39 | 61 | test-files: test-files-local |
40 | 62 |
|
41 | 63 | .PHONY: test-files |
42 | 64 |
|
43 | | - |
44 | | -# Run unit tests locally. |
| 65 | +#/ |
| 66 | +# Runs unit tests in the local environment. |
45 | 67 | # |
46 | | -# This target runs unit tests in a local environment. |
47 | | - |
| 68 | +# ## Notes |
| 69 | +# |
| 70 | +# - This rule is 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`). |
| 71 | +# - In this context, "local" refers to the local development environment, as opposed to running in a headless browser or on CI. |
| 72 | +# |
| 73 | +# |
| 74 | +# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*` |
| 75 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure) |
| 76 | +# |
| 77 | +# @example |
| 78 | +# make test-local |
| 79 | +# |
| 80 | +# @example |
| 81 | +# make test-local TESTS_FILTER=".*/blas/base/dasum/.*" |
| 82 | +#/ |
48 | 83 | test-local: test-javascript-local |
49 | 84 |
|
50 | 85 | .PHONY: test-local |
51 | 86 |
|
52 | | - |
53 | | -# Run unit tests locally. |
| 87 | +#/ |
| 88 | +# Runs, in the local environment, a specified list of files containing unit tests. |
54 | 89 | # |
55 | | -# This target runs unit tests for a specified file set in a local environment. |
56 | | - |
| 90 | +# ## Notes |
| 91 | +# |
| 92 | +# - In this context, "local" refers to the local development environment, as opposed to running in a headless browser or on CI. |
| 93 | +# - This rule is 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`). |
| 94 | +# |
| 95 | +# |
| 96 | +# @param {string} FILES - list of test file paths |
| 97 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure |
| 98 | +# |
| 99 | +# @example |
| 100 | +# make test-files-local FILES='/foo/test.js /bar/test.js' |
| 101 | +#/ |
57 | 102 | test-files-local: test-javascript-files-local |
58 | 103 |
|
59 | 104 | .PHONY: test-files-local |
60 | 105 |
|
61 | | - |
62 | | -# Generate a test summary. |
| 106 | +#/ |
| 107 | +# Runs unit tests and summarizes aggregated TAP output. |
63 | 108 | # |
64 | | -# This target runs unit tests and aggregates TAP output as a test summary. |
65 | | - |
| 109 | +# ## Notes |
| 110 | +# |
| 111 | +# - This command is useful when wanting to glob for test files (e.g., run all tests for a particular package). |
| 112 | +# |
| 113 | +# |
| 114 | +# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`) |
| 115 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure |
| 116 | +# |
| 117 | +# @example |
| 118 | +# make test-summary |
| 119 | +# |
| 120 | +# @example |
| 121 | +# make test-summary TESTS_FILTER=".*/blas/base/dasum/.*" |
| 122 | +#/ |
66 | 123 | test-summary: test-javascript-summary |
67 | 124 |
|
68 | 125 | .PHONY: test-summary |
69 | 126 |
|
70 | | - |
71 | | -# Generate a test summary. |
| 127 | +#/ |
| 128 | +# Runs a specified list of files containing unit tests and summarizes aggregated TAP output. |
72 | 129 | # |
73 | | -# This target runs unit tests for a specified file set and aggregates TAP output as a test summary. |
74 | | - |
| 130 | +# ## Notes |
| 131 | +# |
| 132 | +# - This rule is 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`). |
| 133 | +# |
| 134 | +# |
| 135 | +# @param {string} FILES - list of test file paths |
| 136 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure |
| 137 | +# |
| 138 | +# @example |
| 139 | +# make test-files-summary FILES='/foo/test.js /bar/test.js' |
| 140 | +#/ |
75 | 141 | test-files-summary: test-javascript-files-summary |
76 | 142 |
|
77 | 143 | .PHONY: test-files-summary |
78 | 144 |
|
79 | | - |
80 | | -# Generate TAP output. |
| 145 | +#/ |
| 146 | +# Runs unit tests and generates raw TAP output. |
81 | 147 | # |
82 | | -# This target runs unit tests and streams raw TAP output. |
83 | | - |
| 148 | +# ## Notes |
| 149 | +# |
| 150 | +# - This command is useful when wanting to glob for test files (e.g., run all tests for a particular package). |
| 151 | +# |
| 152 | +# |
| 153 | +# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`) |
| 154 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure |
| 155 | +# |
| 156 | +# @example |
| 157 | +# make test-tap |
| 158 | +# |
| 159 | +# @example |
| 160 | +# make test-tap TESTS_FILTER=".*/blas/base/dasum/.*" |
| 161 | +#/ |
84 | 162 | test-tap: test-javascript-tap |
85 | 163 |
|
86 | 164 | .PHONY: test-tap |
87 | 165 |
|
88 | | - |
89 | | -# Generate TAP output. |
| 166 | +#/ |
| 167 | +# Runs a specified list of files containing unit tests and generates raw TAP output. |
90 | 168 | # |
91 | | -# This target runs unit tests for a specified file set and streams raw TAP output. |
92 | | - |
| 169 | +# ## Notes |
| 170 | +# |
| 171 | +# - This rule is 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`). |
| 172 | +# |
| 173 | +# |
| 174 | +# @param {string} FILES - list of test file paths |
| 175 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure |
| 176 | +# |
| 177 | +# @example |
| 178 | +# make test-files-tap FILES='/foo/test.js /bar/test.js' |
| 179 | +#/ |
93 | 180 | test-files-tap: test-javascript-files-tap |
94 | 181 |
|
95 | 182 | .PHONY: test-files-tap |
96 | 183 |
|
97 | | - |
98 | | -# Generate a xUnit XML. |
| 184 | +#/ |
| 185 | +# Runs unit tests and converts TAP output to xUnit XML. |
99 | 186 | # |
100 | | -# This target runs unit tests and converts TAP output to xUnit XML. |
101 | | - |
| 187 | +# ## Notes |
| 188 | +# |
| 189 | +# - This command is useful when wanting to glob for test files (e.g., run all tests for a particular package). |
| 190 | +# |
| 191 | +# |
| 192 | +# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`) |
| 193 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure |
| 194 | +# |
| 195 | +# @example |
| 196 | +# make test-xunit |
| 197 | +# |
| 198 | +# @example |
| 199 | +# make test-xunit TESTS_FILTER=".*/blas/base/dasum/.*" |
| 200 | +#/ |
102 | 201 | test-xunit: test-javascript-xunit |
103 | 202 |
|
104 | 203 | .PHONY: test-xunit |
105 | 204 |
|
106 | | - |
107 | | -# Generate a xUnit XML. |
| 205 | +#/ |
| 206 | +# Runs a specified list of files containing unit tests and converts TAP output to xUnit XML. |
108 | 207 | # |
109 | | -# This target runs unit tests for a specified file set and converts TAP output to xUnit XML. |
110 | | - |
| 208 | +# ## Notes |
| 209 | +# |
| 210 | +# - This rule is 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`). |
| 211 | +# |
| 212 | +# |
| 213 | +# @param {string} FILES - list of test file paths |
| 214 | +# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure |
| 215 | +# |
| 216 | +# @example |
| 217 | +# make test-files-xunit FILES='/foo/test.js /bar/test.js' |
| 218 | +#/ |
111 | 219 | test-files-xunit: test-javascript-files-xunit |
112 | 220 |
|
113 | 221 | .PHONY: test-files-xunit |
0 commit comments