| OLD | NEW |
| 1 # Chromium Recipes: Reference Doc | 1 # Chromium Recipes: Reference Doc |
| 2 | 2 |
| 3 [TOC] | 3 [TOC] |
| 4 | 4 |
| 5 ## I just want to.... | 5 ## I just want to.... |
| 6 | 6 |
| 7 This section covers common tasks for chromium developers. If you want a more | 7 This section covers common tasks for chromium developers. If you want a more |
| 8 full background on the chromium recipes, go to the [Background](#Background) | 8 full background on the chromium recipes, go to the [Background](#Background) |
| 9 section. | 9 section. |
| 10 | 10 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 ... | 156 ... |
| 157 ], | 157 ], |
| 158 ... | 158 ... |
| 159 }, | 159 }, |
| 160 | 160 |
| 161 Changes to the JSON file can be tested on the trybots, and you can verify that | 161 Changes to the JSON file can be tested on the trybots, and you can verify that |
| 162 they take effect and build still passes. | 162 they take effect and build still passes. |
| 163 | 163 |
| 164 ### Add a new non gtest-based test | 164 ### Add a new non gtest-based test |
| 165 Generally, look at [steps.py](https://code.google.com/p/chromium/codesearch#chro
mium/build/scripts/slave/recipe_modules/chromium_tests/steps.py) | 165 Generally, look at [steps.py](https://code.google.com/p/chromium/codesearch#chro
mium/build/scripts/slave/recipe_modules/chromium_tests/steps.py) |
| 166 , and either use an existing class there, or add a new one. For example, look at | 166 , and either use an existing class there, or add a new one. |
| 167 the Android Tests (amp split) [recipe](https://code.google.com/p/chromium/codese
arch#chromium/build/scripts/slave/recipe_modules/chromium_tests/chromium_fyi.py) | |
| 168 , which uses a special step to talk to an external service: | |
| 169 | |
| 170 ``` | |
| 171 'Android Tests (amp split)': { | |
| 172 ... | |
| 173 'tests': [ | |
| 174 steps.AndroidInstrumentationTest('AndroidWebViewTest'), | |
| 175 steps.AndroidInstrumentationTest('ContentShellTest'), | |
| 176 steps.AMPGTestTest('android_webview_unittests', | |
| 177 device_name=['Nexus 5'], device_os=['4.4.2']), | |
| 178 steps.AMPGTestTest('base_unittests', | |
| 179 device_name=['Nexus 5'], device_os=['4.4.2'], | |
| 180 android_isolate_path='base/base_unittests.isolate'), | |
| 181 ... | |
| 182 ] | |
| 183 } | |
| 184 ``` | |
| 185 | 167 |
| 186 ## Background | 168 ## Background |
| 187 Chromium tests are currently run on buildbot, and are organized by builders. | 169 Chromium tests are currently run on buildbot, and are organized by builders. |
| 188 A builder, in buildbot’s terminology, is a sequence of steps | 170 A builder, in buildbot’s terminology, is a sequence of steps |
| 189 (typically, individual commands) executed by a slave, and controlled by | 171 (typically, individual commands) executed by a slave, and controlled by |
| 190 the central master process. | 172 the central master process. |
| 191 | 173 |
| 192 Since such tightly controlled system is hard to maintain at scale, and requires | 174 Since such tightly controlled system is hard to maintain at scale, and requires |
| 193 human attention and frequent downtimes for master restarts on every update, | 175 human attention and frequent downtimes for master restarts on every update, |
| 194 Chrome Infra introduced [recipes](https://chromium.googlesource.com/external/git
hub.com/luci/recipes-py/+/master/doc/user_guide.md). | 176 Chrome Infra introduced [recipes](https://chromium.googlesource.com/external/git
hub.com/luci/recipes-py/+/master/doc/user_guide.md). |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 Path: [build/scripts/slave/recipe_modules/chromium_tests/api.py](https://code.go
ogle.com/p/chromium/codesearch#chromium/build/scripts/slave/recipe_modules/chrom
ium/api.py) | 324 Path: [build/scripts/slave/recipe_modules/chromium_tests/api.py](https://code.go
ogle.com/p/chromium/codesearch#chromium/build/scripts/slave/recipe_modules/chrom
ium/api.py) |
| 343 | 325 |
| 344 Implements methods like `configure_build`, `prepare_checkout`, compile, etc. | 326 Implements methods like `configure_build`, `prepare_checkout`, compile, etc. |
| 345 that take configuration parameters and actually run the steps. | 327 that take configuration parameters and actually run the steps. |
| 346 | 328 |
| 347 ### src/testing/buildbot/*.json: per-master configs: targets & tests | 329 ### src/testing/buildbot/*.json: per-master configs: targets & tests |
| 348 | 330 |
| 349 Example config: [src/testing/buildbot/chromium.mac.json](https://code.google.com
/p/chromium/codesearch#chromium/src/testing/buildbot/chromium.mac.json&sq=packag
e:chromium) | 331 Example config: [src/testing/buildbot/chromium.mac.json](https://code.google.com
/p/chromium/codesearch#chromium/src/testing/buildbot/chromium.mac.json&sq=packag
e:chromium) |
| 350 | 332 |
| 351 These configs live in the project repo, and define additional compile targets an
d specific tests to run on each builder. | 333 These configs live in the project repo, and define additional compile targets an
d specific tests to run on each builder. |
| OLD | NEW |