dart-sdk/tools/bots
Samir Jindel 362ef8e67c [vm/aot] Add a custom ELF loader in dart_precompiled_runtime.
Also switch some CQ bots using blobs to ELF. Once all embedders have migrated, we will remove blobs
support entirely.

Change-Id: Ie5e8c1187ad6c1af362b5715daafd3641bc8cc0e
Cq-Include-Trybots:luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-bare-linux-release-simarm-try,vm-kernel-precomp-mac-debug-simarm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116620
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-24 15:03:19 +00:00
..
browsers Add hash for downloading Linux Chrome to tools/bots/browsers. 2018-03-16 10:35:11 +00:00
flutter Fix flutter-frontend bot and future problems in flutter HHH bot 2019-09-19 06:59:21 +00:00
__init__.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
add_fields.dart Add commit hash to results upload on builders 2018-09-12 17:15:39 +00:00
android.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
aot_smoke_tests.dart [SDK] Adds dart2exe to create standalone executables. 2019-09-23 12:00:08 +00:00
apply_preapprovals.dart [infra] Add --apply-changelist option to apply_preapprovals. 2019-03-26 12:56:57 +00:00
bot.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
bot_utils.py [infra] Add handling of signed SDK directories to promote.py 2019-09-09 07:10:41 +00:00
compare_results.dart [infra] Add support for pre-approvals in approved_results.json. 2019-03-22 11:11:00 +00:00
dart2js_d8_hostchecked_tests.isolate Remove the Dart 1 tests. 2018-10-11 23:45:18 +00:00
dart2js_dump_info.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
dart_aot_test.dart [SDK] Adds dart2exe to create standalone executables. 2019-09-23 12:00:08 +00:00
dart_sdk.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
dart_tests.isolate Remove the Dart 1 tests. 2018-10-11 23:45:18 +00:00
dart_tests_extended.isolate Add Mac support for isolates 2017-08-22 17:15:14 +02:00
dartdoc_footer.html add footer for dartdocs generated for the sdk for analytics and survey 2015-07-13 13:14:09 -07:00
ddc_tests.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
extend_results.dart [infra] Add previous commit info to results records for new tests 2019-07-30 11:42:26 +00:00
find_base_commit.dart Update HttpRequest and HttpClientResponse to be Stream<Uint8List> 2019-06-27 00:21:07 +00:00
linux_distribution_support.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
post_results_to_pubsub.dart [infra] Update pub/sub script to send <10MB when message is base64 encoded. 2019-08-01 08:30:18 +00:00
pub.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
pub_integration_test.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
README.md [infra] Add test matrix documentation 2018-06-07 17:39:12 +00:00
results.dart [infra] With multiple test results, use the first instead of the last in createResultsMap 2019-09-05 08:43:10 +00:00
run_android_tests.sh Remove temp code to ignore "--failure-summary". 2017-06-01 15:45:55 -07:00
test_matrix.json [vm/aot] Add a custom ELF loader in dart_precompiled_runtime. 2019-09-24 15:03:19 +00:00
try_benchmarks.sh [benchmark] Stop benchmarking fasta in legacy mode. 2019-08-20 09:02:12 +00:00
try_test.dart Remove use of deprecated methods and constants. 2018-07-04 17:18:06 +00:00
update_flakiness.dart [infra] Fix update_flakiness using wrong key when computing matches. 2019-03-04 13:38:29 +00:00
upload_debian_packages.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
version_checker.py Mass format python with yapf 2019-08-05 20:34:31 +00:00

tools/bots

This folder contains scripts and configuration files used by Dart's continuous integration and testing infrastructure.

Test matrix

The file test_matrix.json defines the test configurations run by Dart's CI infrastructure. Changes to the test matrix affect all builds that include them.

Structure

The test matrix is a JSON document and consists of the "filesets" object and the "configurations" array.

The file sets define files and/or directories that need to be present for a test configuration at runtime. Any directory specified will be included along with its subdirectories recursively. Directory names must have a / at the end. All paths are relative to the SDK checkout's root directory.

"filesets": {
  "a_fileset_name": [
    "a/directory/",
    "a/file"
  ],
  "another_fileset_name": [
    "another/directory/",
    "another/file"
  ]
}

The builder configurations describe all test configurations a specific builder must execute. Each builder configuration is an object that specifies which builders it applies to, defines the build steps for the builders, and some additional metadata. Only one builder configuration can apply to a builder.

"configurations": [
  {
    "builders": [
      "a-builder",
      "another-builder"
    ],
    "meta": {
      "description": "Description of this configuration."
    },
    "steps": [
    ]
  }
]

Each step is an object and must have a name. A step may also specify a script to run instead of the default script: tools/test.py. Additional arguments may be specified. These arguments will be passed to the script.

"steps": [
  {
    "name": "build it",
    "script": "tools/build.py",
    "arguments": ["--a-flag", "target", "another_target"]
  },
  {
    "name": "test it",
  }
]

A step using the default script may also be sharded across many machines using the "shards" parameter. If a step is sharded, it must specify a "fileset". Only the files and directories defined by the file set will be available to the script when it's running on a shard.

{
  "name": "shard the tests",
  "shards": 10,
  "fileset": "a_fileset_name"
}

Builder name parsing

The builder names are split by '-' and each part is then examined if it is an option. Options can be runtimes (e.g. "chrome"), architectures (e.g. x64) and operating system families (e.g. win). For each valid option, additional arguments are passed to the tools/test.py and tools/build.py scripts.

Adding a new builder

To add a builder:

  1. Decide on a name.
  2. Add the builder name to a new or existing configuration.
  3. File an issue labelled "area-infrastructure" to get your builder activated.

Testing a new or modified builder

Builders can be tested using a tool called led that is included in depot_tools. Replace buildername and CL number with the correct values and run:

led get-builder luci.dart.ci:<builder name> | \
led edit-cr-cl 'https://dart-review.googlesource.com/c/<cl number>' | \
led launch

Adding a builder to the commit queue

For now, file an issue labeled "area-infrastructure" to get your builder added to the commit queue.

Glossary

Builder

A builder has a name and defines the steps the need to be run when it is executed by a bot. In general, a builder defines how to build and test software.

Bot

A physical or virtual machine (or even a docker container) that executes all commands it receives. Often, these commands are the steps defined by a builder.

Sharding

Sharded steps copy all files in a file set to as many bots as specified and runs the same command on all of the shards. Each shard has a shard number. The shard number and the total number of shards are passed as arguments to the command. The command is then responsible for running a subset of its work on each shard based on these arguments.