2017-11-28 15:43:22 +00:00
|
|
|
# Src-side test specifications
|
|
|
|
|
2017-12-05 11:54:21 +00:00
|
|
|
Src-side test specifications enable developers to quickly add tests running on
|
|
|
|
specific bots on V8's continuous infrastructure (CI) or tryserver. Features to
|
|
|
|
be tested must live behind runtime flags, which are mapped to named testing
|
|
|
|
variants specified [here](https://chromium.googlesource.com/v8/v8/+/master/tools/testrunner/local/variants.py).
|
|
|
|
Changes to src-side test specifications go through CQ like any other CL and
|
|
|
|
require tests added for specific trybots to pass.
|
|
|
|
|
2018-05-07 09:55:55 +00:00
|
|
|
The test specifications are defined in a V8-side python-literal file
|
|
|
|
`infra/testing/builders.pyl`.
|
2017-11-28 15:43:22 +00:00
|
|
|
|
2018-05-07 09:55:55 +00:00
|
|
|
The structure of the file is:
|
2017-11-28 15:43:22 +00:00
|
|
|
```
|
|
|
|
{
|
2018-04-17 13:28:18 +00:00
|
|
|
<buildername>: {
|
|
|
|
'tests': [
|
|
|
|
{
|
|
|
|
'name': <test-spec name>,
|
2018-04-27 07:28:31 +00:00
|
|
|
'suffix': <step suffix>,
|
2018-04-17 13:28:18 +00:00
|
|
|
'variant': <variant name>,
|
|
|
|
'shards': <number of shards>,
|
2018-04-27 07:28:31 +00:00
|
|
|
'test_args': <list of flags>,
|
|
|
|
'swarming_task_attrs': {...},
|
|
|
|
'swarming_dimensions': {...},
|
2018-04-17 13:28:18 +00:00
|
|
|
},
|
|
|
|
...
|
|
|
|
],
|
2018-04-27 07:28:31 +00:00
|
|
|
'swarming_task_attrs': {...},
|
|
|
|
'swarming_dimensions': {...},
|
2018-04-17 13:28:18 +00:00
|
|
|
},
|
2017-11-28 15:43:22 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
```
|
|
|
|
The `<buildername>` is a string name of the builder to execute the tests.
|
|
|
|
`<test-spec name>` is a label defining a test specification matching the
|
|
|
|
[infra-side](https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/slave/recipe_modules/v8/testing.py#58).
|
2018-04-27 07:28:31 +00:00
|
|
|
The optional `suffix` will be appended to test-step names for disambiguation.
|
|
|
|
The optional `variant` is a testing variant specified
|
2017-12-05 11:54:21 +00:00
|
|
|
[here](https://chromium.googlesource.com/v8/v8/+/master/tools/testrunner/local/variants.py).
|
2018-04-27 07:28:31 +00:00
|
|
|
The optional `shards` (default 1) can be provided to increase the swarming
|
|
|
|
shards for long-running tests.
|
|
|
|
The optional `test_args` is a list of string flags that will be passed to the
|
|
|
|
V8 test driver.
|
|
|
|
The optional `swarming_task_attrs` is a dict allowing to override the defaults
|
|
|
|
for `priority`, `expiration` and `hard_timeout`.
|
|
|
|
The optional `swarming_dimensions` is a dict allowing to override the defaults
|
|
|
|
for `cpu`, `cores` and `os`.
|
|
|
|
Both `swarming_task_attrs` and `swarming_dimensions` can be defined per builder
|
|
|
|
and per test, whereas the latter takes precedence.
|
2017-11-28 15:43:22 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
```
|
|
|
|
{
|
2018-04-17 13:28:18 +00:00
|
|
|
'v8_linux64_rel_ng_triggered': {
|
|
|
|
'tests': [
|
2018-04-27 07:28:31 +00:00
|
|
|
{
|
|
|
|
'name': 'v8testing',
|
|
|
|
'suffix': 'stress',
|
|
|
|
'variant': 'nooptimization',
|
|
|
|
'shards': 2,
|
|
|
|
'test_args': ['--gc-stress'],
|
|
|
|
'swarming_dimensions': {'os': 'Ubuntu-14.4'},
|
|
|
|
},
|
2018-04-17 13:28:18 +00:00
|
|
|
],
|
2018-04-27 07:28:31 +00:00
|
|
|
'swarming_properties': {'priority': 35},
|
|
|
|
'swarming_dimensions': {'os': 'Ubuntu'},
|
2018-04-17 13:28:18 +00:00
|
|
|
},
|
2017-11-28 15:43:22 +00:00
|
|
|
}
|
2017-11-29 12:04:49 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Guidelines
|
|
|
|
|
|
|
|
Please keep trybots and continuous bots in sync. E.g. add the same configuration
|
|
|
|
for the release and debug CI bots and the corresponding trybot (where
|
|
|
|
applicable). E.g.
|
|
|
|
|
|
|
|
```
|
|
|
|
tryserver.v8:
|
|
|
|
v8_linux64_rel_ng_triggered
|
|
|
|
client.v8:
|
|
|
|
V8 Linux64
|
|
|
|
V8 Linux64 - debug
|
2017-12-05 11:54:21 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Please only add tests that are expected to pass, or skip failing tests via
|
|
|
|
status file for the selected testing variants only. If you want to add FYI tests
|
|
|
|
(i.e. not closing the tree and not blocking CQ) you can do so for the following
|
|
|
|
set of bots:
|
|
|
|
|
|
|
|
```
|
|
|
|
tryserver.v8:
|
|
|
|
v8_linux64_fyi_rel_ng_triggered
|
|
|
|
client.v8:
|
|
|
|
V8 Linux64 - fyi
|
|
|
|
V8 Linux64 - debug - fyi
|
|
|
|
```
|