Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: doc/package_config.md

Issue 1797113002: Add include_tags and exclude_tags config fields. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/runner/configuration/load.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Each package may include a configuration file that applies to the package as a 1 Each package may include a configuration file that applies to the package as a
2 whole. This file can be used to provide custom defaults for various options, to 2 whole. This file can be used to provide custom defaults for various options, to
3 define configuration for multiple files, and more. 3 define configuration for multiple files, and more.
4 4
5 The file is named `dart_test.yaml` and lives at the root of the package, next to 5 The file is named `dart_test.yaml` and lives at the root of the package, next to
6 the package's pubspec. Like the pubspec, it's a [YAML][] file. Here's an 6 the package's pubspec. Like the pubspec, it's a [YAML][] file. Here's an
7 example: 7 example:
8 8
9 [YAML]: http://yaml.org/ 9 [YAML]: http://yaml.org/
10 10
(...skipping 17 matching lines...) Expand all
28 * [`timeout`](#timeout) 28 * [`timeout`](#timeout)
29 * [`verbose_trace`](#verbose_trace) 29 * [`verbose_trace`](#verbose_trace)
30 * [`js_trace`](#js_trace) 30 * [`js_trace`](#js_trace)
31 * [`skip`](#skip) 31 * [`skip`](#skip)
32 * [`test_on`](#test_on) 32 * [`test_on`](#test_on)
33 * [Runner Configuration](#runner-configuration) 33 * [Runner Configuration](#runner-configuration)
34 * [`paths`](#paths) 34 * [`paths`](#paths)
35 * [`filename`](#filename) 35 * [`filename`](#filename)
36 * [`names`](#names) 36 * [`names`](#names)
37 * [`plain_names`](#plain_names) 37 * [`plain_names`](#plain_names)
38 * [`include_tags`](#include_tags)
39 * [`exclude_tags`](#exclude_tags)
38 * [`platforms`](#platforms) 40 * [`platforms`](#platforms)
39 * [`concurrency`](#concurrency) 41 * [`concurrency`](#concurrency)
40 * [`pub_serve`](#pub_serve) 42 * [`pub_serve`](#pub_serve)
41 * [`reporter`](#reporter) 43 * [`reporter`](#reporter)
42 * [Configuring Tags](#configuring-tags) 44 * [Configuring Tags](#configuring-tags)
43 * [`tags`](#tags) 45 * [`tags`](#tags)
44 * [`add_tags`](#add_tags) 46 * [`add_tags`](#add_tags)
45 * [Configuring Platforms](#configuring-platforms) 47 * [Configuring Platforms](#configuring-platforms)
46 * [`on_os`](#on_os) 48 * [`on_os`](#on_os)
47 * [`on_platform`](#on_platform) 49 * [`on_platform`](#on_platform)
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 to `"*_test.dart"`. 180 to `"*_test.dart"`.
179 181
180 ```yaml 182 ```yaml
181 filename: "test_*.dart" 183 filename: "test_*.dart"
182 ``` 184 ```
183 185
184 [glob syntax]: https://github.com/dart-lang/glob#syntax 186 [glob syntax]: https://github.com/dart-lang/glob#syntax
185 187
186 ### `names` 188 ### `names`
187 189
188 This field restricts the tests run by the runner to those whose names match the 190 This field causes the runner to only run tests whose names match the given
189 given regular expressions. A test's name must match *all* regular expressions in 191 regular expressions. A test's name must match *all* regular expressions in
190 `names`, as well as containing all strings in [`plain_names`](#plain_names), in 192 `names`, as well as containing all strings in [`plain_names`](#plain_names), in
191 order to be run. 193 order to be run.
192 194
193 This is usually used in a [preset](#configuration-presets) to make it possible 195 This is usually used in a [preset](#configuration-presets) to make it possible
194 to quickly select a given set of tests. 196 to quickly select a given set of tests.
195 197
196 ```yaml 198 ```yaml
197 presets: 199 presets:
198 # Pass "-P chrome" to run only Chrome tests. 200 # Pass "-P chrome" to run only Chrome tests.
199 chrome: 201 chrome:
200 names: 202 names:
201 - "^browser:" 203 - "^browser:"
202 - "[Cc]hrome" 204 - "[Cc]hrome"
203 ``` 205 ```
204 206
205 ### `plain_names` 207 ### `plain_names`
206 208
207 This field restricts the tests run by the runner to those whose names contain 209 This field causes the runner to only run tests whose names contain the given
208 the given strings. A test's name must contain *all* strings in `plain_names`, as 210 strings. A test's name must contain *all* strings in `plain_names`, as well as
209 well as matching all regular expressions in [`names`](#names), in order to be 211 matching all regular expressions in [`names`](#names), in order to be run.
210 run.
211 212
212 This is usually used in a [preset](#configuration-presets) to make it possible 213 This is usually used in a [preset](#configuration-presets) to make it possible
213 to quickly select a given set of tests. 214 to quickly select a given set of tests.
214 215
215 ```yaml 216 ```yaml
216 presets: 217 presets:
217 # Pass "-P ie" to run only Internet Explorer tests. 218 # Pass "-P ie" to run only Internet Explorer tests.
218 ie: 219 ie:
219 plain_names: 220 plain_names:
220 - "IE" 221 - "IE"
221 - "Internet Explorer" 222 - "Internet Explorer"
222 ``` 223 ```
223 224
225 ### `include_tags`
226
227 This field causes the runner to only run tests whose tags match the given
228 [boolean selector][]. If both `include_tags` and [`exclude_tags`](#exclude_tags)
229 are used, the exclusions take precedence.
230
231 [boolean selector]: https://github.com/dart-lang/boolean_selector/blob/master/RE ADME.md
232
233 This is usually used in a [preset](#configuration-preset) to make it possible to
234 quickly select a set of tests.
235
236 ```yaml
237 presets:
238 # Pass "-P windowless" to run tests that don't open browser windows.
239 windowless:
240 include_tags: !browser || content-shell
241 ```
242
243 ### `exclude_tags`
244
245 This field causes the runner not to run tests whose tags match the given
246 [boolean selector][]. If both [`include_tags`](#include_tags) and `exclude_tags`
247 are used, the exclusions take precedence.
248
249 This is usually used in a [preset](#configuration-preset) to make it possible to
250 quickly select a set of tests.
251
252 ```yaml
253 presets:
254 # Pass "-P windowless" to run tests that don't open browser windows.
255 windowless:
256 exclude_tags: browser && !content-shell
257 ```
258
224 ### `platforms` 259 ### `platforms`
225 260
226 This field indicates which platforms tests should run on by default. It allows 261 This field indicates which platforms tests should run on by default. It allows
227 the same platform identifiers that can be passed to `--platform`. If multiple 262 the same platform identifiers that can be passed to `--platform`. If multiple
228 platforms are included, the test runner will default to running tests on all of 263 platforms are included, the test runner will default to running tests on all of
229 them. This defaults to `[vm]`. 264 them. This defaults to `[vm]`.
230 265
231 ```yaml 266 ```yaml
232 platforms: [content_shell] 267 platforms: [content_shell]
233 268
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 presets: 503 presets:
469 # Shortcut for running only browser tests. 504 # Shortcut for running only browser tests.
470 browser: 505 browser:
471 paths: [test/runner/browser] 506 paths: [test/runner/browser]
472 507
473 # Shortcut for running only Chrome tests. 508 # Shortcut for running only Chrome tests.
474 chrome: 509 chrome:
475 filename: "chrome_*_test.dart" 510 filename: "chrome_*_test.dart"
476 add_presets: [browser] 511 add_presets: [browser]
477 ``` 512 ```
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/runner/configuration/load.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698