tree: 2b11ceb13719d0ef3816590ab40e7b43b0b8130b [path history] [tgz]
  1. OWNERS
  2. README.md
  3. __init__.py
  4. api.py
  5. examples/
  6. test_api.py
scripts/slave/recipe_modules/ios/README.md

iOS recipe module

The recipe module is a module containing common functions for iOS recipes. This doc assumes you've read the docs in chromium/src for details about how the iOS bots work and that you know what recipes are.

Public methods

checkout

Checks out chromium/src including all DEPS with target_os=ios. If the clobber property is set, any existing checkout will be removed first, otherwise the checkout will be incremental (and thus faster). If there is any patch to be applied from rietveld or gerrit then it will be applied during this step.

read_build_config

Reads the builder's own config from the configs directory. The configs dir contains master-specific directories which contain builder-specific JSON files containing the configuration. Typically a builder will only read its own config, but the try bots on tryserver.chromium.mac read their configs from the chromium.mac directory which ensures that try bots match main waterfall bots.

The docs explain the configs in more detail. You must call checkout() before calling read_build_config().

build

Compiles Chromium for iOS according to the config. By default, uses mb to generate the build files, but pass use_mb=False to use gn instead. Pass analyze=True to enable use of the analyzer on a try bot. The analyzer determines which configured tests and additional_compile_targets were changed by an applied patch and compiles only those targets. If the gn_args in the config specify use_goma=True then goma, the distributed build system used by Chromium, will be enabled. Compilation is performed using ninja.

You must call read_build_config() before calling build().

upload

Uploads compiled artifacts based on the config. The artifacts must be in the out directory, so this can be used to upload test suites or other files generated by build().

You must call read_build_config() before calling upload().

test_swarming

Runs configured tests using swarming. Tests are triggered to run remotely on the swarming server which enables them to run in parallel rather than serially if run locally on the bot. If any tests were determined to be unaffected by the analyzer during build() they will be skipped here, otherwise all tests will run.

You must call read_build_config() before calling test_swarming().

Example

A sample recipe can be constructed using the public methods documented above:

DEPS = [
  'ios',
]

def RunSteps(api):
  api.ios.checkout()
  api.ios.read_build_config()
  api.ios.build()
  api.ios.upload()
  api.ios.test_swarming()