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

Side by Side Diff: doc/package_config.md

Issue 1802133002: Add names and plain_names 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.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 15 matching lines...) Expand all
26 26
27 * [Test Configuration](#test-configuration) 27 * [Test Configuration](#test-configuration)
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)
37 * [`plain_names`](#plain_names)
36 * [`platforms`](#platforms) 38 * [`platforms`](#platforms)
37 * [`concurrency`](#concurrency) 39 * [`concurrency`](#concurrency)
38 * [`pub_serve`](#pub_serve) 40 * [`pub_serve`](#pub_serve)
39 * [`reporter`](#reporter) 41 * [`reporter`](#reporter)
40 * [Configuring Tags](#configuring-tags) 42 * [Configuring Tags](#configuring-tags)
41 * [`tags`](#tags) 43 * [`tags`](#tags)
42 * [`add_tags`](#add_tags) 44 * [`add_tags`](#add_tags)
43 * [Configuring Platforms](#configuring-platforms) 45 * [Configuring Platforms](#configuring-platforms)
44 * [`on_os`](#on_os) 46 * [`on_os`](#on_os)
45 * [`on_platform`](#on_platform) 47 * [`on_platform`](#on_platform)
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 This supports the full [glob syntax][]. However, since it's only compared 176 This supports the full [glob syntax][]. However, since it's only compared
175 against a path's basename, path separators aren't especially useful. It defaults 177 against a path's basename, path separators aren't especially useful. It defaults
176 to `"*_test.dart"`. 178 to `"*_test.dart"`.
177 179
178 ```yaml 180 ```yaml
179 filename: "test_*.dart" 181 filename: "test_*.dart"
180 ``` 182 ```
181 183
182 [glob syntax]: https://github.com/dart-lang/glob#syntax 184 [glob syntax]: https://github.com/dart-lang/glob#syntax
183 185
186 ### `names`
187
188 This field restricts the tests run by the runner to those whose names match the
189 given 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
191 order to be run.
192
193 This is usually used in a [preset](#configuration-presets) to make it possible
194 to quickly select a given set of tests.
195
196 ```yaml
197 presets:
198 # Pass "-P chrome" to run only Chrome tests.
199 chrome:
200 names:
201 - "^browser:"
202 - "[Cc]hrome"
203 ```
204
205 ### `plain_names`
206
207 This field restricts the tests run by the runner to those whose names contain
208 the given strings. A test's name must contain *all* strings in `plain_names`, as
209 well as matching all regular expressions in [`names`](#names), in order to be
210 run.
211
212 This is usually used in a [preset](#configuration-presets) to make it possible
213 to quickly select a given set of tests.
214
215 ```yaml
216 presets:
217 # Pass "-P ie" to run only Internet Explorer tests.
218 ie:
219 plain_names:
220 - "IE"
221 - "Internet Explorer"
222 ```
223
184 ### `platforms` 224 ### `platforms`
185 225
186 This field indicates which platforms tests should run on by default. It allows 226 This field indicates which platforms tests should run on by default. It allows
187 the same platform identifiers that can be passed to `--platform`. If multiple 227 the same platform identifiers that can be passed to `--platform`. If multiple
188 platforms are included, the test runner will default to running tests on all of 228 platforms are included, the test runner will default to running tests on all of
189 them. This defaults to `[vm]`. 229 them. This defaults to `[vm]`.
190 230
191 ```yaml 231 ```yaml
192 platforms: [content_shell] 232 platforms: [content_shell]
193 233
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 presets: 468 presets:
429 # Shortcut for running only browser tests. 469 # Shortcut for running only browser tests.
430 browser: 470 browser:
431 paths: [test/runner/browser] 471 paths: [test/runner/browser]
432 472
433 # Shortcut for running only Chrome tests. 473 # Shortcut for running only Chrome tests.
434 chrome: 474 chrome:
435 filename: "chrome_*_test.dart" 475 filename: "chrome_*_test.dart"
436 add_presets: [browser] 476 add_presets: [browser]
437 ``` 477 ```
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698