forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
260 lines (232 loc) · 7.34 KB
/
Makefile
File metadata and controls
260 lines (232 loc) · 7.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
#/
# @license Apache-2.0
#
# Copyright (c) 2017 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/
# DEPENDENCIES #
include $(TOOLS_MAKE_LIB_DIR)/test/javascript.mk
# RULES #
#/
# Runs unit tests.
#
# ## Notes
#
# - This command is useful when wanting to glob for test files (e.g., run all tests for a particular package).
#
#
# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`)
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test
#
# @example
# make test TESTS_FILTER=".*/blas/base/dasum/.*"
#/
test: test-local
.PHONY: test
#/
# Runs a specified list of files containing unit tests.
#
# ## Notes
#
# - 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`).
#
#
# @param {string} FILES - list of test file paths
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-files FILES='/foo/test.js /bar/test.js'
#/
test-files: test-files-local
.PHONY: test-files
#/
# Runs unit tests in the local environment.
#
# ## Notes
#
# - 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`).
# - In this context, "local" refers to the local development environment, as opposed to running in a headless browser or on CI.
#
#
# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure)
#
# @example
# make test-local
#
# @example
# make test-local TESTS_FILTER=".*/blas/base/dasum/.*"
#/
test-local: test-javascript-local
.PHONY: test-local
#/
# Runs, in the local environment, a specified list of files containing unit tests.
#
# ## Notes
#
# - In this context, "local" refers to the local development environment, as opposed to running in a headless browser or on CI.
# - 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`).
#
#
# @param {string} FILES - list of test file paths
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-files-local FILES='/foo/test.js /bar/test.js'
#/
test-files-local: test-javascript-files-local
.PHONY: test-files-local
#/
# Runs unit tests and summarizes aggregated TAP output.
#
# ## Notes
#
# - This command is useful when wanting to glob for test files (e.g., run all tests for a particular package).
#
#
# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`)
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-summary
#
# @example
# make test-summary TESTS_FILTER=".*/blas/base/dasum/.*"
#/
test-summary: test-javascript-summary
.PHONY: test-summary
#/
# Runs a specified list of files containing unit tests and summarizes aggregated TAP output.
#
# ## Notes
#
# - 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`).
#
#
# @param {string} FILES - list of test file paths
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-files-summary FILES='/foo/test.js /bar/test.js'
#/
test-files-summary: test-javascript-files-summary
.PHONY: test-files-summary
#/
# Runs unit tests and minimizes aggregated TAP output.
#
# ## Notes
#
# - This command is useful when wanting to glob for test files (e.g., run all tests for a particular package).
#
#
# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`)
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-min
#
# @example
# make test-min TESTS_FILTER=".*/blas/base/dasum/.*"
#/
test-min: test-javascript-min
.PHONY: test-min
#/
# Runs a specified list of files containing unit tests and minimizes aggregated TAP output.
#
# ## Notes
#
# - 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`).
#
#
# @param {string} FILES - list of test file paths
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-files-min FILES='/foo/test.js /bar/test.js'
#/
test-files-min: test-javascript-files-min
.PHONY: test-files-min
#/
# Runs unit tests and generates raw TAP output.
#
# ## Notes
#
# - This command is useful when wanting to glob for test files (e.g., run all tests for a particular package).
#
#
# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`)
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-tap
#
# @example
# make test-tap TESTS_FILTER=".*/blas/base/dasum/.*"
#/
test-tap: test-javascript-tap
.PHONY: test-tap
#/
# Runs a specified list of files containing unit tests and generates raw TAP output.
#
# ## Notes
#
# - 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`).
#
#
# @param {string} FILES - list of test file paths
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-files-tap FILES='/foo/test.js /bar/test.js'
#/
test-files-tap: test-javascript-files-tap
.PHONY: test-files-tap
#/
# Runs unit tests and converts TAP output to xUnit XML.
#
# ## Notes
#
# - This command is useful when wanting to glob for test files (e.g., run all tests for a particular package).
#
#
# @param {string} [TESTS_FILTER] - file path pattern (e.g., `.*/blas/base/dasum/.*`)
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-xunit
#
# @example
# make test-xunit TESTS_FILTER=".*/blas/base/dasum/.*"
#/
test-xunit: test-javascript-xunit
.PHONY: test-xunit
#/
# Runs a specified list of files containing unit tests and converts TAP output to xUnit XML.
#
# ## Notes
#
# - 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`).
#
#
# @param {string} FILES - list of test file paths
# @param {*} [FAST_FAIL] - flag indicating whether to stop running tests upon encountering a test failure
#
# @example
# make test-files-xunit FILES='/foo/test.js /bar/test.js'
#/
test-files-xunit: test-javascript-files-xunit
.PHONY: test-files-xunit