Repo documentation for build

Table of Contents

Recipe Modules

Recipes

Recipe Modules

recipe_modules / adb

DEPS: recipe_engine/json, recipe_engine/path, recipe_engine/python, recipe_engine/step

class AdbApi(RecipeApi):

def __call__(self, cmd, serial=None, **kwargs):

Run an ADB command.

def adb_path(self):

@property
def devices(self):

def list_devices(self, step_test_data=None, **kwargs):

def root_devices(self, **kwargs):

def set_adb_path(self, adb_path):

recipe_modules / archive

DEPS: build, tar, zip, depot_tools/depot_tools, depot_tools/gsutil, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step, recipe_engine/time

class ArchiveApi(RecipeApi):

Chromium specific module for zipping, uploading and downloading build artifacts implemented as a wrapper around zip_build.py script.

If you need to upload or download build artifacts (or any other files) for something other than Chromium flavor, consider using ‘zip’ + ‘gsutil’ or ‘isolate’ modules instead.

def clusterfuzz_archive(self, build_dir, update_properties, gs_bucket, archive_prefix, archive_subdir_suffix='', gs_acl=None, revision_dir=None, primary_project=None, bitness=None, use_legacy=True, sortkey_datetime=None, **kwargs):

Archives and uploads a build to google storage.

The build is filtered by a list of file exclusions and then zipped. It is uploaded to google storage with some metadata about the commit position and revision attached. The zip file follows the naming pattern used by clusterfuzz. The file pattern is: ---.zip

If the build is experimental, -experimental is appended in the name.

Example: cool-project-linux-release-refs_heads_b1-12345.zip The archive name is “cool-project” and there's no component build. The commit is on a branch called b1 at commit position number 12345.

Example: cool-project-mac-debug-x10-component-234.zip The archive name is “cool-project” and the component's name is “x10”. The component is checked out in branch master with commit position number 234.

Args: build_dir: The absolute path to the build output directory, e.g. [slave-build]/src/out/Release update_properties: The properties from the bot_update step (containing commit information) gs_bucket: Name of the google storage bucket to upload to archive_prefix: Prefix of the archive zip file archive_subdir_suffix: Optional suffix to the google storage subdirectory name that contains the archive files gs_acl: ACL used for the file on google storage revision_dir: Optional component name if the main revision for this archive is a component revision primary_project: Optional project name for specifying the revision of the checkout bitness: The bitness of the build (32 or 64) to distinguish archive names. use_legacy: Specify if legacy paths and archive names should be used. Set to false for new builders. sortkey_datetime: If set, the api will use this datetime as the sortable key path in the archive name, instead of trying to infer it from the commit information. This will be formatted as YYYYMMDDHHMM.

def download_and_unzip_build(self, step_name, target, build_url, src_dir=None, build_revision=None, build_archive_url=None, **kwargs):

Returns a step invoking extract_build.py to download and unzip a Chromium build.

def generic_archive(self, build_dir, update_properties, config):

Archives one or multiple packages to google cloud storage.

The exact configuration of the archive is specified by InputProperties. See archive/properties.proto.

Args: build_dir: The absolute path to the build output directory, e.g. [slave-build]/src/out/Release update_properties: The properties from the bot_update step (containing commit information). config: An instance of archive/properties.proto:InputProperties. DEPRECATED: If None, this will default to the global property $build/archive.

def legacy_download_url(self, gs_bucket_name, extra_url_components=None):

Returns a url suitable for downloading a Chromium build from Google Storage.

extra_url_components, if specified, should be a string without a trailing ‘/’ which is inserted in the middle of the URL.

The builder_name, or parent_buildername, is always automatically inserted into the URL.

def legacy_platform_name(self):

Replicates the behavior of PlatformName() in chromium_utils.py.

def legacy_upload_url(self, gs_bucket_name, extra_url_components=None):

Returns a url suitable for uploading a Chromium build to Google Storage.

extra_url_components, if specified, should be a string without a trailing ‘/’ which is inserted in the middle of the URL.

The builder_name, or parent_buildername, is always automatically inserted into the URL.

def zip_and_upload_build(self, step_name, target, build_url=None, src_dir=None, build_revision=None, cros_board=None, package_dsym_files=False, exclude_files=None, exclude_perf_test_files=False, update_properties=None, store_by_hash=True, platform=None, **kwargs):

Returns a step invoking zip_build.py to zip up a Chromium build. If build_url is specified, also uploads the build.

recipe_modules / attr_utils

class AttrUtilsApi(RecipeApi):

recipe_modules / binary_size

DEPS: chromium, chromium_android, chromium_checkout, chromium_tests, filter, zip, depot_tools/bot_update, depot_tools/gclient, depot_tools/gerrit, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step, recipe_engine/time

Binary size analysis for patchsets.

class BinarySizeApi(RecipeApi):

def android_binary_size(self, chromium_config, gclient_config, chromium_apply_configs=None, gclient_apply_configs=None):

Determines the increase in binary size caused by the patch under test.

To do so, this function:

  • syncs with the patch
  • exits early if none of the configured analyze targets were affected.
  • builds the configured compile targets with the patch
  • measures the size of the configured APK with the patch
  • syncs without the patch
  • builds the same targets without the patch
  • measures the size of the configured APK without the patch
  • reapplies the patch and compares the results

In general, this recipe is responsible only for driving the execution of these steps and failing when necessary. The analysis and measurement logic is largely in //tools/binary_size in chromium/src.

See http://bit.ly/2up0mcA for more information.

Args: chromium_config: A string containing the name of the chromium recipe_module config to use. gclient_config: A string containing the name of the gclient recipe_module config to use. chromium_apply_configs: An optional list of strings containing the names of additional chromium recipe_module configs to apply. gclient_apply_configs: An optional list of strings containing the names of additional gclient recipe_module configs to apply.

recipe_modules / build

DEPS: depot_tools/depot_tools, recipe_engine/context, recipe_engine/legacy_annotation, recipe_engine/step

class ToolsBuildApi(RecipeApi):

@contextlib.contextmanager
def gsutil_py_env(self):

Augments environment with slave_utils.py parameters.

def python(self, name, script, args=None, show_path=True, unbuffered=True, venv=None, legacy_annotation=False, **kwargs):

Bootstraps a Python through “tools/build”'s “runit.py”.

This function has the same semantics as the “recipe_engine/python” module's call method. It augments the call to run the invoked script through “runit.py”, which runs the targeted script within the “tools/build” Python path environment.

If legacy_annotation is set to true, it means the script we are running will emit legacy @@@annotation@@@. The script will be executed via legacy_annotation module from recipe_engine to adapt to the new luciexe protocol. Note that this feature is DEPRECATED and all new usecase should use StepPresentation instead to modify build.

@property
def runit_py(self):

@property
def slave_utils_args(self):

Returns (list): A list of arguments to supply to configure slave_utils parameters. See slave_utils.py's AddArgs method.

TODO(dnj): This function and its invocations should be deprecated in favor of using environment variables via “add_slave_utils_kwargs”. The script invocation path for some of these is just too intertwined to confidently apply this via explicit args everywhere.

recipe_modules / builder_group

DEPS: recipe_engine/properties

Module for working with builder groups.

A builder group is a semi-arbitrary grouping. Some defaults are set based on the builder group but otherwise there is no relationship in the code between builders in the same group. The grouping exists as an artifact of the buildbot CI system but is used heavily within the code as part of the identifier for a builder. Until such time as it can be removed, this provides an interface for determining a grouping.

Grouping can be retrieved for the following builders:

  • current - The currently running builder.
  • parent - The builder that triggered the currently running builder.
  • target - The builder being targeted by the currently running builder. This is used by findit, where a single builder performs bisection for other builders by building using the target builder's configuration.
  • bisect - The builder to run a bisection against. This is used by v8, where a single builder performs bisection for other builders by building using the bisect builder's configuration.

The interface also provides backwards compatibility for accessing the grouping by the legacy method of accessing mastername properties. These properties use names with non-inclusive language.

class BuilderGroupApi(RecipeApi):

@property
def for_bisect(self):

Get the builder group for the bisect builder.

This is used by v8, which has a single builder that performs bisection using the configuration of another builder.

@property
def for_current(self):

Get the builder group for the currently running builder.

@property
def for_parent(self):

Get the builder group for the parent builder.

@property
def for_target(self):

Get the builder group for the target builder.

This is used by findit, which has a single builder that performs bisection using the configuration of another builder.

recipe_modules / chromite

DEPS: goma, repo, depot_tools/bot_update, depot_tools/gclient, depot_tools/git, depot_tools/gitiles, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

class ChromiteApi(RecipeApi):

def build_packages(self, board, args=None, **kwargs):

Run the build_packages script inside the chroot.

Used by the internal goma recipe.

def cbuildbot(self, name, config, args=None, **kwargs):

Runs the cbuildbot command defined by the arguments.

Args: name: (str) The name of the command step. config: (str) The name of the ‘cbuildbot’ configuration to invoke. args: (list) If not None, addition arguments to pass to ‘cbuildbot’.

Returns: (Step) The step that was run.

def check_repository(self, repo_type_key, value):

Scans through registered repositories for a specified value.

Args: repo_type_key (str): The key in the ‘repositories’ config to scan through. value (str): The value to scan for. Returns (bool): True if the value was found.

def checkout(self, manifest_url=None, repo_url=None, branch=None, repo_sync_args=None):

def checkout_chromite(self):

Checks out the configured Chromite branch.

@property
def chromite_path(self):

def configure(self, properties, config_map, **KWARGS):

Loads configuration from build properties into this recipe config.

Args: properties (Properties): The build properties object. config_map (dict): The configuration map to use. KWARGS: Additional keyword arguments to forward to the configuration.

def cros_sdk(self, name, cmd, args=None, environ=None, chroot_cmd=None, **kwargs):

Return a step to run a command inside the cros_sdk.

Used by the internal goma recipe.

@property
def depot_tools_path(self):

def gclient_config(self):

Generate a ‘gclient’ configuration to check out Chromite.

Return: (config) A ‘gclient’ recipe module configuration.

def get_config_defaults(self):

def load_manifest_config(self, repository, revision):

Loads manifest-specified parameters from the manifest commit.

This method parses the commit log for the following information:

  • The branch to build (From the “Automatic”: tag).
  • The build ID (from the CrOS-Build-Id: tag).

Args: repository (str): The URL of the repository hosting the change. revision (str): The revision hash to load the build ID from.

def run(self, args=None, goma_dir=None):

Runs the configured ‘cbuildbot’ build.

This workflow uses the registered configuration dictionary to make master- and builder-specific changes to the standard workflow.

The specific workflow paths that are taken are also influenced by several build properties.

TODO(dnj): When CrOS migrates away from BuildBot, replace property inferences with command-line parameters.

This workflow:

  • Checks out the specified ‘cbuildbot’ repository.
  • Pulls information based on the configured change's repository/revision to pass to ‘cbuildbot’.
  • Executes the ‘cbuildbot’ command.

Args: args (list): Initial argument list, expanded based on other values. goma_dir: Goma client path used for simplechrome. Goma client for ChromeOS chroot should be located in sibling directory so that cbuildbot can find it automatically. Returns: (Step) the ‘cbuildbot’ execution step.

def run_cbuildbot(self, args=None, goma_canary=False):

Performs a Chromite repository checkout, then runs cbuildbot.

Args: args (list): Initial argument list, see run() for details. goma_canary (bool): Use canary version of goma if True.

def setup_board(self, board, args=None, **kwargs):

Run the setup_board script inside the chroot.

Used by the internal goma recipe.

def with_system_python(self):

Prepare a directory with the system python binary available.

This is designed to make it possible to mask “bundled python” out of the standard path without hiding any other binaries.

Returns: (context manager) A context manager that inserts system python into the front of PATH.

recipe_modules / chromium

DEPS: adb, build, builder_group, chromite, gn, goma, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/git, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/commit_position, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

class ChromiumApi(RecipeApi):

def apply_config(self, config_name, config_object=None, *args, **kwargs):

@_with_chromium_layout
def archive_build(self, step_name, gs_bucket, gs_acl=None, mode=None, build_name=None, **kwargs):

Returns a step invoking archive_build.py to archive a Chromium build.

@property
def build_properties(self):

@contextlib.contextmanager
def chromium_layout(self):

Context manager that must be entered prior to performing any Chromium recipe operations. This is responsible for basic enviornment initialization.

See “ensure_chromium_layout” for more information.

def clobber_if_needed(self):

Add an explicit clobber step if requested.

@_with_chromium_layout
def compile(self, targets=None, name=None, out_dir=None, target=None, use_goma_module=False, **kwargs):

Return a compile.py invocation.

Args: targets: List of build targets to compile. If empty, compile targets will be taken from chromium.c.compile_py.default_targets. If ‘all’ is one of the targets, no targets will appear on the ninja command line, which invokes ninja's behavior to build all targets that do not appear as an input to another target. name: Name of compile step. out_dir: Output directory for the compile. target: Custom config name to use in the output directory (defaults to “Release” or “Debug”). use_goma_module (bool): If True, use the goma recipe module.

Returns: A RawResult object with the compile step's status and failure message

Raises:

  • InfraFailure when goma failure occurs

def configure_bot(self, builders_dict, additional_configs=None):

Sets up the configurations and gclient to be ready for bot update.

builders_dict is a dict of builder_group -> buildername -> bot_config.

The current builder_group and buildername are looked up from the build properties; we then apply the configs specified in bot_config as appropriate.

Returns: A tuple of (builder_id, bot_config) for subsequent use in the recipe.

def delete_old_mac_toolchain(self):

Remove the old “hermetic” toolchain cache.

This is to expose any lingering dependencies on the old cache.

def ensure_chromium_layout(self):

Ensures that Chromium build layout is installed.

Note: the layout must be installed into the engine context. The “chromium_layout” context manager is probably a better way to access this.

Returns (ChromiumApi.Layout): The configured Chromium build layout.

def ensure_goma(self, client_type=‘release’):

def ensure_mac_toolchain(self):

def ensure_toolchains(self):

def get_annotate_by_test_name(self, _):

def get_builder_id(self):

@_with_chromium_layout
def get_clang_version(self, **kwargs):

def get_config_defaults(self):

def get_env(self):

def get_mac_toolchain_installer(self):

def get_version(self):

Returns a dictionary describing the version.

The dictionary will map the name of the portion of the version to its numeric value e.g. { ‘MAJOR’": ‘51’, ‘MINOR’: ‘0’, ‘BUILD’: ‘2704’, ‘PATCH’: ‘0’ }

def get_version_from_file(self, version_file_path, step_name=‘get version’):

Returns the version information from a specified file.

The dictionary will map the name of the portion of the version to its numeric value e.g. { ‘MAJOR’": ‘51’, ‘MINOR’: ‘0’, ‘BUILD’: ‘2704’, ‘PATCH’: ‘0’ }

@contextlib.contextmanager
def guard_compile(self, suffix=''):

Ensure that the output directory gets cleaned if compile is interrupted.

On entry, this context manager checks for the existence of a sentinel file inside the output directory, cleaning the output directory if it's present. It then creates the sentinel file.

On orderly, non-exception exit, this context manager removes the sentinel file.

The result of using this context manager will be that, if something untoward happens while in scope -- build cancellation, unexpected infra failure, etc -- the output directory will be clobbered during the next build.

def make_config_params(self, *args, **kwargs):

@_with_chromium_layout
def mb_analyze(self, builder_id, analyze_input, name=None, mb_path=None, mb_config_path=None, chromium_config=None, build_dir=None, phase=None, **kwargs):

Determine which targets need to be built and tested.

Args: builder_id: The ID of the builder with the build configuration to analyze. analyze_input: a dict of the following form: { ‘files’: [‘affected/file1’, ‘affected/file2’, ...], ‘test_targets’: [‘test_target1’, ‘test_target2’, ...], ‘additional_compile_targets’: [‘target1’, ‘target2’, ...], }

Returns: The StepResult from the analyze command.

@contextlib.contextmanager
def mb_failure_handler(self, name):

@_with_chromium_layout
def mb_gen(self, builder_id, name=None, mb_path=None, mb_config_path=None, use_goma=True, isolated_targets=None, build_dir=None, phase=None, android_version_code=None, android_version_name=None, gn_args_location=None, gn_args_max_text_lines=None, recursive_lookup=False, **kwargs):

Generate the build files in the source tree.

Args: builder_id: The ID for the builder to generate build files for. name: The name of the step. If not provided ‘generate_build_files’ will be used. mb_path: The path to the source directory containing the mb.py script. If not provided, the subdirectory tools/mb within the source tree will be used. mb_config_path: The path to the configuration file containing the builder specifications to be used by mb. If not provided, the project_generator.config_path config value will be used. If that is falsey, then mb_config.pyl under the directory identified by mb_path will be used. gn_args_location: Controls where the GN args for the build should be presented. By default or if gn.DEFAULT, the args will be in step_text if the count of lines is less than gn_args_max_text_lines or the logs otherwise. To force the presentation to the step_text or logs, use gn.TEXT or gn.LOGS, respectively. gn_args_max_text_lines: The maximum number of lines of GN args to display in the step_text when using the default behavior for displaying GN args. recursive_lookup: Whether the lookup of the GN arguments should recursively expand imported args files.

Returns: The content of the args.gn file.

@_with_chromium_layout
def mb_isolate_everything(self, builder_id, use_goma=True, mb_path=None, mb_config_path=None, name=None, build_dir=None, android_version_code=None, android_version_name=None, phase=None, **kwargs):

@_with_chromium_layout
def mb_lookup(self, builder_id, name=None, mb_path=None, mb_config_path=None, recursive=False, chromium_config=None, phase=None, use_goma=True, android_version_code=None, android_version_name=None, gn_args_location=None, gn_args_max_text_lines=None):

Lookup the GN args for the build.

Args: builder_id: The ID of the builder for the build configuration to look up. name: The name of the step. If not provided ‘lookup GN args’ will be used. mb_path: The path to the source directory containing the mb.py script. If not provided, the subdirectory tools/mb within the source tree will be used. mb_config_path: The path to the configuration file containing the builder specifications to be used by mb. If not provided, the project_generator.config_path config value will be used. If that is falsey, then mb_config.pyl under the directory identified by mb_path will be used. recursive: Whether the lookup should recursively expand imported args files. chromium_config: The chromium config object to use. If not provided, self.c will be used. gn_args_location: Controls where the GN args for the build should be presented. By default or if gn.DEFAULT, the args will be in step_text if the count of lines is less than gn_args_max_text_lines or the logs otherwise. To force the presentation to the step_text or logs, use gn.TEXT or gn.LOGS, respectively. gn_args_max_text_lines: The maximum number of lines of GN args to display in the step_text when using the default behavior for displaying GN args.

Returns: The content of the args.gn file.

@property
def output_dir(self):

Return the path to the built executable directory.

def process_dumps(self, **kwargs):

@_with_chromium_layout
def run_gn(self, use_goma=False, gn_path=None, build_dir=None, **kwargs):

@_with_chromium_layout
def run_mb_cmd(self, name, mb_command, builder_id, mb_path=None, mb_config_path=None, chromium_config=None, phase=None, use_goma=True, android_version_code=None, android_version_name=None, additional_args=None, **kwargs):

Run an arbitrary mb command.

Args: name: The name of the step. mb_command: The mb command to run. builder_id: The ID of the builder of the configuration to run mb for. mb_path: The path to the source directory containing the mb.py script. If not provided, the subdirectory tools/mb within the source tree will be used. mb_config_path: The path to the configuration file containing the builder specifications to be used by mb. If not provided, the project_generator.config_path config value will be used. If that is falsey, then mb_config.pyl under the directory identified by mb_path will be used. chromium_config: The chromium config object to use. If not provided, self.c will be used. use_goma: Whether goma is needed or not. If use_goma=True but not yet installed, it will run ensure_goma to install goma client. additional_args: Any args to the mb script besides those for setting the group, builder and the path to the config file. **kwargs: Additional arguments to be forwarded onto the python API.

@_with_chromium_layout
def runhooks(self, env=None, **kwargs):

Run the build-configuration hooks for chromium.

@_with_chromium_layout
def runtest(self, test, args=None, xvfb=False, name=None, annotate=None, results_url=None, perf_dashboard_id=None, test_type=None, python_mode=False, point_id=None, revision=None, webkit_revision=None, test_launcher_summary_output=None, perf_id=None, perf_config=None, chartjson_file=False, use_histograms=False, tee_stdout_file=None, **kwargs):

Return a runtest.py invocation.

def set_build_properties(self, props):

@_with_chromium_layout
def sizes(self, results_url=None, perf_id=None, platform=None, **kwargs):

Return a sizes.py invocation. This uses runtests.py to upload the results to the perf dashboard.

def taskkill(self):

@returns_placeholder
def test_launcher_filter(self, tests):

@property
def xcode_build_version(self):

recipe_modules / chromium_android

DEPS: adb, archive, build, chromium, chromium_checkout, test_utils, zip, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/git, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step, recipe_engine/time, recipe_engine/url

class AndroidApi(RecipeApi):

def adb_install_apk(self, apk, allow_downgrade=False, keep_data=False, devices=None):

def apk_path(self, apk):

def authorize_adb_devices(self):

@property
def blacklist_file(self):

def clean_local_files(self, clean_pyc_files=True):

def common_tests_final_steps(self, force_latest_version=False, checkout_dir=None):

def common_tests_setup_steps(self, **provision_kwargs):

def configure_from_properties(self, config_name, **kwargs):

@property
def coverage_dir(self):

def coverage_report(self, upload=True, **kwargs):

Creates an EMMA HTML report and optionally uploads it to storage bucket.

Creates an EMMA HTML report using generate_emma_html.py, and uploads the HTML report to the chrome-code-coverage storage bucket if |upload| is True.

Args: upload: Uploads EMMA HTML report to storage bucket unless False is passed in. **kwargs: Kwargs for python and gsutil steps.

Returns: step_result: The recipe result from generating the coverage report.

def create_adb_symlink(self):

def create_result_details(self, step_name, json_results_file):

@property
def denylist_file(self):

@property
def denylist_flag(self):

def device_recovery(self, **kwargs):

def device_status(self, **kwargs):

def device_status_check(self):

@property
def devices(self):

def download_build(self, bucket, path, extract_path=None, globs=None):

@property
def file_changes_path(self):

Get or create the path to the file containing changes for this revision.

This file will contain a dict mapping file paths to lists of changed lines for each file. This is used to generate incremental coverage reports.

def generate_breakpad_symbols(self, symbols_dir, binary_path, root_chromium_dir):

Generate breakpad symbols.

This step requires dump_syms binary to exist in the build dir.

Args: symbols_dir: The directory to dump the breakpad symbols to. binary_path: Path to binary to generate symbols for. root_chromium_dir: Root Chromium directory.

def get_changed_lines_for_revision(self):

Saves a JSON file containing the files/lines requiring coverage analysis.

Saves a JSON object mapping file paths to lists of changed lines to the coverage directory.

def get_config_defaults(self):

def git_number(self, commitrefs=None, step_test_data=None, **kwargs):

@contextlib.contextmanager
def handle_exit_codes(self):

Handles exit codes emitted by the test runner and other scripts.

def host_info(self, args=None, **kwargs):

def incremental_coverage_report(self):

Creates an incremental code coverage report.

Generates a JSON file containing incremental coverage stats. Requires |file_changes_path| to contain a file with a valid JSON object.

def init_and_sync(self, gclient_config=‘android_bare’, with_branch_heads=False, use_bot_update=True, use_git_cache=True):

@property
def known_devices_file(self):

def logcat_dump(self):

def make_zip_archive(self, step_name, archive_name, files=None, preserve_paths=True, include_filters=None, exclude_filters=None, **kwargs):

Creates and stores the archive file.

Args: step_name: Name of the step. archive_name: Name of the archive file. files: If specified, only include files here instead of out/. preserve_paths: If True, files will be stored using the subdirectories in the archive. include_filters: List of globs to be included in the archive. exclude_filters: List of globs to be excluded from the archive.

def monkey_test(self, **kwargs):

def non_blacklisted_devices(self):

def non_denylisted_devices(self):

@property
def out_path(self):

def provision_devices(self, skip_wipe=False, disable_location=False, reboot_timeout=None, emulators=False, **kwargs):

def resource_sizes(self, apk_path, chartjson_file=False, perf_id=None, step_suffix=''):

def run_bisect_script(self, extra_src=‘‘, path_to_config=’’, **kwargs):

def run_java_unit_test_suite(self, suite, target_name=None, verbose=True, json_results_file=None, suffix=None, additional_args=None, **kwargs):

def run_telemetry_browser_test(self, test_name, browser=‘android-chromium’):

Run a telemetry browser test.

def run_test_suite(self, suite, verbose=True, result_details=False, store_tombstones=False, name=None, json_results_file=None, shard_timeout=None, args=None, **kwargs):

def run_tree_truth(self, additional_repos=None):

def shutdown_device_monitor(self):

def spawn_device_monitor(self):

def spawn_logcat_monitor(self):

def stack_tool_steps(self, force_latest_version=False):

def stackwalker(self, root_chromium_dir, binary_paths):

Runs stack walker tool to symbolize breakpad crashes.

This step requires logcat file. The logcat monitor must have been run on the bot.

Args: binary_paths: Paths to binaries to generate breakpad symbols. root_chromium_dir: Root Chromium directory.

def staged_files_matching_filter(self, diff_filter):

Returns list of files changed matching the provided diff-filter.

Args: diff_filter: A string to be used as the diff-filter.

Returns: A list of file paths (strings) matching the provided |diff-filter|.

def supersize_archive(self, apk_path, size_path, step_suffix=''):

Creates a .size file for the given .apk or .minimal.apks.

def test_report(self):

def test_runner(self, step_name, args=None, wrapper_script_suite_name=None, pass_adb_path=True, **kwargs):

Wrapper for the python testrunner script.

Args: step_name: Name of the step. args: Testrunner arguments.

def upload_apks_for_bisect(self, update_properties, bucket, path):

Uploads android apks for functional bisects.

def upload_build(self, bucket, path):

def use_devil_adb(self):

def zip_and_upload_build(self, _):

recipe_modules / chromium_checkout

DEPS: chromium, depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/runtime, recipe_engine/step

class ChromiumCheckoutApi(RecipeApi):

@property
def checkout_dir(self):

Returns directory where checkout can be created.

def ensure_checkout(self, bot_config=None, **kwargs):

Wrapper for bot_update.ensure_checkout with chromium-specific additions.

def get_checkout_dir(self, bot_config):

def get_files_affected_by_patch(self, relative_to=‘src/’, cwd=None):

Returns list of POSIX paths of files affected by patch for “analyze”.

Paths are relative to relative_to which for analyze should be ‘src/’. Paths always use ‘/’ as a path delimiter, no matter the OS.

@property
def working_dir(self):

Returns parent directory of the checkout.

Requires |ensure_checkout| to be called first.

recipe_modules / chromium_gsutil

DEPS: build, recipe_engine/context, recipe_engine/path, recipe_engine/python, recipe_engine/step

class ChromiumGSUtilApi(RecipeApi):

def download_latest_file(self, base_url, partial_name, destination, name=‘Download latest file from GS’):

Get the latest archived object with the given base url and partial name.

Args: base_url: Base Google Storage archive URL (gs://...) containing the build. partial_name: Partial name of the archive file to download. destination: Destination file/directory where the file will be downloaded. name: The name of the step.

recipe_modules / chromium_swarming

DEPS: build, builder_group, chromium, chromium_checkout, code_coverage, isolate, swarming_client, test_utils, traceback, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step, recipe_engine/swarming

class SwarmingApi(RecipeApi):

Recipe module to use swarming.py tool to run tasks on Swarming.

General usage:

  1. Tweak default task parameters applied to all swarming tasks (such as default_dimensions and default_priority).
  2. Isolate some test using ‘isolate’ recipe module. Get isolated hash as a result of that process.
  3. Create a task configuration using ‘task(...)’ method, providing isolated hash obtained previously.
  4. Tweak the task parameters. This step is optional.
  5. Launch the task on swarming by calling ‘trigger_task(...)’.
  6. Continue doing useful work locally while the task is running concurrently on swarming.
  7. Wait for task to finish and collect its result (exit code, logs) by calling ‘collect_task(...)’.

See also example.py for concrete code.

def add_default_tag(self, tag):

Adds a tag to the Swarming tasks triggered.

Tags are used for maintenance, they can be used to calculate the number of tasks run for a day to calculate the cost of a type of type (CQ, ASAN, etc).

Tags can be added per individual task.

def check_client_version(self, step_test_data=None):

Yields steps to verify compatibility with swarming_client version.

def collect_task(self, task, **kwargs):

Waits for a single triggered task to finish.

If the task is sharded, will wait for all shards to finish. Behaves as a regular recipe step: returns StepData with step results on success or raises StepFailure if task fails.

Args: task: SwarmingTask instance, previously triggered with ‘trigger’ method. kwargs: passed to recipe step constructor as-is.

def configure_swarming(self, project_name, precommit, builder_group=None, mastername=None, default_priority=None, path_to_testing_dir=None):

Configures default swarming dimensions and tags.

Uses the ‘chromium’ global config to determine target platform defaults, make sure something like chromium_tests.configure_build() has been called beforehand.

Args: project_name: Lowercase name of the project, e.g. “blink”, “chromium”. precommit: Boolean flag to indicate whether the tests are running before the changes are commited. builder_group: optional name of the builder group to use to configure the default priority of swarming tasks. mastername: deprecated, use builder_group instead. default_priority: optional default_priority to use. Will override the priority name inherited from builder_group (or the global default). path_to_testing_dir: The path to a local directory mirroring https://chromium.googlesource.com/chromium/src/+/master/testing. This is needed to access merge and trigger scripts. If unset, this module will look at self.m.chromium_checkout.working_dir.

@property
def default_dimensions(self):

Returns a copy of the default Swarming dimensions to run task on.

The dimensions are what is used to filter which bots are able to run the task successfully. This is particularly useful to discern between OS versions, type of CPU, GPU card or VM, or preallocated pool.

Example: {‘cpu’: ‘x86-64’, ‘os’: ‘Windows-XP-SP3’}

This value can be changed per individual task.

@property
def default_env(self):

Returns a copy of the default environment variable to run tasks with.

By default the environment variable is not modified. Additional environment variables can be specified for each task.

This value can be changed per individual task.

@default_expiration.setter
def default_expiration(self, value):

@default_hard_timeout.setter
def default_hard_timeout(self, value):

@default_idempotent.setter
def default_idempotent(self, value):

@default_io_timeout.setter
def default_io_timeout(self, value):

@default_priority.setter
def default_priority(self, value):

@default_user.setter
def default_user(self, value):

def get_collect_cmd_args(self, requests_json):

SwarmingTask -> argument list for go swarming command.

def get_collect_task_args(self, merge_script, merge_arguments, build_properties, requests_json, output_json=None, task_output_dir=None, allow_missing_json=False):

Generate the arguments needed to run collect_task.py.

Args: requests_json: the swarming task IDs for the collect task to collect. IDs are in JSON format. For the other arguments, please refer to collect_task.collect_task() for details.

def get_step_name(self, prefix, task):

SwarmingTask -> name of a step of a waterfall.

Will take a task name (+ step name prefix) and append OS dimension to it.

Args: prefix: prefix to append to task name, like ‘trigger’. task: SwarmingTask instance.

Returns: ‘[] on ’

def gtest_task(self, name=None, isolated=None, extra_args=None, cipd_packages=None, merge=None, raw_cmd=None, relative_cwd=None, **kwargs):

Returns a new SwarmingTask instance to run an isolated gtest on Swarming.

The implementation uses a test_utils.gtest_results() placeholder to parse the JSON output.

For meaning of the rest of the arguments see ‘task’ method.

def initialize(self):

def isolated_script_task(self, raw_cmd=None, relative_cwd=None):

Returns a new SwarmingTask to run an isolated script test on Swarming.

At the time of this writting, this code is used by WebRTC and “isolated_scripts” entries in Chromium's src/testing/buildbot/*.json.

Swarming recipe module knows how collect JSON file with test execution summary produced by isolated script tests launcher. A custom script can be passed to merge the collected results and post-process them.

def merge_script_path(self, name):

Returns the path to a merge script.

This assumes that a chromium checkout exists, and the chromium module is configured correctly.

@staticmethod
def prefered_os_dimension(platform):

Given a platform name returns the prefered Swarming OS dimension.

Platform name is usually provided by ‘platform’ recipe module, it's one of ‘win’, ‘linux’, ‘mac’. This function returns more concrete Swarming OS dimension that represent this platform on Swarming by default.

Recipes are free to use other OS dimension if there's a need for it. For example WinXP try bot recipe may explicitly specify ‘Windows-XP-SP3’ dimension.

def report_stats(self):

Report statistics on all tasks ran so far.

def run_collect_task_script(self, name, task_args, gen_step_test_data, **kwargs):

@service_account_json.setter
def service_account_json(self, value):

Service account json to use for swarming.

def set_default_dimension(self, key, value):

def set_default_env(self, key, value):

@show_outputs_ref_in_collect_step.setter
def show_outputs_ref_in_collect_step(self, value):

@returns_placeholder
def summary(self):

@swarming_server.setter
def swarming_server(self, value):

Changes URL of Swarming server to use.

def task(self, name=None, build_properties=None, cipd_packages=None, collect_step=None, env=None, env_prefixes=None, extra_args=None, failure_as_exception=True, idempotent=None, ignore_task_failure=False, isolated=None, merge=None, named_caches=None, optional_dimensions=None, raw_cmd=None, service_account=None, shards=1, shard_indices=None, task_output_dir=None, task_to_retry=None, trigger_script=None, relative_cwd=None):

Returns a new SwarmingTask instance to run an isolated executable on Swarming.

For google test executables, use gtest_task() instead.

At the time of this writting, this code is used by V8, Skia and iOS.

The return value can be customized if necessary (see SwarmingTask class below). Pass it to ‘trigger_task’ to launch it on swarming. Later pass the same instance to ‘collect_task’ to wait for the task to finish and fetch its results.

The default collect step will raise a StepFailure exception if there is a test failure. To change this behavior, overwrite the default collect step.

Args:

  • name: name of the test, used as part of a task ID.
  • isolated: hash of isolated test on isolate server, the test should be already isolated there, see ‘isolate’ recipe module.
  • ignore_task_failure: whether to ignore the test failure of swarming tasks. By default, this is set to False.
  • shards: if defined, the number of shards to use for the task. By default this value is either 1 or based on the name.
  • shard_indices: Which shards to run. If None, all shards are run.
  • task_output_dir: if defined, the directory where task results are placed. The caller is responsible for removing this folder when finished.
  • extra_args: list of command line arguments to pass to isolated tasks.
  • idempotent: whether this task is considered idempotent. Defaults to self.default_idempotent if not specified.
  • cipd_packages: list of 3-tuples corresponding to CIPD packages needed for the task: (‘path’, ‘package_name’, ‘version’), defined as follows:
    • path: Path relative to the Swarming root dir in which to install the package.
    • package_name: Name of the package to install, eg. “infra/tools/luci-auth/${platform}”
    • version: Version of the package, either a package instance ID, ref, or tag key/value pair.
  • build_properties: An optional dict containing various build properties. These are typically but not necessarily the properties emitted by bot_update.
  • merge: An optional dict containing:
    • “script”: path to a script to call to post process and merge the collected outputs from the tasks. The script should take one named (but required) parameter, ‘-o’ (for output), that represents the path that the merged results should be written to, and accept N additional paths to result files to merge. The merged results should be in the JSON Results File Format (https://www.chromium.org/developers/the-json-test-results-format) and may optionally contain a top level “links” field that may contain a dict mapping link text to URLs, for a set of links that will be included in the buildbot output.
    • “args”: an optional list of additional arguments to pass to the above script.
  • trigger_script: An optional dict containing:
    • “script”: path to a script to call which will use custom logic to trigger appropriate swarming jobs, using swarming.py.
    • “args”: an optional list of additional arguments to pass to the script. See SwarmingTask.init docstring for more details.
  • named_caches: a dict {name: relpath} requesting a cache named name to be installed in relpath relative to the task root directory.
  • service_account: (string) a service account email to run the task under.
  • raw_cmd: Optional list of arguments to be used as raw command. Can be used instead of extra args.
  • env_prefixes: a dict {ENVVAR: [relative, paths]} which instructs swarming to prepend the given relative paths to the PATH-style ENVVAR specified.
  • env: a dict {ENVVAR: ENVVALUE} which instructs swarming to set the environment variables before invoking the command. These are applied on top of the default environment variables.
  • optional_dimensions: {expiration: [{key: value]} mapping with swarming dimensions that specify on what Swarming slaves tasks can run. These are similar to what is specified in dimensions but will create additional ‘fallback’ task slice(s) with the optional dimensions.
  • task_to_retry: Task object. If set, indicates that this task is a (potentially partial) retry of another task. When collecting, the successful shards from ‘task_to_retry’ will be merged with the new shards in this task.
  • failure_as_exception: Boolean. Whether test failures should throw a recipe exception during the collect step.
  • relative_cwd: An optional string indicating the working directory relative to the task root where raw_cmd (or the command specified in the isolate, if raw_cmd is empty) will run.

@task_output_stdout.setter
def task_output_stdout(self, value):

def trigger_task(self, task, **kwargs):

Triggers one task.

It the task is sharded, will trigger all shards. This steps justs posts the task and immediately returns. Use ‘collect_task’ to wait for a task to finish and grab its result.

Returns a list of StepResults, one for each shard triggered. Raises StepFailure if any shard fails to trigger. Subsequent shards are not triggered.

Args: task: SwarmingTask instance. kwargs: passed to recipe step constructor as-is. Returns: A list of StepResults, one for each shard triggered.

@verbose.setter
def verbose(self, value):

Enables or disables verbose output in swarming scripts.

def wait_for_finished_task_set(self, task_sets, suffix=None, attempts=0):

Waits for a finished set of tasks.

Args: task_sets: A list of lists. Each item in task_sets is a set of tasks, which should be collected together. suffix: An optional name suffix. attempts: How many times have we polled swarming for this data. Used to retry at a slower rate, so we don't overload the server with requests.

Returns: A tuple of two items: 1. A list of task sets which have finished. 2. How many attempts we've now made to get task data.

Uses the ‘get_states’ endpoint on the swarming server.

recipe_modules / chromium_tests

DEPS: adb, archive, build, builder_group, chromium, chromium_android, chromium_checkout, chromium_swarming, code_coverage, filter, gn, goma, isolate, perf_dashboard, pgo, puppet_service_account, symupload, test_results, test_utils, traceback, zip, depot_tools/bot_update, depot_tools/gclient, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/context, recipe_engine/cq, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/scheduler, recipe_engine/step, recipe_engine/swarming, recipe_engine/time

class ChromiumTestsApi(RecipeApi):

def archive_build(self, builder_id, update_step, bot_config):

Archive the build if the bot is configured to do so.

There are three types of builds that get archived: regular builds, clustefuzz builds, and generic archives.

See api.archive.clusterfuzz_archive and archive_build.py for more information.

This is currently used to store builds long-term and to transfer them to clusterfuzz.

@property
def builders(self):

def compile_specific_targets(self, bot_config, update_step, build_config, compile_targets, tests_including_triggered, builder_id=None, mb_phase=None, mb_config_path=None, mb_recursive_lookup=True, override_execution_mode=None):

Runs compile and related steps for given builder.

Allows finer-grained control about exact compile targets used.

Args: bot_config - The configuration for the bot being executed. update_step - The StepResult from the bot_update step. build_config - The configuration of the current build. compile_targets - The list of targets to compile. tests_including_triggered - The list of tests that will be executed by this builder and any triggered builders. The compile operation will prepare and upload the isolates for the tests that use isolate. builder_id - A BuilderId identifying the configuration to use when running mb. If not provided, chromium.get_builder_id() will be used. mb_phase - A phase argument to be passed to mb. Must be provided if the configuration identified by builder_id uses phases and must not be provided if the configuration identified by builder_id does not use phases. mb_config_path - An optional override specifying the file where mb will read configurations from. mb_recursive_lookup - A boolean indicating whether the lookup operation should recursively expand any included files. If False, then the lookup output will contain the include statement. override_execution_mode - An optional override to change the execution mode.

Returns: RawResult object with compile step status and failure message

def configure_build(self, bot_config):

def create_bot_config_object(self, builder_ids_or_bot_mirrors, builders=None):

def create_test_runner(self, tests, suffix='', serialize_tests=False, retry_failed_shards=False, retry_invalid_shards=False):

Creates a test runner to run a set of tests.

Args api: API of the calling recipe. tests: List of step.Test objects to be run. suffix: Suffix to be passed when running the tests. serialize_tests: True if this bot should run all tests serially (specifically, tests run on Swarming). Used to reduce the load generated by waterfall bots. retry_failed_shards: If true, retry swarming tests that fail. See run_tests documentation in test_utils module. retry_invalid_shards: If true, retry swarming tests with no valid results, See run_tests documentation in test_utils module.

Returns: A function that can be passed to setup_chromium_tests or run directly.

def deapply_deps(self, bot_update_step):

def deapply_patch(self, bot_update_step):

def download_and_unzip_build(self, builder_id, update_step, bot_config, build_archive_url=None, build_revision=None, override_execution_mode=None, read_gn_args=True):

def generate_tests_from_source_side_spec(self, source_side_spec, bot_spec, buildername, builder_group, swarming_dimensions, scripts_compile_targets_fn, bot_update_step):

def get_android_version_details(self, bot_config, log_details=False):

def get_common_args_for_scripts(self, bot_config=None):

def get_compile_targets_for_scripts(self, bot_config=None):

This gets the combined compile_targets information from the //testing/scripts/get_compile_targets.py script.

This script returns the compile targets for all of the ‘script tests’ in chromium (including ones that we don't plan to run on this configuration, see TODO). The information is returned in the following format:

{ “some_script_name.py”: [“list”, “of”, “compile”, “targets”], }

Where “some_script_name.py” corresponds to “//testing/scripts/some_script_name.py”.

Returns: The compile target data in the form described above.

TODO:

  • Only gather targets for the scripts that we might concievably run.

def get_config_defaults(self):

def inbound_transfer(self, bot, bot_update_step, build_config, mb_config_path, mb_phase):

Handles the tester half of the builder->tester transfer flow.

See outbound_transfer for a discussion of transfer mechanisms.

For isolate-based transfers, this merely clears out the output directory. For package-based transfer, this downloads the build from GS.

Args: bot: a BotMetadata object for the currently executing tester. bot_update_step: the result of a previously executed bot_update step. build_config: a BuildConfig object.

def integration_steps(self, builders=None, bots=None):

def log(self, message):

def lookup_bot_metadata(self, builders=None, mirrored_bots=None):

def lookup_builder_gn_args(self, bot_meta_data, mb_config_path=None, mb_phase=None, builders=None):

def main_waterfall_steps(self, mb_config_path=None, mb_phase=None, builders=None, root_solution_revision=None):

Compiles and runs tests for chromium recipe.

Args: root_solution_revision: Git revision of Chromium to check out. Passed down to bot_update.ensure_checkout. Used by CI bots of projects which are Chromium components, like ANGLE CI bots, to run tests with a known good version of Chromium. If omitted, ToT Chromium is checked out.

Returns:

  • A RawResult object with the status of the build and a failure message if a failure occurred.
  • None if no failures

def outbound_transfer(self, bot, bot_update_step, build_config):

Handles the builder half of the builder->tester transfer flow.

We support two different transfer mechanisms:

  • Isolate transfer: builders upload tests + any required runtime dependencies to isolate, then pass the isolate hashes to testers via properties. Testers use those hashes to trigger swarming tasks but do not directly download the isolates.
  • Package transfer: builders package and upload some of the output directory (see package_build for details). Testers download the zip and proceed to run tests.

These can be used concurrently -- e.g., a builder that triggers two different testers, one that supports isolate transfer and one that doesn't, would run both the isolate transfer flow and the package transfer flow.

For isolate-based transfers, this function just sets a trigger property, as tests get isolated immediately after compilation (see compile_specific_targets).

For package-based transfers, this uploads some of the output directory to GS. (See package_build for more details.)

Args: bot: a BotMetadata object for the currently executing builder. bot_update_step: the result of a previously executed bot_update step. build_config: a BuildConfig object. Returns: A dict containing additional properties that should be added to any triggered child builds.

def package_build(self, builder_id, update_step, bot_config, reasons=None):

Zip and upload the build to google storage.

This is currently used for transfer between builder and tester, including bisect testers.

Note that:

  • this will only upload when called from pure builders. On builder_testers and testers, this is a no-op.
  • this is a no-op for builders that upload to clusterfuzz; those are handled in archive_build.
  • this may upload twice on perf builders.

def prepare_checkout(self, bot_config, **kwargs):

def read_source_side_spec(self, source_side_spec_file):

def run_mb_and_compile(self, compile_targets, isolated_targets, name_suffix, builder_id=None, mb_phase=None, mb_config_path=None, mb_recursive_lookup=False, android_version_code=None, android_version_name=None):

def run_tests(self, bot_meta_data, tests):

def run_tests_with_and_without_changes(self, builders, mirrored_bots, deapply_changes, tests=None, root_solution_revision=None):

Compile and run tests for chromium_trybot recipe.

Args: builders: All the builders which exist. mirrored_bots: The set of mirrored bots. deapply_changes: A function which deapplies changes to the code being tested. tests: A list of tests to run on this bot. Before using this argument, please talk to martiniss@.

Returns:

  • A RawResult object with the status of the build and failure message if an error occurred.
  • None if no failures

def runhooks(self, update_step):

def set_swarming_command_lines(self, tests, suffix):

def set_up_swarming(self, bot_config):

def trigger_child_builds(self, builder_id, update_step, bot_config, additional_properties=None):

def trybot_steps(self, builders=None, trybots=None, root_solution_revision=None):

Compiles and runs tests for chromium recipe.

Args: root_solution_revision: Git revision of Chromium to check out. Passed down to bot_update.ensure_checkout. Used by bots on CQs of projects which are Chromium components, like ANGLE CQ, to run tests with a known good version of Chromium. If omitted, ToT Chromium is checked out.

Returns:

  • A RawResult object with the status of the build and a failure message if a failure occurred.
  • None if no failures

def trybot_steps_for_tests(self, builders=None, trybots=None, tests=None):

Similar to trybot_steps, but only runs certain tests.

This is currently experimental code. Talk to martiniss@ if you want to use this.

@property
def trybots(self):

@contextlib.contextmanager
def wrap_chromium_tests(self, bot_config, tests=None):

recipe_modules / code_coverage

DEPS: chromium, chromium_checkout, gn, profiles, swarming_client, zip, depot_tools/gclient, depot_tools/git, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step

class CodeCoverageApi(RecipeApi):

This module contains apis to generate code coverage data.

@property
def cov_executable(self):

Returns the path to the llvm-cov executable.

def instrument(self, affected_files, output_dir=None):

Saves source paths to generate coverage instrumentation for to a file.

Args: affected_files (list of str): paths to the files we want to instrument, relative to the checkout path.

@property
def metadata_dir(self):

A temporary directory for the metadata.

It's a temporary directory with a sub directory named in current test type. Temp dir is created on first access to this property. Subdirs are created on first access when processing each test type.

@property
def platform(self):

def process_clang_coverage_data(self, tests):

Processes the clang coverage data for html report or metadata.

Args: tests (list of steps.Test): A list of test objects whose binaries we are to create a coverage report for.

def process_coverage_data(self, tests):

Processes the coverage data for html report or metadata.

Args: tests (list of steps.Test): A list of test objects whose binaries we are to create a coverage report for.

def process_java_coverage_data(self, **kwargs):

Generates metadata and JaCoCo HTML report to upload to storage bucket.

Generates Java coverage metadata and JaCoCo HTML report by scripts, and uploads them to the code-coverage-data storage bucket.

Args: **kwargs: Kwargs for python and gsutil steps.

@property
def report_dir(self):

A temporary directory to save a report to. Created on first access.

def shard_merge(self, step_name, target_name, additional_merge=None, skip_validation=False, sparse=False):

Returns a merge object understood by the swarming module.

See the docstring for the merge parameter of api.chromium_swarming.task.

|additional_merge| is an additional merge script. This will be invoked from the clang coverage merge script.

@property
def use_clang_coverage(self):

@property
def use_java_coverage(self):

@property
def using_coverage(self):

Checks if the current build is running coverage-instrumented targets.

recipe_modules / codesearch

DEPS: build, chromium, goma, depot_tools/depot_tools, depot_tools/git, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

class CodesearchApi(RecipeApi):

def add_kythe_metadata(self):

Adds inline Kythe metadata to Mojom generated files.

This metadata is used to connect things in the generated file to the thing in the Mojom file which generated it. This is made possible by annotations added to the generated file by the Mojo compiler.

def checkout_generated_files_repo_and_sync(self):

Check out the generated files repo and sync the generated files into this checkout.

def cleanup_old_generated(self, age_days=7):

Clean up generated files older than the specified number of days.

Args: age_days: Minimum age in days for files to delete (integer).

def create_and_upload_kythe_index_pack(self, commit_hash, commit_timestamp):

Create the kythe index pack and upload it to google storage.

Args: commit_hash: Hash of the commit at which we‘re creating the index pack, if None use got_revision. commit_timestamp: Timestamp of the commit at which we’re creating the index pack, in integer seconds since the UNIX epoch.

def generate_compilation_database(self, targets, mastername, buildername, output_file=None, mb_config_path=None):

def generate_gn_target_list(self, output_file=None):

def get_config_defaults(self):

def run_clang_tool(self):

Download and run the clang tool.

recipe_modules / cronet

DEPS: build, chromium, chromium_android, perf_dashboard, puppet_service_account, depot_tools/gsutil, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

Common steps for recipes that sync/build Cronet sources.

class CronetApi(RecipeApi):

def build(self, builder_id=None, targets=None, use_goma=True):

def get_bucket(self, platform):

def get_version(self):

def init_and_sync(self, recipe_config, kwargs, chromium_apply_config=None):

def run_perf_tests(self, perf_id):

def sizes(self, perf_id):

def upload_package(self, build_config, cronetdir=None, platform=‘android’):

recipe_modules / crrev

DEPS: build, recipe_engine/commit_position, recipe_engine/json, recipe_engine/python, recipe_engine/step

class CrrevApi(RecipeApi):

Recipe module for making requests to crrev.com.

def to_commit_hash(self, commit_position, project=‘chromium’, repo=‘chromium/src’, attempts=3, step_name=None, **kwargs):

Fetches the corresponding commit hash for a commit position.

def to_commit_position(self, commit_hash, attempts=3, step_name=None):

Fetches a commit position string given a commit hash.

recipe_modules / disk

DEPS: traceback, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/python, recipe_engine/step

class DiskApi(RecipeApi):

DiskApi contains helper functions for reading disk info.

def space_usage(self, path=None, warning_level=None, previous_result=None, can_fail_build=False, name=None, **kwargs):

Displays disk space usage.

Does not support Windows yet, does not emit steps.

Prints disk space usage in step log and step text.

Args: path (str): path mapped to the disk. Defaults to [START_DIR]. warning_level (float): a value from 0 to 1.0. If usage reaches this level, mark the step as WARNING. Defaults to 0.9. previous_result (dict): previous result of space_usage call. If passed, delta is displayed in step text. name (str): step name. Defaults to “disk space usage”.

Returns: A dict with disk usage info or None if step fails. Dict keys: * capacity (float): disk capacity, in MiB. * used (float): disk usage, in MiB.

recipe_modules / docker

DEPS: recipe_engine/path, recipe_engine/python, recipe_engine/raw_io, recipe_engine/service_account, recipe_engine/step

class DockerApi(RecipeApi):

Provides steps to connect and run Docker images.

def __call__(self, *args, **kwargs):

Executes specified docker command.

Please make sure to use api.docker.login method before if specified command requires authentication.

Args: args: arguments passed to the ‘docker’ command including subcommand name, e.g. api.docker(‘push’, ‘my_image:latest’). kwargs: arguments passed down to api.step module.

def ensure_installed(self, **kwargs):

Checks that the docker binary is in the PATH.

Raises StepFailure if binary is not found.

def get_version(self, **kwargs):

Returns Docker version installed or None if failed to detect.

def login(self, server=‘gcr.io’, project=‘chromium-container-registry’, service_account=None, step_name=None, **kwargs):

Connect to a Docker registry.

This step must be executed before any other step in this module that requires authentication.

Args: server: GCP container registry to pull images from. Defaults to ‘gcr.io’. project: Name of the Cloud project where Docker images are hosted. service_account: service_account.api.ServiceAccount used for authenticating with the container registry. Defaults to the task's associated service account. step_name: Override step name. Default is ‘docker login’.

def run(self, image, step_name=None, cmd_args=None, dir_mapping=None, env=None, inherit_luci_context=False, **kwargs):

Run a command in a Docker image as the current user:group.

Args: image: Name of the image to run. step_name: Override step name. Default is ‘docker run’. cmd_args: Used to specify command to run in an image as a list of arguments. If not specified, then the default command embedded into the image is executed. dir_mapping: List of tuples (host_dir, docker_dir) mapping host directories to directories in a Docker container. Directories are mapped as read-write. env: dict of env variables. inherit_luci_context: Inherit current LUCI Context (including auth). CAUTION: removes network isolation between the container and the docker host. Read more https://docs.docker.com/network/host/.

recipe_modules / filter

DEPS: chromite, chromium, goma, depot_tools/git, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step

class FilterApi(RecipeApi):

def analyze(self, affected_files, test_targets, additional_compile_targets, config_file_name, builder_id=None, mb_config_path=None, build_output_dir=None, additional_names=None):

Runs “analyze” step to determine targets affected by the patch.

Returns a tuple of:

  • list of targets that are needed to run tests (see filter recipe module)
  • list of targets that need to be compiled (see filter recipe module)

@property
def compile_targets(self):

Returns the set of targets that need to be compiled based on the set of files that have changed.

def does_patch_require_compile(self, affected_files, test_targets=None, additional_compile_targets=None, additional_names=None, config_file_name=‘trybot_analyze_config.json’, use_mb=False, builder_id=None, mb_config_path=None, build_output_dir=None, **kwargs):

Check to see if the affected files require a compile or tests.

Args: affected_files: list of files affected by the current patch; paths should only use forward slashes (“/”) on all platforms test_targets: the possible set of executables that are desired to run. When done, test_targets() returns the subsetset of targets that are affected by the files that have changed. additional_compile_targets: any targets to compile in addition to the test_targets. additional_names: additional top level keys to look up exclusions in, see |config_file_name|. config_file_name: the config file to look up exclusions in. builder_id: the ID of the builder with the config to run MB against. mb_config_path: the path to the MB config file.

Within the file we concatenate “base.exclusions” and “|additional_names|.exclusions” (if |additional_names| is not none) to get the full list of exclusions.

The exclusions should be a list of Python regular expressions (as strings).

If any of the files in the current patch match one of the values in we assume everything needs to be compiled and tested.

If an error occurs, an exception is raised. Otherwise, after the call completes the results can be obtained from self.compile_targets() and self.test_targets().

To run MB, we get the build ID for the builder currently being run and not those of the continuous builder the trybot may be configured to match, because the trybot may have a different mb configuration. However, recipes used by Findit for culprit finding may override the default with builder_id to exactly match a given continuous builder.

@property
def paths(self):

Returns the paths that have changed in this patch.

Paths are always posix-style paths, even on windows. This allows analyze configs to only include posix-style paths.

@property
def test_targets(self):

Returns the set of targets passed to does_patch_require_compile() that are affected by the set of files that have changed.

recipe_modules / findit

DEPS: chromium, chromium_checkout, chromium_swarming, chromium_tests, filter, test_utils, depot_tools/depot_tools, depot_tools/gclient, depot_tools/git, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step

class FinditApi(RecipeApi):

def compile_and_test_at_revision(self, bot_mirror, revision, requested_tests, use_analyze, test_repeat_count=None, skip_tests=False):

Compile the targets needed to execute the specified tests and run them.

Args: bot_mirror (TryMirror): The TryMirror object describing the builder and possibly tester to derive configuration from. revision (str): A string representing the commit hash of the revision to test. requested_tests (dict): maps the test name (step name) to the names of the subtest to run. i.e. for GTests these are built into a test filter string, and passed in the command line. E.g. {‘browser_tests’: [‘suite.test1’, ‘suite.test2’]} use_analyze (bool): Whether to trim the list of tests to perform based on which files are actually affected by the revision. test_repeat_count (int or None): Repeat count to pass to the test. Note that we don‘t call the test this many times, we call the test once but pass this repeat factor as a parameter, and it’s up to the test implementation to perform the repeats. Either 1 or None imply that no special flag for repeat will be passed. skip_tests (bool): If True, do not actually run the tests. Useful when we only want to isolate the targets for running elsewhere.

Returns: A Tuple of - Test result dictionary of the form: { ‘failed test name’: { ‘status’: TestResult status, ‘valid’: bool } } - dictionary of failed tests of the form: { ‘test name’: list of tests } - RawResult object with compile step status and failure message

def configure_and_sync(self, target_tester_id, revision, builders=None):

Applies compile/test configs & syncs code.

These are common tasks done in preparation ahead of building and testing chromium revisions, extracted as code share between the test and flake recipes.

Args: target_tester_id (BuilderId): The ID of the tester to derive the configuration from. revision (str): A string representing the commit hash of the revision to test. builders (BotDatabase): The database of builders. Returns: (bot_mirror, checked_out_revision, cached_revision)

def existing_targets(self, targets, builder_id):

Returns a sublist of the given targets that exist in the build graph.

We test whether a target exists or not by ninja.

A “target” here is actually a node in ninja's build graph. For example:

  1. An executable target like browser_tests
  2. An object file like obj/path/to/Source.o
  3. An action like build/linux:gio_loader
  4. An generated header file like gen/library_loaders/libgio.h
  5. and so on

Args: targets (list): A list of targets to be tested for existence. builder_id (BuilderId): The ID of the builder to run MB for.

def files_changed_by_revision(self, revision, solution_name=‘src’):

Returns the files changed by the given revision.

Args: revision (str): the git hash of a commit. solution_name (str): the gclient solution name, eg: “src” for chromium, “src/third_party/pdfium” for pdfium.

def get_bot_mirror_for_tester(self, tester_id, builders=None):

def record_previous_revision(self, bot_config):

Records the latest checked out and cached revisions.

Examines the checkout and records the latest available revision for the first gclient solution.

This also records the latest revision available in the local git cache.

Returns: A pair of revisions (checked_out_revision, cached_revision), or None, None if the checkout directory does not exist.

def revisions_between(self, start_revision, end_revision, solution_name=‘src’):

Returns the git commit hashes between the given range.

Args: start_revision (str): the git hash of a parent commit. end_revision (str): the git hash of a child commit. solution_name (str): the gclient solution name, eg: “src” for chromium, “src/third_party/pdfium” for pdfium.

Returns: A list of git commit hashes between start_revision (excluded) and end_revision (included), ordered from older commits to newer commits.

recipe_modules / gae_sdk

DEPS: recipe_engine/cipd, recipe_engine/platform

class GaeSdkApi(RecipeApi):

@property
def all_packages(self):

def fetch(self, plat, dst):

Fetch the AppEngine SDK for the specified platform.

Args: plat (str): platform string, one of the PLAT_ local variables. dst (path.Path): The destination directory to extract it.

@property
def latest_ref(self):

def package(self, plat, arch=None):

def package_spec(self, plat, arch):

@property
def platforms(self):

recipe_modules / gatekeeper

DEPS: puppet_service_account, depot_tools/gitiles, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

class Gatekeeper(RecipeApi):

Module for Gatekeeper NG.

recipe_modules / git_clone_bundler

DEPS: repo, depot_tools/git, depot_tools/gsutil, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/step

The ‘git_clone_bundler’ creates and uploads ‘clone.bundle’ packages to Google Storage for specified Git repositories.

class GitCloneBundlerApi(RecipeApi):

Provides methods to encapsulate repo operations.

@property
def base_path(self):

@property
def bundle_dir(self):

def create(self, git_path, gs_bucket, gs_subpath=None, name=None, unauthenticated_url=False):

Args: git_path: (Path) The path of the Git repository to bundle. gs_bucket: (str) The name of the Google Storage bucket. gs_subpath: (str) The path within the Google Storage bucket. name (str): If not None, the name of this bundle operation (to differentiate steps). unauthenticated_url: (bool) If True, request an unauthenticated URL from Google Storage.

Returns: (str) The Google Storage URL where the bundle was uploaded.

def create_repo(self, repo_manifest_url, gs_bucket, gs_subpath=None, remote_name=None, unauthenticated_url=False):

Traverses a ‘repo’ checkout and creates and uploads a Git bundle for each repository in the checkout.

Args: repo_manifest_url: (str) The URL of the manifest to check out. gs_bucket: (str) The name of the Google Storage bucket. gs_subpath: (str) The path within the Google Storage bucket. remote_name: (str) If not None, the name of the remote to query. This is used to build the returned repository-to-GS mapping. unauthenticated_url: (bool) If True, request an unauthenticated URL from Google Storage.

Returns: (dict) If ‘remote_name’ is supplied, a dictionary mapping the remote repository URL (key) to the Google Storage path (value) where that repository's bundle was uploaded.

recipe_modules / gn

DEPS: depot_tools/depot_tools, recipe_engine/context, recipe_engine/file, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step

class GnApi(RecipeApi):

def clean(self, build_dir, step_name=‘clean outdir’):

Cleans the output directory except for args.gn and needed ninja files.

See https://gn.googlesource.com/gn/+/master/docs/reference.md#cmd_clean for more documentation of the command. The build_dir must exist and contain files from previous gn run.

Args: build_dir: Path to build output directory. step_name: Optional recipe step name to give to the “gn clean” command.

def get_args(self, build_dir, location=None, max_text_lines=None, step_name=None):

Get the GN args for the build.

A step will be executed that fetches the args.gn file and adds the contents to the presentation for the step.

Args: build_dir: The Path to the build output directory. The args.gn file will be extracted from this location. The args.gn file must already exist (gn or mb should have already been run before calling this method). location: Controls where the GN args for the build should be presented. By default or if gn.DEFAULT, the args will be in step_text if the count of lines is less than max_text_lines or the logs otherwise. To force the presentation to the step_text or logs, use gn.TEXT or gn.LOGS, respectively. max_text_lines: The maximum number of lines of GN args to display in the step_text when using the default behavior for displaying GN args. step_name: The name of the step for reading the args.

Returns: The content of the args.gn file.

def ls(self, build_dir, inputs, output_type=None, output_format=‘label’, step_name=‘list gn targets’):

List targets for a given set of inputs.

See https://gn.googlesource.com/gn/+/master/docs/reference.md#ls for more documentation of the command.

Args: build_dir: Path to build output directory. inputs: List of patterns to find matching targets for. output_type: Type of target (eg: “executable”, “shared_library”, etc.) to restrict outputs to. If None (default), no filtering is preformed. output_format: How to display targets. See GN docs for valid options. Default is “label”. step_name: Optional recipe step name to give to the “gn ls” command. Returns: The set of targets found.

def parse_gn_args(self, content):

Parses string content from arg.gn to a dictionary.

Args: content: The string content of arg.gn file.

Returns: A dictionary of gn args.

def present_args(self, result, args, location=None, max_text_lines=None):

Present the GN args.

Args: result: The step result to present the GN args on. args: A string containing the args.gn content to present. location: Controls where the GN args for the build should be presented. By default or if gn.DEFAULT, the args will be in step_text if the count of lines is less than max_text_lines or the logs otherwise. To force the presentation to the step_text or logs, use gn.TEXT or gn.LOGS, respectively. max_text_lines: The maximum number of lines of GN args to display in the step_text when using the default behavior for displaying GN args.

def read_args(self, build_dir, step_name=None):

Read the GN args.

Args: build_dir: The Path to the build output directory. The args.gn file will be extracted from this location. The args.gn file must already exist (gn or mb should have already been run before calling this method).

Returns: A tuple containing the contents of the args.gn file as a single string and the step result of reading the file.

def reformat_args(self, args):

Reformat the GN args to be more useful for local repros.

Some of the arguments have values that are specific to individual runs and so a developer would likely not want to copy them to their own checkout when attempting to reproduce an issue locally. To enable ease of use, these arguments are moved to the end of the arguments so that a single contiguous region can be copied in order to create a build directory with the appropriate arguments.

Args: args: A string containing the args.gn content to reformat.

Returns: The reformatted args.gn content as a single string.

def refs(self, build_dir, inputs, all_deps=True, output_type=None, output_format=‘label’, step_name=‘calculate gn refs’, **kwargs):

Find reverse dependencies for a given set of inputs.

See https://gn.googlesource.com/gn/+/master/docs/reference.md#refs for more documentation of the command.

Args: build_dir: Path to build output directory. inputs: List of label or files to find dependencies of. all_deps: Boolean indicating wether or not to include indirect dependencies. output_type: Type of target (eg: “executable”, “shared_library”, etc.) to restrict outputs to. If None (default), no filtering is preformed. output_format: How to display targets. See GN docs for valid options. Default is “label”. step_name: Optional recipe step name to give to the “gn refs” command. kwargs: Other arguments passed to the underlying python step. Returns: The set of dependencies found.

recipe_modules / goma

DEPS: build, puppet_service_account, depot_tools/depot_tools, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step, recipe_engine/swarming, recipe_engine/time

class GomaApi(RecipeApi):

GomaApi contains helper functions for using goma.

For local running of goma recipe module, add the $build/goma[‘local’] property when running the recipe with the full path. e.g.

.../recipes.py run --properties-file - recipe_name <<EOF { ..., “$build/goma”: { “local”: “/path/to/workdir/goma/client” } } EOF

Note that the goma client directory must exist inside the recipe workdir. A symlink (on mac/linux) is enough, though.

def additional_goma_dir(self, platform):

Return the Goma client dir for the platform.

Args: platform: platform string to be used.

Returns: additional Goma client path.

@property
def bigquery_service_account_json_path(self):

def build_with_goma(self, ninja_command, name=None, ninja_log_outdir=None, ninja_log_compiler=None, goma_env=None, ninja_env=None, **kwargs):

Build with ninja_command using goma

Args: ninja_command: Command used for build. This is sent as part of log. (e.g. [‘ninja’, ‘-C’, ‘out/Release’]) name: Name of compile step. ninja_log_outdir: Directory of ninja log. (e.g. “out/Release”) ninja_log_compiler: Compiler used in ninja. (e.g. “clang”) goma_env: Environment controlling goma behavior. ninja_env: Environment for ninja.

Returns: TODO(tikuta): return step_result

Raises: StepFailure or InfraFailure if it fails to build or occurs something failure on goma steps.

@property
def cloudtail_exe(self):

@property
def cloudtail_pid_file(self):

@property
def cloudtail_service_account_json_path(self):

def configure_enable_ats(self):

Sets enable_ats flag based on server_host and rpc_extra_params flags.

Some builders run on a mix of Linux/Mac/Win. They need to call this function to set the ATS flag on a per-build basis.

@property
def counterz_path(self):

@property
def debug(self):

Returns true if debug mode is turned on.

Uses value from property “$build/goma:{“debug”:true}” if configured (typically in cr-buildbucket.cfg). Defaults to False.

@property
def default_cache_path(self):

@property
def default_cache_path_per_slave(self):

@property
def default_client_path(self):

def ensure_goma(self, client_type=None, additional_platforms=None, ephemeral=False):

ensure goma is installed.

Args: client_type: client type to be installed. default is release. additional_platforms: additional platforms to be installed. path for the additional platforms can be got with additional_goma_dir method. ephemeral: Goma client is stored to ad-hoc place to be removed after the recipe run. This is for mitigating crbug.com/997733 to avoid sharing Goma client among builders.

@property
def goma_ctl(self):

@property
def goma_dir(self):

def initialize(self):

@property
def jobs(self):

Returns number of jobs for parallel build using Goma.

Uses value from property “$build/goma:{“jobs”: JOBS}” if configured (typically in cr-buildbucket.cfg), else defaults to recommended_goma_jobs.

@property
def json_path(self):

@property
def jsonstatus(self):

@property
def recommended_goma_jobs(self):

Return the recommended number of jobs for parallel build using Goma.

Prefer to use just goma.jobs and configure it through default builder properties in cr-buildbucket.cfg.

This function caches the _recommended_jobs.

@property
def service_account_json_path(self):

def start(self, env=None, **kwargs):

Start goma compiler_proxy.

A user MUST execute ensure_goma beforehand. It is user's responsibility to handle failure of starting compiler_proxy.

def stop(self, build_exit_status, ninja_log_outdir=None, ninja_log_compiler=None, ninja_log_command=None, build_step_name='', **kwargs):

Stop goma compiler_proxy.

A user is expected to execute start beforehand. It is user's responsibility to handle failure of stopping compiler_proxy.

Args: build_exit_status: Exit status of ninja or other build commands like make. (e.g. 0) ninja_log_outdir: Directory of ninja log. (e.g. “out/Release”) ninja_log_compiler: Compiler used in ninja. (e.g. “clang”) ninja_log_command: Command used for build. (e.g. [‘ninja’, ‘-C’, ‘out/Release’])

Raises: StepFailure if it fails to stop goma or upload logs.

recipe_modules / goma_server

DEPS: depot_tools/git, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/runtime, recipe_engine/step

class GomaServerApi(RecipeApi):

GomaServerApi contains helper functions for building goma server.

def BuildAndTest(self, repository, package_base, allow_diff=True):

Build goma server and run test.

Args: repository: Goma server repository URL in str. package_base: package base name of goma server in str.

Returns: GOPATH that has build artifacts.

recipe_modules / halt

DEPS: recipe_engine/python

class HaltApi(RecipeApi):

def __call__(self, reason=‘Unknown’, **kwargs):

Return a failing step with the given message.

recipe_modules / ios

DEPS: builder_group, chromium, chromium_checkout, chromium_swarming, chromium_tests, filter, goma, isolate, perf_dashboard, swarming_client, test_results, test_utils, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step, recipe_engine/time

class iOSApi(RecipeApi):

def bootstrap_swarming(self):

Bootstraps Swarming.

@property
def bucket(self):

def build(self, analyze=False, mb_path=None, suffix=None, use_mb=True):

Builds from this bot's build config.

Args: analyze: Whether to use the gyp_chromium analyzer to only build affected targets and filter out unaffected tests. mb_path: Custom path to MB. Uses the default if unspecified. suffix: Suffix to use at the end of step names. use_mb: Whether or not to use mb to generate build files.

@property
def builder_id(self):

def checkout(self, gclient_apply_config=None, **kwargs):

Checks out Chromium.

def collect(self, triggered_tests):

@property
def configuration(self):

def ensure_xcode(self, xcode_build_version):

def generate_test_from_task(self, task, upload_test_results=True, result_callback=None):

Generates a Test subclass that can run tests and parse/store results.

Returns: None if no tests should be run, otherwise an instance of SwarmingIosTest.

def get_mac_toolchain_cmd(self):

@staticmethod
def get_step_name(test):

def isolate(self, scripts_dir=‘src/ios/build/bots/scripts’):

Isolates the tests specified in this bot's build config.

def isolate_earlgrey_test(self, test, swarming_tasks, tmp_dir, isolate_template, bot=None):

Isolate earlgrey test into small shards

def isolate_test(self, test, tmp_dir, isolate_template, test_cases=None, shard_num=None):

Isolates a single test.

@property
def most_recent_app_dir(self):

Returns the path (relative to checkout working dir) of the most recently compiled apps.

@property
def most_recent_app_path(self):

Returns the Path to the directory of the most recently compiled apps.

@property
def most_recent_iossim(self):

Returns the path to the most recently compiled iossim.

def parse_tests(self, tests, include_dir, start_index=0):

Parses the tests dict, reading necessary includes.

Args: tests: A list of test dicts.

@property
def platform(self):

def read_build_config(self, builder_group=None, master_name=None, build_config_base_dir=None, buildername=None):

Reads the iOS build config for this bot.

Args: builder_group: Name of a builder group to read the build config from, or None to read from properties at run-time. master_name: deprecated, use builder_group instead build_config_base_dir: Directory to search for build config group and test include directories.

@swarming_service_account.setter
def swarming_service_account(self, val):

def symupload(self, artifact, url):

Uploads the given symbols file.

Args: artifact: Name of the artifact to upload. Will be found relative to the out directory, so must have already been compiled. url: URL of the symbol server to upload to.

def test_swarming(self, scripts_dir=‘src/ios/build/bots/scripts’, upload_test_results=True, retry_failed_shards=False):

Runs tests on Swarming as instructed by this bot's build config.

def upload(self, base_path=None, revision=None):

Uploads built artifacts as instructed by this bot's build config.

def upload_tgz(self, artifact, bucket, path):

Tar gzips and uploads the given artifact to Google Storage.

Args: artifact: Name of the artifact to upload. Will be found relative to the out directory, so must have already been compiled. bucket: Name of the Google Storage bucket to upload to. path: Path to upload the artifact to relative to the bucket.

@property
def use_goma(self):

@property
def xcode_build_version(self):

recipe_modules / isolate

DEPS: chromium, swarming_client, depot_tools/depot_tools, depot_tools/git, depot_tools/gsutil, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step

class IsolateApi(RecipeApi):

APIs for interacting with isolates.

def archive_differences(self, first_dir, second_dir, values):

Archive different files of 2 builds.

def check_swarm_hashes(self, targets):

Asserts that all the targets in the passed list are present as keys in the ‘swarm_hashes’ property.

This is just an optional early check that all the isolated targets that are needed throughout the build are present. Without this step, the build would just fail later, on a ‘trigger’ step. But the main usefulness of this is that it automatically populates the ‘swarm_hashes’ property in testing context, so that it doesn't need to be manually specified through test_api.

def clean_isolated_files(self, build_dir):

Cleans out all *.isolated files from the build directory in preparation for the compile. Needed in order to ensure isolates are rebuilt properly because their dependencies are currently not completely described to gyp.

def compare_build_artifacts(self, first_dir, second_dir):

Compare the artifacts from 2 builds.

def compose(self, isolate_hashes, step_name=None, **kwargs):

Creates and uploads a new isolate composing multiple existing isolates.

In case of a conflict, where a given file is present in multiple isolates, the version of the file from an earlier isolate (as ordered in the isolate_hashes argument) is checked out on the bot.

Args: isolate_hashes: List of hashes of existing uploaded isolates.

Returns: Hash of the uploaded composite isolate.

def find_isolated_tests(self, build_dir, targets=None, **kwargs):

Returns a step which finds all *.isolated files in a build directory.

Useful only with ‘archive’ isolation mode. In ‘prepare’ mode use ‘isolate_tests’ instead.

Assigns the dict {target name -> *.isolated file hash} to the swarm_hashes build property. This implies this step can currently only be run once per recipe.

If |targets| is None, the step will use all *.isolated files it finds. Otherwise, it will verify that all |targets| are found and will use only them. If some expected targets are missing, will abort the build.

@isolate_server.setter
def isolate_server(self, value):

Changes URL of Isolate server to use.

def isolate_tests(self, build_dir, targets=None, verbose=False, swarm_hashes_property_name=‘swarm_hashes’, step_name=None, suffix='', **kwargs):

Archives prepared tests in |build_dir| to isolate server.

src/tools/mb/mb.py is invoked to produce *.isolated.gen.json files that describe how to archive tests.

This step then uses *.isolated.gen.json files to actually performs the archival. By archiving all tests at once it is able to reduce the total amount of work. Tests share many common files, and such files are processed only once.

Args: targets: List of targets to use instead of finding .isolated.gen.json files. verbose (bool): Isolate command should be verbose in output. swarm_hashes_property_name (str): If set, assigns the dict {target name -> *.isolated file hash} to the named build property. If this needs to be run more than once per recipe run, make sure to pass different propery names for each invocation. suffix: suffix of isolate_tests step. e.g. ' (with patch)‘, ' (without patch)’.

@property
def isolated_tests(self):

The dictionary of ‘target name -> isolated hash’ for this run.

These come either from the incoming swarm_hashes build property, or from calling find_isolated_tests, above, at some point during the run.

def run_isolated(self, name, isolate_hash, args=None, **kwargs):

Runs an isolated test.

@service_account_json.setter
def service_account_json(self, value):

Service account json to use.

recipe_modules / libyuv

DEPS: archive, builder_group, chromium, chromium_android, chromium_checkout, depot_tools/bot_update, depot_tools/gclient, depot_tools/osx_sdk, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/scheduler, recipe_engine/step

class LibyuvApi(RecipeApi):

def apply_bot_config(self, builders, recipe_configs):

def checkout(self):

@contextlib.contextmanager
def ensure_sdk(self):

def extract_build(self):

def maybe_trigger(self):

def package_build(self):

def runtests(self):

Add a suite of test steps.

@property
def should_build(self):

@property
def should_download_build(self):

@property
def should_test(self):

@property
def should_upload_build(self):

recipe_modules / math_utils

General statistical or mathematical functions.

class MathUtilsApi(RecipeApi):

@staticmethod
def confidence_score(sample1, sample2, accept_single_bad_or_good=False):

Calculates a confidence score.

This score is a percentage which represents our degree of confidence in the proposition that the good results and bad results are distinct groups, and their differences aren't due to chance alone.

Args: sample1: A flat list of “good” result numbers. sample2: A flat list of “bad” result numbers. accept_single_bad_or_good: If True, computes confidence even if there is just one bad or good revision, otherwise single good or bad revision always returns 0.0 confidence. This flag will probably get away when we will implement expanding the bisect range by one more revision for such case.

Returns: A number in the range [0, 100].

@staticmethod
def mean(values):

Calculates the arithmetic mean of a list of values.

@staticmethod
def pooled_standard_error(work_sets):

Calculates the pooled sample standard error for a set of samples.

Args: work_sets: A collection of collections of numbers.

Returns: Pooled sample standard error.

@staticmethod
def relative_change(before, after):

Returns the relative change of before and after, relative to before.

There are several different ways to define relative difference between two numbers; sometimes it is defined as relative to the smaller number, or to the mean of the two numbers. This version returns the difference relative to the first of the two numbers.

Args: before: A number representing an earlier value. after: Another number, representing a later value.

Returns: A non-negative floating point number; 0.1 represents a 10% change.

@staticmethod
def standard_deviation(values):

Calculates the sample standard deviation of the given list of values.

@staticmethod
def standard_error(values):

Calculates the standard error of a list of values.

@staticmethod
def variance(values):

Calculates the sample variance.

@staticmethod
def welchs_t_test(sample1, sample2):

Performs Welch's t-test on the two samples.

Welch‘s t-test is an adaptation of Student’s t-test which is used when the two samples may have unequal variances. It is also an independent two-sample t-test.

Args: sample1: A collection of numbers. sample2: Another collection of numbers.

Returns: A 3-tuple (t-statistic, degrees of freedom, p-value).

recipe_modules / ndk

DEPS: chromite

class NdkApi(RecipeApi):

recipe_modules / perf_dashboard

DEPS: depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/service_account, recipe_engine/step

class PerfDashboardApi(RecipeApi):

Provides steps to take a list of perf points and post them to the Chromium Perf Dashboard. Can also use the test url for testing purposes.

def add_dashboard_link(self, presentation, test, revision, bot=None):

Adds a results-dashboard link to the step presentation.

Must be called from a follow-up function of the step, to which the link should be added. For a working link, the parameters test, revision and bot must match to the parameters used to upload points to the dashboard.

Args: presentation: A step presentation object. Can be obtained by step_result.presentation from a followup_fn of a step. test: Slash-separated test path. revision: The build revision, e.g. got_revision from the update step. bot: The bot name used for the data on the perf dashboard.

def add_point(self, data, halt_on_failure=False, name=None, **kwargs):

def get_change_info(self, commits):

def get_skeleton_point(self, test, revision, value, bot=None):

def halt(self, step_result, reason):

def post(self, name, url, data, halt_on_failure, step_test_data=None, **kwargs):

Send a POST request to a URL with a payload.

Args: name: The name of the step. url: The URL to post to. data: A dict of parameters to send in the body of the request. halt_on_failure: If True, the step turns purple on failure. Otherwise, it turns orange. step_test_data: Opional recipe simulation data. Defaults to a successful request.

def set_default_config(self):

def upload_isolate(self, builder_name, change, isolate_server, isolate_map, halt_on_failure=False, **kwargs):

def warning(self, step_result, reason):

recipe_modules / pgo

DEPS: chromium, code_coverage, profiles, depot_tools/git, depot_tools/gitiles, depot_tools/gsutil, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

class PgoApi(RecipeApi):

@property
def branch(self):

Parse the branch name from ref.

def ensure_profdata_files(self, tests):

Ensure there is a profdata file generated for each test.

Each test run should have a subfolder path in profiles.profile_subdirs with a profdata file. Fails the current run if the number of tests don't match the number of profdata files in the subdir

Args: tests: list of step.Test objects.

def process_pgo_data(self, tests):

Processes the pgo profraw files generated by benchmark tests.

The implementation is similar to self.m.code_coverage.process_coverage_data, but leaves out the cruft and focuses only on merging and uploading.

Args: tests: (list) of step.Test objects

@property
def using_pgo(self):

Indicates this run uses PGO, set in bot's *.star configuration files.

Used by chromium_tests.run_tests() to process profile data when True.

recipe_modules / profiles

DEPS: chromium_checkout, depot_tools/gsutil, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/python

class ProfilesApi(RecipeApi):

def find_merge_errors(self):

Search for any profiles that failed to merge

def llvm_exec_path(self, name):

@property
def llvm_profdata_exec(self):

def merge_profdata(self, output_artifact, profdata_filename_pattern=None, sparse=False):

Helper function to invoke ‘merge_steps.py’.

Args: output_artifact (str): filename of the output, ending in .profdata. profdata_filename_pattern (str): (optional) regex pattern to pass to ‘merge_steps.py’ when searching for .profdata files. sparse (bool): (optional) flag to invoke the merge script with sparse. Defaults to False.

@property
def merge_results_script(self):

@property
def merge_scripts_dir(self):

@property
def merge_steps_script(self):

@staticmethod
def normalize(key):

Normalizes the input to be suitable for filename/path.

Converts to lowercase, removes non-alpha characters, and converts spaces to underscores. Adapted from: https://stackoverflow.com/questions/295135/turn-a-string-into-a-valid-filename

Args: key (str): the input to normalize.

Returns: a normalized string

def profile_dir(self, identifier=None):

Ensures a directory exists for writing the merged profdata files.

Args: identifier (str): (optional) a key to identify a profile dir. Usually the name of a step for a target, such that the target's profdata are all stored there. Defaults to None, which will store profdata files in the parent directory.

Returns: Path object to the dir

@property
def profile_subdirs(self):

def upload(self, bucket, path, local_artifact, args=None, link_name=None):

Invokes gsutil recipe module to upload.

Args: bucket (str): name of the gs bucket to upload to. path (str): gs bucket path to upload to. local_artifact (str): path to the local artifact to upload args (list): list of string arguments to pass to gsutil

Example: gsutil cp {local_artifact} {args} gs://{bucket}/{path}

Reference: https://cloud.google.com/storage/docs/quickstart-gsutil

recipe_modules / puppet_service_account

DEPS: recipe_engine/path, recipe_engine/platform, recipe_engine/service_account, recipe_engine/version

[DEPRECATED] API for generating OAuth2 access tokens from service account keys predeployed to Chrome Ops bots via Puppet.

Depends on ‘luci-auth’ being in PATH.

This module exists only to support Buildbot code. On LUCI use default account exposed through ‘recipe_engine/service_account’ module.

class PuppetServiceAccountApi(RecipeApi):

def get(self, account):

Returns a recipe_module.service_account.ServiceAccount for the account.

Assumes a service account key for the given account is available at self.keys_path.

Args: account: a name of the service account, as defined in Puppet config. Returns A recipe_module.service_account.ServiceAccount instance.

def get_access_token(self, account, scopes=None):

Returns an access token for a service account.

Token's lifetime is guaranteed to be at least 3 minutes and at most 45.

Args: account: a name of the service account, as defined in Puppet config. scopes: list of OAuth scopes for new token, default is [userinfo.email].

def get_key_path(self, account):

Path to a particular JSON key (as str).

@property
def keys_path(self):

Path to a directory where ChromeOps Puppet drops service account keys.

recipe_modules / repo

DEPS: depot_tools/depot_tools, recipe_engine/path, recipe_engine/raw_io, recipe_engine/step

Common steps for recipes that use repo for source control.

class RepoApi(RecipeApi):

Provides methods to encapsulate repo operations.

def __call__(self, args, name=None, **kwargs):

Executes ‘repo’ with the supplied arguments.

Args: args: (list): A list of arguments to supply to ‘repo’. name (str): The name of the step. If None, generate a name from the args. kwargs: Keyword arguments to pass to the ‘step’ call. Returns: See ‘step.call’.

def clean(self, *args, **kwargs):

Clean an already-init'd repo.

def init(self, url, *args, **kwargs):

Perform a ‘repo init’ step with the given manifest url.

def list(self, **kwargs):

Return (list): A list of (path, name) project tuples. path (str): The relative path to the project's checkout. name (str): The name of the project in the manifst.

def manifest(self, **kwargs):

Generate a manifest containing current revisions.

@property
def repo_path(self):

def reset(self, **kwargs):

Reset to HEAD an already-init'd repo.

def sync(self, *args, **kwargs):

Sync an already-init'd repo.

recipe_modules / swarming_client

DEPS: depot_tools/git, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step, recipe_engine/swarming

class SwarmingClientApi(RecipeApi):

Code that both isolate and swarming recipe modules depend on.

Both swarming and isolate scripts live in a single repository called ‘swarming client’. This module include common functionality like finding existing swarming client checkout, fetching a new one, getting version of a swarming script, etc.

def checkout(self, revision=None, curl_trace_file=None, can_fail_build=True):

Returns a step to checkout swarming client into a separate directory.

Ordinarily swarming client is checked out via Chromium DEPS into src/tools/swarming_client. This step configures recipe module to use a separate checkout.

If |revision| is None, this requires the build property ‘parent_got_swarming_client_revision’ to be present, and raises an exception otherwise. Fail-fast behavior is used because if machines silently fell back to checking out the entire workspace, that would cause dramatic increases in cycle time if a misconfiguration were made and it were no longer possible for the bot to check out swarming_client separately.

def ensure_script_version(self, script, min_version, step_test_data=None):

Yields steps to ensure a script version is not older than |min_version|.

Will abort recipe execution if it is.

def get_script_version(self, script):

Returns a version of some swarming script as a tuple (Major, Minor, Rev).

It should have been queried by ‘query_script_version’ step before. Raises AssertionError if it wasn't.

@property
def path(self):

Returns path to a swarming client checkout.

It's subdirectory of Chromium src/ checkout or a separate directory if ‘checkout_swarming_client’ step was used.

def query_script_version(self, script, step_test_data=None):

Yields a step to query a swarming script for its version.

Version tuple is later accessible via ‘get_script_version’ method. If |step_test_data| is given, it is a tuple with version to use in expectation tests by default.

Does nothing if script's version is already known.

recipe_modules / symupload

DEPS: recipe_engine/path, recipe_engine/properties, recipe_engine/step

class SymuploadApi(RecipeApi):

Chromium specific module for symuploads.

def __call__(self, build_dir):

Args: build_dir: The absolute path to the build output directory, e.g. [slave-build]/src/out/Release

def symupload(self, binary, artifact, url):

Uploads the given symbols file.

Args: artifact: Name of the artifact to upload. Will be found relative to the out directory, so must have already been compiled. url: URL of the symbol server to upload to.

recipe_modules / tar

DEPS: recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/python

class TarApi(RecipeApi):

Provides steps to tar and untar files.

def directory(self, step_name, directory, output):

Step to compress a single directory.

Args: step_name: display name of the step. directory: path to a directory to compress, it would become the root of an archive, i.e. |directory|/file.txt would be named ‘file.txt’ in the archive. output: path to a tar file to create.

def make_package(self, root, output, compression=None):

Returns TarPackage object that can be used to compress a set of files.

Usage: pkg = api.tar.make_package(root, output, ‘bz2’) pkg.add_file(root.join(‘file’)) pkg.add_directory(root.join(‘directory’)) yield pkg.tar(‘taring step’)

Args: root: a directory that would become root of a package, all files added to an archive will have archive paths relative to this directory. output: path to a tar file to create.

Returns: TarPackage object.

def untar(self, step_name, tar_file, output, quiet=False):

Step to uncompress |tar_file| into |output| directory.

Tar package will be unpacked to |output| so that root of an archive is in |output|, i.e. archive.tar/file.txt will become |output|/file.txt.

Step will FAIL if |output| already exists.

Args: step_name: display name of a step. tar_file: path to a tar file to uncompress, should exist. output: path to a directory to unpack to, it should NOT exist. quiet (bool): If True, print terse output instead of the name of each untared file.

recipe_modules / test_results

DEPS: builder_group, recipe_engine/buildbucket, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

class TestResultsApi(RecipeApi):

Recipe module to upload gtest json results to test-results server.

def initialize(self):

Set the default config.

def upload(self, results_file, test_type, chrome_revision, test_results_server=None, downgrade_error_to_warning=True, builder_name_suffix=''):

Upload results json to test-results.

Args: results_file: Path to file containing result json. Supported format are: ttest format & full json results format ( http://www.chromium.org/developers/the-json-test-results-format). test_type: Test type string, e.g. blink_web_tests. test_results_server: Server where results should be uploaded. downgrade_error_to_warning: If True, treat a failure to upload as a warning. builder_name_suffix: Optional suffix to append to the builder name.

Returns: The step result.

recipe_modules / test_utils

DEPS: build, chromium, traceback, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/resultdb, recipe_engine/step

class TestUtilsApi(RecipeApi):

This class helps run tests and parse results.

Tests are run in [up to] three stages:

  • ‘with patch’
  • ‘retry shards with patch’
  • ‘without patch’

The first stage applies the patch and runs the tests. If this passes, we're finished. Assuming that tests fail or return invalid results, then we deapply the patch and try running the tests again. If the failures are the same, then this is an issue with tip of tree and we ignore the failures.

Finally, we roll the checkout and reapply the patch, and then rerun the failing tests. This helps confirm whether the failures were flakes or deterministic errors.

@property
def canonical(self):

def create_results_from_json(self, data):

@staticmethod
def format_step_text(data):

Returns string suitable for use in a followup function‘s step result’s presentation step text.

Args: data - iterable of sections, where each section is one of: a) tuple/list with one element for a single-line section (always displayed) b) tuple/list with two elements where first one is the header, and the second one is an iterable of content lines; if there are no contents, the whole section is not displayed

@returns_placeholder
def gtest_results(self, add_json_log=True):

A placeholder which will expand to ‘--test-launcher-summary-output=/tmp/file’.

Provides the --test-launcher-summary-output flag since --flag=value (i.e. a single token in the command line) is the required format.

The test_results will be an instance of the GTestResults class.

def limit_failures(self, failures, limit=None):

Limit failures of a step to prevent large results JSON.

Args: failures - An iterable containing the failures that resulted from some step. limit - The maxmium number of failures to display in the results. Returns: A tuple containing 2 elements: 1. The list of the subset of at most limit elements of failures, suitable for iterating over and indexing into structures that are indexed by the failure names. 2. The list of failures suitable for including in the step's text. If failures contains more elements than limit, it will contain an element indicating the number of additional failures.

def present_gtest_failures(self, step_result, presentation=None):

Update a step result's presentation with details of gtest failures.

If the provided step result contains valid gtest results, then the presentation will be updated to include information about the failing tests, including logs for the individual failures.

The max_reported_failures property modifies this behavior by limiting the number of tests that will appear in the step text and have their logs included. If the limit is exceeded the step text will indicate the number of additional failures.

Args: step_result - The step result that potentially contains gtest results. presentation - The presentation to update. If not provided or None, the presentation of step_result will be updated. Returns: The gtest_results object if it is present in the step result, otherwise None.

def run_tests(self, caller_api, test_suites, suffix, sort_by_shard=False, retry_failed_shards=False, retry_invalid_shards=False):

Runs a list of test suites and returns the failed ones.

If retry_[failed|invalid]_shards is true, this method retries shards that have deterministic failures or invalid results. Additionally, if the |_should_exonerate_flaky_failures| property is true, this method skips retrying deterministic failures that are already known to be flaky on ToT.

Args: caller_api - caller‘s recipe API; this is needed because self.m here is different than in the caller (different recipe modules get injected depending on caller’s DEPS vs. this module‘s DEPS) This must include the ‘swarming’ recipe module, in order to use the grouping logic in this method. Unfortunately we can’t import this module in the test_utils module, as it would cause a circular dependency. test_suites - iterable of objects implementing the steps.Test interface. suffix - custom suffix, e.g. “with patch”, “without patch” indicating context of the test run sort_by_shard - sort the order of triggering depends on the number of shards. retry_failed_shards: If true, attempts to retry failed shards of swarming tests, typically used with retry_invalid_shards. retry_invalid_shards: If true, attempts to retry shards of swarming tests without valid results. Returns: A tuple of (list of test suites with invalid results, list of test suites which failed including invalid results)

def run_tests_with_patch(self, caller_api, test_suites, retry_failed_shards=False):

Runs tests and returns failures.

Args: caller_api: The api object given by the caller of this module. test_suites - iterable of objects implementing the steps.Test interface. retry_failed_shards: If true, attempts to retry failed shards of swarming tests.

Returns: A tuple (invalid_test_suites, all_failing_test_suites). invalid_test_suites: Test suites that do not have valid test results. all_failing_test_suites: This includes test suites than ran but have failing tests, test suites that do not have valid test results, and test suites that failed with otherwise unspecified reasons. This is a superset of invalid_test_suites.

def summarize_failing_test_with_no_retries(self, caller_api, test_suite):

Summarizes a failing test suite that is not going to be retried.

def summarize_findit_flakiness(self, caller_api, test_suites):

Exports a summary of flakiness for post-processing by FindIt.

There are several types of test flakiness. FindIt categories these by the layer at which the flakiness is discovered. One of these categories is for a test that fails, but when retried in a separate step, succeeds. This currently applies to ‘retry shards with patch’. These are labeled ‘Step Layer Flakiness’.

‘Step Layer Flakiness’ doesn‘t include failures that are already known to be flaky on tip of tree, but FindIt still would like to know them, so they’re exposed and labeled separately as ‘Step Layer Skipped Known Flakiness’.

FindIt also wants to know about ‘with patch’ tests that caused the build to fail. If a future build with the same CL succeeds, then the tests are potential flakes. Although it's also possible that rolling tip of tree caused the results to change. These are labeled ‘Failing With Patch Tests That Caused Build Failure’.

This function emits a step with a fixed name, and metadata for FindIt. Before making changes to this function, check with the FindIt team to ensure that their post-processing will still work correctly.

def summarize_test_with_patch_deapplied(self, caller_api, test_suite):

Summarizes test results after a CL has been retried with patch deapplied.

Args: If there are no new failures, this method will emit a passing step. If there are new failures, this method will emit a step whose presentation status is ‘FAILURE’.

Returns: A Boolean describing whether the retry succeeded. Which is to say, all tests that failed in the original run also failed in the retry, which suggests that the error is due to an issue with top of tree, and should not cause the CL to fail.

@returns_placeholder
def test_results(self, add_json_log=True):

A placeholder which will expand to ‘/tmp/file’.

The recipe must provide the expected --json-test-results flag.

The test_results will be an instance of the TestResults class.

recipe_modules / traceback

DEPS: recipe_engine/path, recipe_engine/step

class TracebackApi(RecipeApi):

def format_exc(self):

Returns a string containing an exception traceback.

Calls traceback.format_exc but during testing removes absolute paths.

recipe_modules / tricium_clang_tidy

DEPS: chromium, goma, depot_tools/depot_tools, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/python, recipe_engine/step, recipe_engine/tricium

Recipe module to encapsulate the logic of calling clang-tidy on a list of affected files, gather warnings, and post via Tricium.

class TriciumClangTidyApi(RecipeApi):

def lint_source_files(self, output_dir, file_paths):

Runs clang-tidy on provided source files in file_paths, then writes warnings to Tricium.

file_paths is an interable of Path, only files that exist and have C/C++ extensions will be linted.

recipe_modules / ts_mon

DEPS: recipe_engine/cipd, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/python, recipe_engine/raw_io

class TSMonApi(RecipeApi):

def send_value(self, name, metric_type, value, fields=None, service_name=‘luci’, job_name=‘recipe’, step_name=‘upload ts_mon metrics’):

Sends a value to the ts_mon monitoring service.

Based on the ts_mon monitoring pipeline and script for sending data to it: https://cs.chromium.org/chromium/infra/infra/tools/send_ts_mon_values/. Internal users can read more about ts_mon at go/brown-bag-timeseries-basics. External users can read the following doc to understand various metric types: https://cs.chromium.org/chromium/infra/packages/infra_libs/infra_libs/ts_mon/common/metrics.py?l=90-95&rcl=6b6087ba98d50b15e2ece42da503b0b3596005b9.

Note that the candinality of all possible combinations of different values passed to fields should be less than 5000, i.e. do not use unique identifiers or timestamps and instead use values from a known small set.

Additionally, the reported values for each unique combination of field values get downsampled by ts_mon according to the following rules:

  • no downsampling for 12 hrs
  • keep at most 1 data point for each min for the next 1 week
  • keep at most 1 data point for 5 mins interval for the next 12 weeks
  • Keep at most 1 data point for 30 mins interval for the next 52 weeks

Therefore, please keep in mind that for metrics reported with high frequency (which can also be caused by having them reported at low frequency, but from large number of bots), the graphs may change as a result of downsampling and thus users may see different values in the past than what was reported originally and what was used to generate alerts.

Arguments: name: Name of the metric, which is automatically prefixed with /chrome/infra, i.e. /foo/bar will become /chrome/infra/foo/bar. metric_type: Type of the metric: ‘gauge’, ‘float’, ‘string’, ‘bool’, ‘counter’ or ‘cumulative’. See documentation linked above to understand which type of metric you need. value: The value to be reported. fields: Dictionary with fields to be associated with the value. service_name: Name of the service being monitored. job_name: Name of this job instance of the task. step_name: Name of the step sending information to ts_mon.

def send_values_batch(self, name, metric_type, value_fields, service_name=‘luci’, job_name=‘recipe’, step_name=‘upload ts_mon metrics’):

Sends multiple values to the ts_mon monitoring service in batch mode.

This method allows to send multiple values to the same metric in a batch. See doc for the send_value method above for various caveats.

Arguments: name: Name of the metric, which is automatically prefixed with /chrome/infra, i.e. /foo/bar will become /chrome/infra/foo/bar. metric_type: Type of the metric: ‘gauge’, ‘float’, ‘string’, ‘bool’, ‘counter’ or ‘cumulative’. See documentation for send_value method to understand which type of metric you need. value_fields: List of tuples (value, fields), where each tuple represents a separate value to be sent with its own set of fields. service_name: Name of the service being monitored. job_name: Name of this job instance of the task. step_name: Name of the step sending information to ts_mon.

recipe_modules / v8

DEPS: archive, build, builder_group, chromium, chromium_swarming, docker, gn, isolate, perf_dashboard, test_utils, depot_tools/bot_update, depot_tools/gclient, depot_tools/git, depot_tools/gitiles, depot_tools/gsutil, depot_tools/osx_sdk, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/context, recipe_engine/cq, recipe_engine/file, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/scheduler, recipe_engine/step, recipe_engine/swarming, recipe_engine/time, recipe_engine/url

class V8Api(RecipeApi):

def apply_bot_config(self, bot_config):

Entry method for using the v8 api.

def bot_config_by_buildername(self, builders=None, use_goma=True):

@property
def bot_type(self):

@property
def build_output_dir(self):

Absolute path to the build product based on the ‘checkout’ path.

def buildbucket_trigger(self, requests, project=None, bucket=None, step_name=‘trigger’):

Triggers builds via buildbucket.

Args: requests: List of 2-tuples (builder_name, properties). project: Project to trigger builds in (defaults to same as parent). bucket: Bucket to trigger builds in (defaults to same as parent). step_name: Name of the triggering step that appear on the build.

Returns: List of api.buildbucket.build_pb2.Build messages.

@property
def builderset(self):

Returns a list of names of this builder and all its triggered testers.

def calc_missing_values_in_sequence(self, sequence, subsequence, value):

Calculate a list of missing values from a subsequence.

Args: sequence: The complete sequence including all values. subsequence: A subsequence from the sequence above. value: An element from subsequence. Returns: A subsequence from sequence [a..b], where b is the value and for all x in a..b-1 holds x not in subsequence. Also a-1 is either in subsequence or value was the first element in subsequence.

def calculate_patch_base_gerrit(self):

Calculates the commit hash a gerrit patch was branched off.

def checkout(self, revision=None, **kwargs):

def collect_post_compile_metrics(self):

def compile(self, test_spec=v8_builders.EmptyTestSpec, mb_config_path=None, out_dir=None, **kwargs):

Compile all desired targets and isolate tests.

Args: test_spec: Optional TestSpec object as returned by read_test_spec(). Expected to contain only specifications for the current builder and all triggered builders. All corrensponding extra targets will also be isolated. mb_config_path: Path to the MB config file. Defaults to infra/mb/mb_config.py in the checkout. out_dir: Name of the build output directory, e.g. ‘out-ref’. Defaults to ‘out’. Note that it is not a path, but just the name of the directory.

Returns: if there is a compile failure: RawResult object with compile step status and failure message else: None

def create_coverage_context(self):

def create_test(self, test):

Wrapper that allows to shortcut common tests with their names.

Returns: A runnable test instance.

def create_tests(self):

def dedupe_tests(self, high_prec_tests, low_prec_tests):

Dedupe tests with lower precedence.

@property
def depot_tools_path(self):

Returns path to depot_tools pinned in the V8 checkout.

def download_isolated_json(self, revision):

@contextlib.contextmanager
def ensure_osx_sdk_if_needed(self):

Ensures the sdk is installed for wrapped steps when building for ios.

When building for mac we use the src-side hermetic toolchain.

@property
def extra_flags(self):

def extra_tests_from_properties(self):

Returns runnable testing.BaseTest objects for each extra test specified by parent_test_spec property.

def extra_tests_from_test_spec(self, test_spec):

Returns runnable testing.BaseTest objects for each extra test specified in the test spec of the current builder.

@staticmethod
def format_duration(duration_in_seconds):

@property
def generate_gcov_coverage(self):

@property
def generate_sanitizer_coverage(self):

def get_available_range(self, bisect_range):

def get_change_range(self):

def get_test_roots(self):

Returns the list of default and extensible test root directories.

A test root is a directory with the following layout: /infra/testing/config.pyl (optional) /infra/testing/builders.pyl /test/ (optional)

By default, the V8 checkout is a test root, and all matching directories under v8/custom_deps.

Returns: List of paths to test roots.

def init_gcov_coverage(self):

Delete all gcov counter files.

@property
def is_pure_swarming_tester(self):

def isolate_targets_from_tests(self, tests):

Returns the isolated targets associated with a list of tests.

Args: tests: A list of test names used as keys in the V8 API's test config.

def isolate_tests(self, isolate_targets, out_dir=None):

Upload isolated tests to isolate server.

Args: isolate_targets: Targets to isolate. out_dir: Name of the build output directory, e.g. ‘out-ref’. Defaults to ‘out’. Note that it is not a path, but just the name of the directory.

@property
def isolated_archive_path(self):

def load_dynamic_test_configs(self, root):

Add test configs from configured location.

The test configs in /infra/testing/config.pyl are expected to follow the same structure as the TEST_CONFIGS dict in testing.py.

Args: test_checkout: Path to test root, can either be the V8 checkout or an additional test checkout. Returns: Test config dict.

def load_static_test_configs(self):

Set predifined test configs from build repository.

def log_available_range(self, available_bisect_range):

def maybe_bisect(self, test_results, test_spec):

Build-local bisection for one failure.

def maybe_create_clusterfuzz_archive(self, update_step):

@contextlib.contextmanager
def maybe_nest(self, condition, parent_step_name):

def maybe_trigger(self, test_spec=v8_builders.EmptyTestSpec, **additional_properties):

def parse_revision_props(self, got_revision, got_revision_cp=None):

Parses got_revision and got_revision_cp properties.

Sets self.revision, self.revision_cp and self.revision_number.

Normally this is called from self.checkout above, but it may also be useful on bots where we do not have a checkout but have these properties (e.g. set by the parent builder when triggering child) and need to parse them.

Args: got_revision: Full git hash of the commit. got_revision_cp: Value of the Cr-Commit-Position commit footer, e.g. “refs/heads/master@”.

def read_test_spec(self, root):

Reads a test specification file under /infra/testing/builders.pyl.

Args: root: Path to checkout root with configurations. Returns: v8_builders.TestSpec object, filtered by interesting builders (current builder and all its triggered testers).

def read_version_file(self, ref, step_name_desc):

Read and return the version-file content at a paricular ref.

def read_version_from_ref(self, ref, step_name_desc):

Read and return the version at a paricular ref.

@property
def relative_path_to_d8(self):

def report_culprits(self, culprit_range):

def runhooks(self, **kwargs):

def runtests(self, tests):

def set_chromium_configs(self, clobber, default_targets):

def set_gclient_custom_deps(self, custom_deps):

Configures additional gclient custom_deps to be synced.

def set_gclient_custom_var(self, var_name):

Sets the gclient custom var var_name if given.

This customizes gclient sync, based on conditions on the variable in the V8 DEPS file.

def set_up_swarming(self):

@property
def should_build(self):

@property
def should_collect_post_compile_metrics(self):

@property
def should_test(self):

@property
def target_bits(self):

Returns target bits (as int) inferred from gn arguments from MB.

@property
def test_filter(self):

def testing_random_seed(self):

Return a random seed suitable for v8 testing.

If there are isolate hashes, build a random seed based on the hashes. Otherwise use the system's PRNG. This uses a deterministic seed for recipe simulation.

def ui_test_label(self, full_test_name):

def update_bot_config(self, bot_config, binary_size_tracking, build_config, clusterfuzz_archive, coverage, enable_swarming, target_arch, target_platform, track_build_dependencies, triggers, triggers_proxy):

Update bot_config dict with src-side properties.

Args: bot_config: The bot_config dict to update. binary_size_tracking: Additional configurations to enable binary size tracking. build_config: Config value for BUILD_CONFIG in chromium recipe module. clusterfuzz_archive: Additional configurations set for archiving builds to GS buckets for clusterfuzz. coverage: Optional coverage setting. enable_swarming: Switch to enable/disable swarming. target_arch: Config value for TARGET_ARCH in chromium recipe module. target_platform: Config value for TARGET_PLATFORM in chromium recipe module. track_build_dependencies: Weather to track and upload build-dependencies. triggers: List of tester names to trigger on success. triggers_proxy: Weather to trigger the internal trigger proxy.

Returns: An updated copy of the bot_config dict.

def update_test_configs(self, test_configs):

Update test configs without mutating previous copy.

def upload_gcov_coverage_report(self):

Capture coverage data and upload a report.

def upload_isolated_json(self):

@staticmethod
def version_from_file(blob):

recipe_modules / webrtc

DEPS: adb, archive, build, builder_group, chromium, chromium_android, chromium_checkout, chromium_swarming, chromium_tests, goma, ios, isolate, perf_dashboard, test_results, test_utils, zip, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/git, depot_tools/gitiles, depot_tools/gsutil, depot_tools/osx_sdk, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/scheduler, recipe_engine/service_account, recipe_engine/step

class WebRTCApi(RecipeApi):

def apply_bot_config(self, builders, recipe_configs):

def apply_ios_config(self):

Generate a JSON config from bot config, apply it to ios recipe module.

@property
def bucketname(self):

def build_android_archive(self):

@property
def build_url(self):

@property
def builder_group(self):

@property
def builder_id(self):

@property
def buildername(self):

def check_swarming_version(self):

def checkout(self, **kwargs):

def compile(self, phase=None, override_targets=None):

def configure_isolate(self, phase=None):

def configure_swarming(self):

def download_audio_quality_tools(self):

def download_video_quality_tools(self):

@contextlib.contextmanager
def ensure_sdk(self):

def find_swarming_command_lines(self):

def get_binary_sizes(self, files=None, base_dir=None):

def get_bot(self, bucketname, buildername):

@property
def group_config(self):

def is_compile_needed(self, phase=None, is_ios=False):

@property
def is_triggering_perf_tests(self):

def isolate(self):

def maybe_trigger(self):

def package_apprtcmobile(self):

def related_bots(self):

@property
def revision_number(self):

def run_mb(self, phase=None):

def run_mb_ios(self):

def runtests(self, phase=None):

Add a suite of test steps.

Args: test_suite=The name of the test suite.

def set_swarming_command_lines(self, tests):

@property
def should_download_audio_quality_tools(self):

@property
def should_download_video_quality_tools(self):

def upload_to_perf_dashboard(self, name, step_result):

recipe_modules / yaml

DEPS: recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/python, recipe_engine/step

class YamlApi(RecipeApi):

Provides utilities to parse yaml files.

def read(self, step_name, file_path, json_place_holder):

Reads a yaml file.

It currently shells out to a script which converts the yaml to json, this way it can use vpython to import pyyaml. To achieve the same from the recipe we need to specify pyyaml at the root file. Please change this behavior to be inline if it becomes easier to specify vpython packages dependencies in a recipe module.

Args: step_name: (str) the name of the step for reading the yaml. file_path: (str) the path to the yaml file. json_place_holder: (JsonOutputPlaceholder) for the parsed yaml content. Returns: StepData with the result from the step.

recipe_modules / zip

DEPS: recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/python

class ZipApi(RecipeApi):

Provides steps to zip and unzip files.

def directory(self, step_name, directory, output):

Step to compress a single directory.

Args: step_name: display name of the step. directory: path to a directory to compress, it would become the root of an archive, i.e. |directory|/file.txt would be named ‘file.txt’ in the archive. output: path to a zip file to create.

def make_package(self, root, output):

Returns ZipPackage object that can be used to compress a set of files.

Usage: pkg = api.zip.make_package(root, output) pkg.add_file(root.join(‘file’)) pkg.add_directory(root.join(‘directory’)) yield pkg.zip(‘zipping step’)

Args: root: a directory that would become root of a package, all files added to an archive will have archive paths relative to this directory. output: path to a zip file to create.

Returns: ZipPackage object.

def unzip(self, step_name, zip_file, output, quiet=False):

Step to uncompress |zip_file| into |output| directory.

Zip package will be unpacked to |output| so that root of an archive is in |output|, i.e. archive.zip/file.txt will become |output|/file.txt.

Step will FAIL if |output| already exists.

Args: step_name: display name of a step. zip_file: path to a zip file to uncompress, should exist. output: path to a directory to unpack to, it should NOT exist. quiet (bool): If True, print terse output instead of the name of each unzipped file.

Recipes

recipes / adb:examples/full

DEPS: adb, recipe_engine/path, recipe_engine/step

def RunSteps(api):

recipes / android/avd_packager

DEPS: chromium_checkout, depot_tools/gclient, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python

Packages Android AVDs as CIPD packages.

def RunSteps(api, properties):

recipes / android/sdk_packager

DEPS: chromium, chromium_checkout, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

Packages Android SDK packages as CIPD packages.

def RunSteps(api, properties):

recipes / angle

DEPS: goma, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/gsutil, depot_tools/osx_sdk, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step, recipe_engine/time

def RunSteps(api, target_cpu, debug, clang, uwp):

recipes / angle_chromium

DEPS: adb, build, chromium, chromium_android, chromium_swarming, chromium_tests, isolate, test_results, test_utils, depot_tools/bot_update, depot_tools/gclient, depot_tools/gitiles, depot_tools/gsutil, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/file, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

def get_component_revision_from_deps(api, component, project, repository_url, branch):

recipes / angle_chromium_trybot

DEPS: build, chromium, chromium_android, chromium_checkout, chromium_swarming, chromium_tests, filter, isolate, test_results, test_utils, depot_tools/bot_update, depot_tools/gclient, depot_tools/gerrit, depot_tools/git, depot_tools/gitiles, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

def get_chromium_revision_from_angle_cl(api):

def get_component_revision_from_deps(api, component, project, repository_url, branch):

recipes / archive:examples/full

DEPS: archive, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / archive:tests/download_and_unzip_build

DEPS: archive, recipe_engine/path, recipe_engine/properties

def RunSteps(api):

recipes / archive:tests/zip_and_upload_build

DEPS: archive, chromium, depot_tools/bot_update, depot_tools/gclient, recipe_engine/path, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / art

DEPS: repo, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/properties, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

def checkout(api):

def clobber(api):

def full_checkout(api):

def setup_aosp_builder(api, read_barrier):

def setup_host_x86(api, debug, bitness, concurrent_collector=True, generational_cc=True, heap_poisoning=False, gcstress=False, cdex_level=‘none’):

def setup_target(api, device, debug, concurrent_collector=True, generational_cc=True, heap_poisoning=False, gcstress=False):

recipes / attr_utils:tests/full

DEPS: recipe_engine/assertions

def RunSteps(api):

recipes / binary_size:tests/android_binary_size

DEPS: binary_size, recipe_engine/json, recipe_engine/platform, recipe_engine/properties, recipe_engine/time

def RunSteps(api):

recipes / binary_size_generator_tot

DEPS: binary_size, chromium, chromium_android, chromium_checkout, chromium_tests, zip, depot_tools/gclient, depot_tools/gsutil, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/properties, recipe_engine/step, recipe_engine/time

def RunSteps(api):

Zips up and uploads analysis files for android-binary-size trybot to use.

This recipe will be run continuously on chromium ToT to keep the latest zip upload as recent as possible.

recipes / binary_size_trybot

DEPS: binary_size, recipe_engine/properties

def RunSteps(api):

recipes / boringssl

DEPS: chromium, test_utils, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/osx_sdk, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / boringssl_docs

DEPS: chromium, depot_tools/bot_update, depot_tools/gclient, depot_tools/gsutil, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

Generates BoringSSL documentation and uploads it to Cloud Storage.

def RunSteps(api):

recipes / build:examples/full

DEPS: build, recipe_engine/path, recipe_engine/raw_io

def RunSteps(api):

recipes / builder_group:tests/builder_group

DEPS: builder_group, recipe_engine/assertions, recipe_engine/properties

def RunSteps(api):

recipes / catapult

DEPS: chromium, gae_sdk, depot_tools/bot_update, depot_tools/gclient, depot_tools/gitiles, depot_tools/osx_sdk, recipe_engine/cipd, recipe_engine/context, recipe_engine/generator_script, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime

def RunSteps(api, properties):

recipes / celab

DEPS: chromium, chromium_checkout, chromium_tests, test_results, zip, depot_tools/bot_update, depot_tools/gclient, depot_tools/gsutil, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step, recipe_engine/time

def RunSteps(api):

recipes / chromite:examples/full

DEPS: chromite, depot_tools/gitiles, recipe_engine/buildbucket, recipe_engine/properties

def RunSteps(api):

recipes / chromium

DEPS: adb, build, chromium, chromium_android, chromium_swarming, chromium_tests, isolate, test_results, test_utils, depot_tools/bot_update, depot_tools/gsutil, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/file, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / chromium:examples/full

DEPS: chromium, chromium_tests, recipe_engine/json, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io

def RunSteps(api):

recipes / chromium:tests/analyze

DEPS: chromium, filter

def RunSteps(api):

recipes / chromium:tests/archive_build

DEPS: chromium, depot_tools/bot_update, depot_tools/gclient, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / chromium:tests/bad_config

DEPS: chromium, recipe_engine/assertions

def RunSteps(api):

@config_ctx()
def bad_generator(c):

recipes / chromium:tests/compile

DEPS: chromium, goma, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime

def RunSteps(api, use_goma):

recipes / chromium:tests/configs

DEPS: chromium, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

recipes / chromium:tests/configure_bot

DEPS: chromium, recipe_engine/properties

def RunSteps(api):

recipes / chromium:tests/gclient

DEPS: depot_tools/gclient, recipe_engine/properties

def RunSteps(api):

recipes / chromium:tests/get_env

DEPS: chromium, recipe_engine/context, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium:tests/get_version

DEPS: chromium, recipe_engine/assertions

def RunSteps(api):

recipes / chromium:tests/guard_compile

DEPS: chromium, recipe_engine/path

def RunSteps(api):

recipes / chromium:tests/mb_analyze

DEPS: chromium, chromium_checkout, depot_tools/gclient, recipe_engine/context, recipe_engine/json

def RunSteps(api):

recipes / chromium:tests/mb_gen

DEPS: chromium, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

@chromium.config.config_ctx()
def mb_overrides(c):

recipes / chromium:tests/mb_isolate_everything

DEPS: chromium

def RunSteps(api):

recipes / chromium:tests/mb_lookup

DEPS: chromium, recipe_engine/assertions, recipe_engine/properties, recipe_engine/raw_io

def RunSteps(api):

recipes / chromium:tests/process_dumps

DEPS: chromium

def RunSteps(api):

recipes / chromium:tests/run_gn

DEPS: chromium, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

recipes / chromium:tests/runhooks

DEPS: chromium, recipe_engine/platform, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / chromium:tests/runtest

DEPS: chromium, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / chromium:tests/sizes

DEPS: chromium, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / chromium:tests/taskkill

DEPS: chromium

def RunSteps(api):

recipes / chromium:tests/test_api_ci_build

DEPS: builder_group, chromium, recipe_engine/assertions, recipe_engine/buildbucket, recipe_engine/properties

def RunSteps(api):

recipes / chromium:tests/test_api_generic_build

DEPS: builder_group, chromium, recipe_engine/assertions, recipe_engine/buildbucket, recipe_engine/properties

def RunSteps(api):

recipes / chromium:tests/test_api_try_build

DEPS: builder_group, chromium, recipe_engine/assertions, recipe_engine/buildbucket, recipe_engine/properties

def RunSteps(api):

recipes / chromium:tests/version

DEPS: chromium, recipe_engine/assertions

def RunSteps(api):

recipes / chromium_afl

DEPS: archive, chromium, depot_tools/bot_update, depot_tools/depot_tools, recipe_engine/json, recipe_engine/path, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

def gn_refs(api, step_name, args):

Runs gn refs with given additional arguments. Returns: the list of matched targets.

recipes / chromium_android:examples/full

DEPS: adb, build, chromium, chromium_android, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/step

def RunSteps(api, buildername):

recipes / chromium_android:tests/configs

DEPS: chromium, chromium_android, recipe_engine/properties

def RunSteps(api):

recipes / chromium_android:tests/download_build

DEPS: chromium_android, depot_tools/bot_update, depot_tools/gclient, recipe_engine/context, recipe_engine/path, recipe_engine/properties

def RunSteps(api):

recipes / chromium_android:tests/get_changed_lines_for_revision

DEPS: chromium_android

def RunSteps(api):

recipes / chromium_android:tests/git_number

DEPS: chromium_android, recipe_engine/properties

def RunSteps(api):

recipes / chromium_android:tests/incremental_coverage_report

DEPS: chromium_android, recipe_engine/properties

def RunSteps(api):

recipes / chromium_android:tests/init_and_sync

DEPS: chromium_android

def RunSteps(api):

recipes / chromium_android:tests/logcat_dump

DEPS: chromium, chromium_android, recipe_engine/buildbucket, recipe_engine/properties

def RunSteps(api):

recipes / chromium_android:tests/provision_devices

DEPS: chromium, chromium_android

def RunSteps(api):

recipes / chromium_android:tests/provision_devices_test

DEPS: chromium_android

def RunSteps(api):

recipes / chromium_android:tests/read_denylist

DEPS: chromium_android, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium_android:tests/resource_sizes

DEPS: chromium, chromium_android, recipe_engine/path, recipe_engine/properties

def RunSteps(api):

recipes / chromium_android:tests/run_java_unit_test_suite

DEPS: chromium, chromium_android, chromium_checkout, test_utils, depot_tools/gclient, recipe_engine/json, recipe_engine/properties

def RunSteps(api):

recipes / chromium_android:tests/run_test_suite

DEPS: chromium, chromium_android, recipe_engine/json

def RunSteps(api):

recipes / chromium_android:tests/stackwalker

DEPS: chromium, chromium_android, recipe_engine/path

def RunSteps(api):

recipes / chromium_android:tests/upload_apks_for_bisect

DEPS: build, chromium, chromium_android, depot_tools/bot_update, depot_tools/gclient

def RunSteps(api):

recipes / chromium_android:tests/upload_build

DEPS: build, chromium, chromium_android

def RunSteps(api):

recipes / chromium_android:tests/zip_and_upload_build

DEPS: chromium, chromium_android

def RunSteps(api):

recipes / chromium_checkout:tests/full

DEPS: chromium, chromium_checkout, chromium_tests, recipe_engine/path, recipe_engine/platform, recipe_engine/step

def RunSteps(api):

recipes / chromium_clang_coverage_tot

DEPS: chromium, chromium_checkout, depot_tools/bot_update, depot_tools/depot_tools, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_codesearch

DEPS: build, chromium, codesearch, goma, depot_tools/bot_update, depot_tools/gclient, depot_tools/git, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step, recipe_engine/time

def RunSteps(api, root_solution_revision, root_solution_revision_timestamp, codesearch_mirror_revision, codesearch_mirror_revision_timestamp):

recipes / chromium_codesearch_initiator

DEPS: depot_tools/git, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/scheduler, recipe_engine/step, recipe_engine/time, recipe_engine/url

A recipe for picking and tagging a stable revision for chromium/src.

This recipe picks a commit of codesearch/chromium/src at HEAD, adds a ref to it so it won't be garabage collected once a new synthetic commit is created and then triggers the other codesearch recipes with both the chosen commit hash and the hash to the parent commit as parameters. This ensures that codesearch index packs (used to generate xrefs) are all generated from the same revision, but are marked by kythe with the synthetic commit hash so cross references can linked by commit hash.

def RunSteps(api):

recipes / chromium_export_metadata

DEPS: chromium_tests, depot_tools/depot_tools, recipe_engine/path, recipe_engine/step

Exports directory metadata to GCS.

Exports metadata from DIR_METADATA files to Google Storage.

In legacy format:

See more on forms in https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/mapping.proto

def RunSteps(api):

recipes / chromium_gsutil:examples/full

DEPS: chromium_gsutil, recipe_engine/path

def RunSteps(api):

recipes / chromium_integration

DEPS: chromium, chromium_swarming, chromium_tests, test_utils, recipe_engine/buildbucket, recipe_engine/platform, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / chromium_libfuzzer

DEPS: archive, chromium, chromium_checkout, gn, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / chromium_libfuzzer_clang_tot

DEPS: chromium, depot_tools/bot_update, recipe_engine/path, recipe_engine/step

def RunSteps(api):

recipes / chromium_libfuzzer_trybot

DEPS: chromium, chromium_checkout, filter, gn, depot_tools/tryserver, recipe_engine/context, recipe_engine/json, recipe_engine/raw_io

def RunSteps(api):

recipes / chromium_speed_processor

DEPS: chromium, chromium_swarming, chromium_tests, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api, properties):

recipes / chromium_speed_tester

DEPS: chromium, chromium_swarming, chromium_tests, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/python

def RunSteps(api, properties):

recipes / chromium_swarming:examples/full

DEPS: chromium_checkout, chromium_swarming, code_coverage, isolate, swarming_client, test_utils, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

def RunSteps(api, platforms, custom_trigger_script, show_outputs_ref_in_collect_step, gtest_task, isolated_script_task, merge, trigger_script, named_caches, service_account, wait_for_tasks):

recipes / chromium_swarming:tests/configure_swarming

DEPS: chromium, chromium_swarming, recipe_engine/path, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / chromium_swarming:tests/shards_to_retry

DEPS: chromium_swarming, recipe_engine/assertions, recipe_engine/platform, recipe_engine/properties, recipe_engine/step

def RunSteps(api, task_to_retry, expected_value):

recipes / chromium_swarming:tests/task

DEPS: chromium_swarming, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

recipes / chromium_swarming:tests/trigger_output

DEPS: chromium_swarming, recipe_engine/assertions, recipe_engine/platform, recipe_engine/properties, recipe_engine/step

def RunSteps(api, task_to_retry, expected_value):

recipes / chromium_tests:tests/api/archive_build

DEPS: chromium, chromium_tests

def RunSteps(api):

recipes / chromium_tests:tests/api/compile_specific_targets

DEPS: chromium, chromium_tests, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/api/configure_build

DEPS: chromium, chromium_tests

def RunSteps(api):

recipes / chromium_tests:tests/api/create_bot_config_object

DEPS: chromium, chromium_tests

def RunSteps(api):

recipes / chromium_tests:tests/api/create_test_runner

DEPS: builder_group, chromium, chromium_tests, test_results, depot_tools/tryserver, recipe_engine/legacy_annotation, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/api/deapply_patch

DEPS: chromium, chromium_tests, recipe_engine/buildbucket, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/api/download_and_unzip_build

DEPS: chromium, chromium_tests, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/api/get_common_args_for_scripts

DEPS: chromium, chromium_tests, recipe_engine/path, recipe_engine/python

def RunSteps(api):

recipes / chromium_tests:tests/api/get_compile_targets

DEPS: chromium, chromium_tests

def RunSteps(api):

recipes / chromium_tests:tests/api/get_scheduler_jobs_to_trigger

DEPS: chromium, chromium_tests, recipe_engine/assertions, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/api/integration_steps

DEPS: chromium, chromium_swarming, chromium_tests, test_utils, recipe_engine/buildbucket, recipe_engine/platform, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / chromium_tests:tests/api/lookup_bot_metadata

DEPS: chromium, chromium_tests, recipe_engine/buildbucket, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/api/main_waterfall_steps

DEPS: chromium, chromium_swarming, chromium_tests, code_coverage, pgo, profiles, test_utils, recipe_engine/buildbucket, recipe_engine/file, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime

def NotIdempotent(check, step_odict, step):

def RunSteps(api, fail_compile):

recipes / chromium_tests:tests/api/package_build

DEPS: chromium, chromium_tests, recipe_engine/properties

def RunSteps(api, builders):

recipes / chromium_tests:tests/api/prepare_checkout

DEPS: chromium, chromium_tests, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/api/report_builders

DEPS: chromium, chromium_tests

def RunSteps(api):

def check_link(check, steps, expected_link):

recipes / chromium_tests:tests/api/runhooks

DEPS: chromium, chromium_checkout, chromium_tests, recipe_engine/buildbucket, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/api/set_swarming_command_lines

DEPS: build, chromium, chromium_swarming, chromium_tests, test_results, test_utils, depot_tools/bot_update, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/api/set_up_swarming

DEPS: chromium_swarming, chromium_tests, isolate, recipe_engine/assertions, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime

def RunSteps(api):

recipes / chromium_tests:tests/api/trybot_steps

DEPS: chromium, chromium_swarming, chromium_tests, code_coverage, filter, profiles, test_utils, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime

def RunSteps(api):

recipes / chromium_tests:tests/api/trybot_steps_analyze_autoroll

DEPS: chromium, chromium_tests, test_utils, depot_tools/tryserver, recipe_engine/json, recipe_engine/properties, recipe_engine/raw_io

def RunSteps(api):

recipes / chromium_tests:tests/api/trybot_steps_for_tests

DEPS: chromium, chromium_swarming, chromium_tests, filter, profiles, test_utils, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime

def RunSteps(api):

recipes / chromium_tests:tests/api/trybot_steps_with_specific_tests

DEPS: chromium, chromium_swarming, chromium_tests, test_utils, depot_tools/tryserver, recipe_engine/assertions, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/step

def RunSteps(api, fail_calculate_tests, fail_mb_and_compile, expected_jsonish_result):

recipes / chromium_tests:tests/api/wrap_chromium_tests

DEPS: chromium, chromium_tests, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/bot_config

DEPS: recipe_engine/assertions

def RunSteps(api):

recipes / chromium_tests:tests/bot_db

DEPS: recipe_engine/assertions

def RunSteps(api):

recipes / chromium_tests:tests/bot_spec

DEPS: recipe_engine/assertions

def RunSteps(api):

recipes / chromium_tests:tests/builders

DEPS: chromium, chromium_tests, recipe_engine/platform, recipe_engine/properties

Test to ensure the validity of the entries within BUILDERS.

Each entry in the BUILDERS dict will be checked to ensure chromium_tests.configure_build can be called with a BotConfig for that builder without error.

def RunSteps(api):

def validate_tester_config(api, builder_group, buildername, bot_config):

recipes / chromium_tests:tests/configs

DEPS: chromium, chromium_tests, depot_tools/gclient, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/steps/android_junit_test

DEPS: chromium, chromium_android, chromium_checkout, chromium_tests, test_results, test_utils, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/artifact_links

DEPS: chromium, chromium_swarming, chromium_tests, isolate, profiles, test_results, test_utils, depot_tools/bot_update, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/experimental_test

DEPS: chromium, chromium_tests, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/generate_fuchsia_test

DEPS: builder_group, chromium, chromium_tests, test_results, test_utils, depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/generate_gtest

DEPS: builder_group, chromium, chromium_swarming, chromium_tests, isolate, test_results, test_utils, depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/generate_isolated_script

DEPS: build, builder_group, chromium, chromium_swarming, chromium_tests, isolate, test_results, test_utils, depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/generate_junit_test

DEPS: chromium, chromium_android, chromium_tests, test_results, test_utils, depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/generate_script

DEPS: chromium, chromium_tests, test_utils, depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/get_args_for_test

DEPS: builder_group, chromium, chromium_tests, test_results, depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/assertions, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/properties

def RunSteps(api):

recipes / chromium_tests:tests/steps/gtest_test

DEPS: chromium, test_results, test_utils, depot_tools/bot_update, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/incremental_coverage_test

DEPS: chromium, chromium_android, recipe_engine/buildbucket, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/json_results_handler

DEPS: test_utils, traceback, recipe_engine/json, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/layout_tests_handler

DEPS: build, chromium, chromium_tests, test_results, test_utils, depot_tools/bot_update, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/local_gtest_test

DEPS: chromium, chromium_android, test_results, test_utils, depot_tools/bot_update, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/local_isolated_script_test

DEPS: isolate, test_utils, recipe_engine/json, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/mini_installer_test

DEPS: chromium, test_utils, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/mock_test

DEPS: chromium_tests, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/script_test

DEPS: chromium, chromium_tests, test_utils, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/sizes_step

DEPS: chromium, recipe_engine/buildbucket, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/swarming_gtest_test

DEPS: chromium, chromium_swarming, chromium_tests, isolate, profiles, test_results, test_utils, depot_tools/bot_update, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/swarming_ios_test

DEPS: builder_group, chromium, chromium_swarming, chromium_tests, ios, perf_dashboard, test_results, test_utils, depot_tools/bot_update, recipe_engine/file, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step, recipe_engine/time

def RunSteps(api):

recipes / chromium_tests:tests/steps/swarming_isolated_script_test

DEPS: chromium, chromium_swarming, chromium_tests, isolate, profiles, test_results, test_utils, depot_tools/bot_update, recipe_engine/commit_position, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/steps/webrtc_perf_test

DEPS: chromium, chromium_checkout, chromium_tests, test_results, test_utils, depot_tools/bot_update, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / chromium_tests:tests/try_spec

DEPS: recipe_engine/assertions

def RunSteps(api):

recipes / chromium_tests:tests/trybots

DEPS: chromium, chromium_tests, filter, recipe_engine/properties, recipe_engine/step

Test to ensure the validity of the entries within TRYBOTS.

Each entry in the TRYBOTS dict will be checked to ensure chromium_tests.trybot_steps can be called with the input set as it would be when the try builder runs.

def RunSteps(api):

recipes / chromium_trybot

DEPS: build, chromium, chromium_android, chromium_checkout, chromium_swarming, chromium_tests, filter, isolate, test_results, test_utils, depot_tools/bot_update, depot_tools/gclient, depot_tools/gerrit, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/file, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / chromium_trybot_experimental

DEPS: chromium, chromium_tests, recipe_engine/properties

This is essentially a copy of the chromium_trybot recipe. It's being actively used to experiment with other ways to give chromium developers easier ways to debug changes. Do not use without talking to martiniss@.

def RunSteps(api):

recipes / chromium_upload_clang

DEPS: chromium, chromium_checkout, depot_tools/depot_tools, depot_tools/gsutil, depot_tools/osx_sdk, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / closure_compilation

DEPS: chromium, depot_tools/bot_update, depot_tools/gclient, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / code_coverage:tests/full

DEPS: chromium, chromium_tests, code_coverage, profiles, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / codesearch:examples/full

DEPS: chromium, codesearch, goma, depot_tools/bot_update, depot_tools/gclient, depot_tools/git, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / codesearch:tests/checkout_generated_files_repo_and_sync

DEPS: chromium, codesearch, depot_tools/bot_update, depot_tools/gclient, recipe_engine/properties

def RunSteps(api):

recipes / codesearch:tests/configs

DEPS: chromium, codesearch, recipe_engine/properties

def RunSteps(api):

recipes / codesearch:tests/create_and_upload_kythe_index_pack

DEPS: chromium, codesearch, depot_tools/bot_update, depot_tools/gclient, recipe_engine/properties

def RunSteps(api):

recipes / codesearch:tests/generate_compilation_database

DEPS: chromium, codesearch, recipe_engine/properties

def RunSteps(api):

recipes / codesearch:tests/run_clang_tool

DEPS: codesearch

def RunSteps(api):

recipes / crashpad/build

DEPS: depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/osx_sdk, depot_tools/windows_sdk, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

Buildbot recipe definition for the various Crashpad continuous builders.

def RunSteps(api, config, target_os, target_cpu):

Generates the sequence of steps that will be run by the slave.

recipes / cronet

DEPS: cronet, recipe_engine/buildbucket, recipe_engine/path, recipe_engine/properties

def RunSteps(api):

recipes / cronet:examples/full

DEPS: chromium, cronet, recipe_engine/buildbucket, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / cronet:tests/run_perf_tests

DEPS: chromium, chromium_android, cronet, recipe_engine/properties

def RunSteps(api):

recipes / cros/cbuildbot

DEPS: chromite, depot_tools/gitiles, recipe_engine/buildbucket, recipe_engine/properties

def RunSteps(api):

recipes / cros/cbuildbot_tryjob

DEPS: chromite, depot_tools/gitiles, recipe_engine/json, recipe_engine/properties

def RunSteps(api):

recipes / cros/swarming

DEPS: chromite, depot_tools/gitiles, recipe_engine/legacy_annotation, recipe_engine/properties

def DoRunSteps(api):

def MakeSummaryMarkdown(api, failure):

def RunSteps(api):

recipes / crrev:examples/full

DEPS: crrev, recipe_engine/json, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / custom_tabs_client

DEPS: depot_tools/bot_update, depot_tools/gclient, recipe_engine/properties

def RunSteps(api):

recipes / dawn

DEPS: goma, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/gsutil, depot_tools/osx_sdk, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step, recipe_engine/time

def RunSteps(api, target_cpu, debug, clang):

recipes / devtools/devtools-backend

DEPS: chromium, goma, perf_dashboard, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/git, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

def cmake(api):

def compile_n_check(api, sever_build_path):

recipes / devtools/devtools-frontend

DEPS: chromium, perf_dashboard, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/git, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

def on_cq_experiment(api):

def publish_coverage_points(api):

def run_e2e(api):

def run_lint_check(api):

def run_localization_check(api):

def run_script(api, step_name, script, args=None):

def run_type_check(api):

def run_unit_tests(api):

def test_cov_data():

recipes / disk:examples/full

DEPS: disk, recipe_engine/json, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

recipes / docker:examples/full

DEPS: docker, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / docker_run

DEPS: docker, recipe_engine/properties

A generic recipe that runs a given docker container and exits.

def RunSteps(api, server, project, image, cmd_args, env):

recipes / emscripten_releases

DEPS: goma, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

def RunSteps(api, archive):

recipes / filter:examples/full

DEPS: chromium, filter, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / filter:tests/analyze

DEPS: chromium, filter, recipe_engine/json, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

recipes / filter:tests/suppress_analyze

DEPS: chromium, filter, recipe_engine/properties

def RunSteps(api):

recipes / findit/chromium/compile

DEPS: chromium, chromium_tests, filter, findit, goma, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api, target_mastername, target_buildername, good_revision, bad_revision, compile_targets, use_analyze, suspected_revisions, use_bisect, compile_on_good_revision):

recipes / findit/chromium/compile_isolate

DEPS: chromium, chromium_tests, findit, isolate, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

This recipe is to compile and isolate the given isolated targets.

If multiple test targets match the same isolated targets, we default to the first one after ordering test target names alphabetically.

def RunSteps(api, target_mastername, target_testername, revision, isolated_targets):

recipes / findit/chromium/export_bot_db

DEPS: chromium_tests, depot_tools/gsutil, recipe_engine/properties, recipe_engine/raw_io

Export the bot db to cloud storage.

def RunSteps(api):

recipes / findit/chromium/flake

DEPS: chromium_swarming, chromium_tests, findit, isolate, test_utils, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api, target_mastername, target_testername, test_revision, tests, test_repeat_count, skip_tests):

recipes / findit/chromium/preemptive_bot_update

DEPS: chromium_checkout, chromium_tests, depot_tools/gclient, depot_tools/git, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step, recipe_engine/time

Checkout the chromium src tree at the latest revision.

This recipe is meant to be run on idle bots to keep their local checkouts up to date as much as possible so that when they are required to run culprit-finding jobs they have as low latency as possible in their bot_update steps.

def RunSteps(api):

def TargetMasterAndBuilder(api):

recipes / findit/chromium/single_revision

DEPS: chromium, chromium_swarming, chromium_tests, filter, findit, goma, isolate, test_utils, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/properties

def RunSteps(api, properties):

recipes / findit/chromium/test

DEPS: chromium_swarming, chromium_tests, findit, test_utils, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api, target_mastername, target_testername, good_revision, bad_revision, tests, use_analyze, suspected_revisions, test_on_good_revision, test_repeat_count):

recipes / findit:examples/full

DEPS: findit, recipe_engine/buildbucket, recipe_engine/path, recipe_engine/platform, recipe_engine/properties

def RunSteps(api):

recipes / gae_sdk:examples/full

DEPS: gae_sdk, recipe_engine/path, recipe_engine/platform, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / gatekeeper

DEPS: gatekeeper, recipe_engine/path, recipe_engine/properties

Launches the gatekeeper.

def RunSteps(api):

recipes / gatekeeper-failure

DEPS: recipe_engine/platform, recipe_engine/step

Repeatedly fails as a way to ensure the gatekeeper is alive and well.

def RunSteps(api):

recipes / gatekeeper:tests/call

DEPS: gatekeeper, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / git_clone_bundler:examples/full

DEPS: git_clone_bundler, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io

def RunSteps(api):

recipes / gn:tests/clean

DEPS: gn, recipe_engine/path

def RunSteps(api):

recipes / gn:tests/get_args

DEPS: gn, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io

def RunSteps(api):

recipes / gn:tests/ls

DEPS: gn, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io

def RunSteps(api, targets, output_type):

recipes / gn:tests/parse_gn_args

DEPS: gn

def RunSteps(api):

recipes / gn:tests/refs

DEPS: gn, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io

def RunSteps(api, targets, output_type):

recipes / goma:examples/full

DEPS: chromium, goma, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / goma:tests/build_with_goma

DEPS: goma, recipe_engine/buildbucket, recipe_engine/path, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / goma:tests/configure_enable_ats

DEPS: goma

def RunSteps(api):

recipes / goma:tests/ensure

DEPS: goma, recipe_engine/properties

def RunSteps(api):

recipes / goma:tests/jobs

DEPS: goma, recipe_engine/platform

def RunSteps(api):

recipes / goma:tests/recommended_goma_jobs

DEPS: goma

def RunSteps(api):

recipes / goma:tests/start

DEPS: goma, recipe_engine/buildbucket, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / goma_client

DEPS: depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/osx_sdk, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/path, recipe_engine/platform, recipe_engine/python, recipe_engine/step

def RunSteps(api):

recipes / goma_server

DEPS: goma_server, recipe_engine/buildbucket, recipe_engine/path, recipe_engine/platform, recipe_engine/runtime

def RunSteps(api):

recipes / goma_server:tests/simple

DEPS: goma_server, recipe_engine/buildbucket

def RunSteps(api):

recipes / halt:examples/full

DEPS: halt

def RunSteps(api):

recipes / ios/try

DEPS: chromium, chromium_swarming, ios, depot_tools/gclient, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / ios/unified_builder_tester

DEPS: builder_group, chromium, ios, recipe_engine/buildbucket, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / ios:examples/full

DEPS: chromium, chromium_swarming, ios, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime

def RunSteps(api):

recipes / ios:tests/isolate

DEPS: chromium, ios, recipe_engine/assertions, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime

def RunSteps(api, expected_partial_tasks):

recipes / ios:tests/optional_dimensions

DEPS: chromium, ios, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io

def RunSteps(api):

recipes / ios:tests/swarming_service_acount

DEPS: chromium, ios, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io

def RunSteps(api):

recipes / isolate:examples/compose

DEPS: isolate, swarming_client

def RunSteps(api):

recipes / isolate:examples/full

DEPS: isolate, swarming_client, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / isolate:tests/check_swarm_hashes

DEPS: isolate, recipe_engine/properties

def RunSteps(api):

recipes / isolate:tests/clean_isolated_files

DEPS: isolate, recipe_engine/path

def RunSteps(api):

recipes / isolate:tests/compare_build_artifacts

DEPS: chromium, isolate, recipe_engine/properties

def RunSteps(api):

recipes / isolate:tests/isolate_tests

DEPS: isolate, recipe_engine/path

def RunSteps(api):

recipes / isolate:tests/isolated_tests

DEPS: isolate, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / isolate:tests/run_isolated

DEPS: isolate

def RunSteps(api):

recipes / led_recipes_tester

DEPS: depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/cipd, recipe_engine/context, recipe_engine/file, recipe_engine/futures, recipe_engine/json, recipe_engine/led, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step, recipe_engine/swarming

Tests a recipe CL by running a chromium builder.

def RunSteps(api, repo_name):

recipes / libyuv/libyuv

DEPS: builder_group, chromium, chromium_android, libyuv, depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/runtime, recipe_engine/step

Recipe for building and running tests for Libyuv stand-alone.

def RunSteps(api):

recipes / libyuv/roll_deps

DEPS: libyuv, depot_tools/depot_tools, depot_tools/gclient, depot_tools/gerrit, depot_tools/git, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / math_utils:examples/full

DEPS: math_utils, recipe_engine/step

def RunSteps(api):

recipes / math_utils:tests/mean_error

DEPS: math_utils

def RunSteps(api):

recipes / nacl

DEPS: goma, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/osx_sdk, depot_tools/windows_sdk, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/isolated, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step, recipe_engine/swarming

def AnnotatedStepsSteps(api, got_revision, checkout_path, compiled_sources_path):

def CheckoutSteps(api):

def ParseSwarmingResults(api, builder_name, results):

Called after swarming.collect() to produce proper step results.

@contextmanager
def PlatformSDK(api):

def RunSteps(api):

def TriggerHardwareTests(api, got_revision, checkout_path, compiled_sources_path, dimensions):

Triggers tests on ARM hardware bots with precompiled sources.

def UploadFilesToIsolateStorage(api, files):

Pushes files up to the isolate server storage.

recipes / ndk/ndk_buildbot

DEPS: chromite, ndk, recipe_engine/properties

def RunSteps(api):

recipes / ndk:tests/cover

DEPS: chromite, ndk

def RunSteps(api):

recipes / openscreen

DEPS: code_coverage, goma, profiles, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/git, depot_tools/gsutil, depot_tools/osx_sdk, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/isolated, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step, recipe_engine/swarming

Recipe for building and running tests for Open Screen stand-alone.

def CalculateCodeCoverage(api, output_path, unit_test_binary, e2e_test_binary):

Calculates code coverage from raw coverage data generated by prior test runs.

def CheckSwarmingResults(api, name, results):

Called after swarming.collect() to produce a proper step result.

def FormatGnArg(properties, key):

Takes a specific keg, e.g. is_debug, and format the key and value pair as a valid gn argument.

def FormatGnArgs(properties):

Takes a list of properties and maps them to string gn arguments.

def GenerateCoverageTestConstants(api, checkout_dir, output_dir):

Generates fake file paths used for validation in code coverage tests.

def GetChangedFiles(api, checkout_path):

Returns list of POSIX paths of files affected by patch.

def GetHostToolLabel(platform):

Determines what the platform label is, e.g. ‘mac’ or ‘linux64’.

def GetSwarmingDimensions(is_ci):

def RunSteps(api):

Main function body for execution on the current bot.

def RunTestsAndCoverageLocally(api, output_path, unit_test_binary, e2e_test_binary):

Runs unit tests and e2e tests locally and calculates code coverage

def RunTestsLocally(api, unit_test_binary, e2e_test_binary):

Runs unit tests and e2e tests locally

def SetCodeCoverageConstants(api, checkout_dir, host_tool_label):

Performs dependency injection on internal constants of the code_coverage module needed to allow for the code coverage module to function correctly.

def SwarmTests(api, output_path, checkout_path, dimensions):

Runs specific types of tests on a separate swarming bot.

def UploadFilesToIsolateStorage(api, files):

Pushes files up to the isolate server storage.

recipes / pdfium

DEPS: goma, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/gsutil, depot_tools/osx_sdk, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step, recipe_engine/time

def RunSteps(api, memory_tool, skia, skia_paths, xfa, v8, target_cpu, clang, msvc, rel, component, skip_test, target_os):

recipes / perf_dashboard:examples/full

DEPS: perf_dashboard, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / pgo:tests/full

DEPS: chromium, chromium_tests, code_coverage, pgo, profiles, recipe_engine/buildbucket, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / pinpoint/builder

DEPS: chromium, chromium_tests, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/properties

def RunSteps(api):

recipes / presubmit

DEPS: v8, webrtc, depot_tools/gclient, depot_tools/presubmit, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / profiles:tests/find_merge_errors

DEPS: profiles

def RunSteps(api):

recipes / profiles:tests/merge_profdata

DEPS: chromium_checkout, profiles, recipe_engine/assertions, recipe_engine/path

def RunSteps(api):

recipes / profiles:tests/profile_dir

DEPS: profiles, recipe_engine/assertions

def RunSteps(api):

recipes / profiles:tests/properties

DEPS: chromium_checkout, profiles, recipe_engine/path

def RunSteps(api):

recipes / profiles:tests/upload

DEPS: chromium_checkout, profiles, recipe_engine/assertions, recipe_engine/path

def RunSteps(api):

recipes / puppet_service_account:examples/full

DEPS: puppet_service_account, recipe_engine/platform

Small example of using the puppet_service_account api.

def RunSteps(api):

recipes / repo:examples/full

DEPS: repo, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / run_presubmit

DEPS: libyuv, v8, webrtc, depot_tools/bot_update, depot_tools/gclient, depot_tools/git, depot_tools/presubmit, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/cq, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / swarming/deterministic_build

DEPS: chromium, chromium_android, isolate, depot_tools/bot_update, depot_tools/gclient, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python

Recipe to test the deterministic build.

Waterfall page: https://build.chromium.org/p/chromium.swarm/waterfall

def ConfigureChromiumBuilder(api, recipe_config):

def MoveBuildDirectory(api, src_dir, dst_dir):

def RunSteps(api, buildername):

recipes / swarming/staging

DEPS: chromium, chromium_checkout, chromium_swarming, chromium_tests, isolate, swarming_client, test_results, test_utils, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/step

Swarming staging recipe: runs tests for HEAD of chromium using HEAD of swarming_client toolset on Swarming staging server instances (*-dev.appspot.com).

Intended to catch bugs in swarming_client and Swarming servers early on, before full roll out.

Waterfall page: https://build.chromium.org/p/chromium.swarm/waterfall

def RunSteps(api, mastername):

recipes / swarming_client:examples/full

DEPS: swarming_client, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / symupload:examples/full

DEPS: symupload, recipe_engine/path, recipe_engine/properties

def RunSteps(api):

recipes / tar:examples/full

DEPS: tar, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/step

def RunSteps(api):

recipes / test_results:examples/full

DEPS: builder_group, test_results, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api, warning, server_config):

recipes / test_utils:tests/exonerate_flaky_failures

DEPS: chromium, chromium_tests, test_utils, recipe_engine/json, recipe_engine/properties, recipe_engine/step

def RunSteps(api, known_flakes_expectations, exclude_failed_test, has_too_many_failures):

recipes / test_utils:tests/gtest_results

DEPS: test_utils, recipe_engine/properties, recipe_engine/step

def RunSteps(api):

recipes / test_utils:tests/present_gtest_failures

DEPS: test_utils, recipe_engine/step

def RunSteps(api):

recipes / test_utils:tests/run_tests

DEPS: builder_group, chromium, chromium_swarming, chromium_tests, test_results, test_utils, depot_tools/tryserver, recipe_engine/platform, recipe_engine/properties, recipe_engine/step

def RunSteps(api, test_swarming, test_name, abort_on_failure, retry_invalid_shards):

recipes / test_utils:tests/run_tests_include_swarming

DEPS: test_utils

def RunSteps(api):

recipes / test_utils:tests/run_tests_with_patch

DEPS: chromium_swarming, test_utils, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api, retry_failed_shards, test_kwargs_list):

recipes / test_utils:tests/test_results

DEPS: test_utils, recipe_engine/properties

def RunSteps(api):

recipes / test_utils:tests/upload_results_to_resultdb

DEPS: builder_group, chromium, chromium_swarming, chromium_tests, test_utils, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/resultdb

def RunSteps(api, is_swarming_test=True):

recipes / tint

DEPS: goma, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/osx_sdk, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

def RunSteps(api, target_cpu, debug, clang):

recipes / traceback:examples/full

DEPS: traceback, recipe_engine/path, recipe_engine/platform, recipe_engine/step

def RunSteps(api):

recipes / tricium_clang_tidy:tests/example

DEPS: tricium_clang_tidy, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/step, recipe_engine/tricium

def RunSteps(api):

recipes / tricium_clang_tidy_wrapper

DEPS: chromium, chromium_checkout, goma, tricium_clang_tidy, depot_tools/depot_tools, depot_tools/gclient, depot_tools/gerrit, depot_tools/tryserver, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step, recipe_engine/tricium

def RunSteps(api):

recipes / tricium_metrics

DEPS: chromium, chromium_checkout, depot_tools/gclient, depot_tools/gerrit, depot_tools/git, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step, recipe_engine/tricium

def RunSteps(api):

recipes / ts_mon:tests/example

DEPS: ts_mon

def RunSteps(api):

recipes / v8

DEPS: archive, chromium, chromium_swarming, swarming_client, test_utils, v8, depot_tools/gclient, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/json, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/scheduler, recipe_engine/step, recipe_engine/swarming, recipe_engine/time, recipe_engine/url

def RunSteps(api, binary_size_tracking, build_config, clobber, clobber_all, clusterfuzz_archive, coverage, custom_deps, default_targets, enable_swarming, mb_config_path, set_gclient_var, target_arch, target_platform, track_build_dependencies, triggers, triggers_proxy, use_goma):

recipes / v8/archive

DEPS: chromium, gn, v8, zip, depot_tools/gclient, depot_tools/git, depot_tools/gsutil, recipe_engine/buildbucket, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

Recipe for archiving officially tagged v8 builds.

def RunSteps(api, build_config, target_arch, target_bits, target_platform):

def make_archive(api, bot_config, ref, version, archive_type, step_suffix=‘‘, archive_suffix=’’):

recipes / v8/auto_roll_deps

DEPS: chromium, ts_mon, v8, depot_tools/bot_update, depot_tools/gclient, depot_tools/gerrit, depot_tools/git, depot_tools/gitiles, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/service_account, recipe_engine/step, recipe_engine/url

def RunSteps(api):

def get_v8_revision(api, name, deps):

def is_gitiles_inconsistent(api):

Returns whether the DEPS from gitiles and the local file are inconsistent.

recipes / v8/auto_roll_push

DEPS: chromium, v8, depot_tools/bot_update, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/service_account, recipe_engine/step, recipe_engine/url

def RunSteps(api):

recipes / v8/auto_roll_release_process

DEPS: builder_group, v8, depot_tools/bot_update, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

def ClusterfuzzHasIssues(api):

def RunSteps(api):

recipes / v8/auto_roll_v8_deps

DEPS: v8, depot_tools/bot_update, depot_tools/gclient, depot_tools/gerrit, depot_tools/git, depot_tools/gitiles, recipe_engine/buildbucket, recipe_engine/cipd, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/service_account, recipe_engine/step, recipe_engine/url

def GetDEPS(api, name, project_name):

def RunSteps(api):

def commit_messages_log_entries(api, repo, from_commit, to_commit):

Returns list of log entries to be added to commit message.

Args: api: Recipes api. repo: Gitiles url to rolled repository. from_commit: Parent of first rolled commit. to_commit: Newest rolled commit.

def create_gclient_config(api, target_config):

def roll_chromium_pin(api):

Updates the values of gclient variables chromium_(win|mac|linux) with the latest prebuilt versions.

recipes / v8/auto_tag

DEPS: builder_group, v8, depot_tools/gclient, depot_tools/git, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/service_account, recipe_engine/step

This recipe checks if a version update on branch is necessary, where ‘version’ refers to the contents of the v8 version file (part of the v8 sources).

The recipe will:

  • Commit a v8 version change to with an incremented patch level if the latest two commits point to the same version.
  • Make sure that the actual HEAD of is tagged with its v8 version (as specified in the v8 version file at HEAD).
  • Update a ref called -lkgr to point to the latest commit that has a unique, incremented version and that is tagged with that version.

def GetCommitForRef(api, repo, ref):

def Git(api, *args, **kwargs):

Convenience wrapper.

def IncrementVersion(api, ref, latest_version, latest_version_file):

Increment the version on branch ‘ref’ to the next patch level and wait for the committed ref to be gnumbd-ed or time out.

Args: api: The recipe api. ref: Ref name where to change the version, e.g. refs/remotes/branch-heads/1.2. latest_version: The currently latest version to be incremented. latest_version_file: The content of the current version file.

def InitClean(api):

Ensures a clean state of the git checkout.

def LogStep(api, text):

def PushRef(api, repo, ref, hsh):

def RunSteps(api):

def UpdateRef(api, repo, head, lkgr_ref):

recipes / v8/flako

DEPS: builder_group, chromium_swarming, swarming_client, depot_tools/gitiles, depot_tools/gsutil, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step

Recipe to bisect flaky tests in V8.

Bisection will start at a known bad to_revision and:

  1. Calibrate the number of repetitions until enough confidence is reached.
  2. Bisect backwards exponentially, doubling the offset in each step.
  3. After finding a good from_revision, bisect into the range from_revision..to_revision and report the suspect.

Tests are only run on existing isolated files, looked up on Google Storage.

All revisions during bisections are represented as offsets to the start revision which has offset 0.

See PROPERTIES for documentation on the recipe's interface.

def RunSteps(api, bisect_builder_group, bisect_buildername, build_config, extra_args, initial_commit_offset, max_calibration_attempts, isolated_name, num_shards, repetitions, repro_only, swarming_dimensions, swarming_priority, swarming_expiration, test_name, timeout_sec, total_timeout_sec, to_revision, variant):

def bisect(api, depot, initial_commit_offset, is_bad_func, offset):

Exercises the bisection control flow.

Args: api: Recipe api. depot: Helper for accessing storage and git. initial_commit_offset: Number of commits, backwards bisection will initially leap over. is_bad_func: Function (revision->bool) determining if a given revision is bad. offset: Offset at which to start bisection.

def setup_swarming(api, swarming_dimensions, swarming_priority, swarming_expiration):

recipes / v8/node_integration

DEPS: chromium, goma, v8, zip, depot_tools/gclient, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

Recipe to test v8/node.js integration.

def RunSteps(api):

@contextmanager
def goma_wrapper(api):

recipes / v8/node_integration_ng

DEPS: chromium, goma, v8, zip, depot_tools/bot_update, depot_tools/gclient, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/commit_position, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/step

Recipe to test v8/node.js integration.

def RunSteps(api, triggers, v8_tot):

def run_with_retry(api, step_name, step_fun):

Runs step_fun and retries once on failure.

Returns: True if a flake has been detected.

recipes / v8/presubmit

DEPS: chromium, v8, depot_tools/gclient, recipe_engine/context, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime

Recipe for running presubmit in V8 CI.

def RunSteps(api):

recipes / v8/verify_flakes

DEPS: v8, depot_tools/gitiles, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/runtime, recipe_engine/step

Recipe to verify flaky tests (aka progression testing).

The recipe reads flake config and for each entry triggers flako recipe in reproduce_only mode. If any flake fails to reproduce, the build is marked as failed, which can then be used to alert sheriffs via a gatekeeper rule.

def RunSteps(api):

def update_step_presentation(api, presentation, build, flake_config):

recipes / v8:tests/example

DEPS: v8, recipe_engine/buildbucket, recipe_engine/json, recipe_engine/properties, recipe_engine/runtime

def RunSteps(api):

recipes / wasm_llvm

DEPS: goma, depot_tools/bot_update, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/legacy_annotation, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / webrtc/auto_roll_webrtc_deps

DEPS: webrtc, depot_tools/bot_update, depot_tools/depot_tools, depot_tools/gclient, depot_tools/gerrit, depot_tools/git, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/runtime, recipe_engine/step, recipe_engine/url

def RunSteps(api):

recipes / webrtc/chromium_ios

DEPS: builder_group, ios, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io

Recipe based on ios/unified_builder_tester adapted for using WebRTC.

The changes are:

  • The Chromium checkout uses WebRTC ToT in src/third_party/WebRTC

def RunSteps(api):

recipes / webrtc/ios

DEPS: chromium, chromium_swarming, chromium_tests, ios, webrtc, depot_tools/bot_update, recipe_engine/path, recipe_engine/properties, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / webrtc/ios_api_framework

DEPS: archive, builder_group, chromium_checkout, ios, webrtc, zip, depot_tools/bot_update, depot_tools/gclient, depot_tools/gsutil, depot_tools/tryserver, recipe_engine/commit_position, recipe_engine/context, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / webrtc/libfuzzer

DEPS: archive, chromium, webrtc, depot_tools/bot_update, depot_tools/depot_tools, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step

def RunSteps(api):

recipes / webrtc/more_configs

DEPS: chromium, webrtc, depot_tools/bot_update, recipe_engine/properties, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / webrtc/standalone

DEPS: archive, chromium, chromium_android, chromium_swarming, test_utils, webrtc, depot_tools/bot_update, depot_tools/gclient, depot_tools/tryserver, recipe_engine/buildbucket, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/runtime, recipe_engine/step

def RunSteps(api):

recipes / yaml:examples/full

DEPS: yaml, recipe_engine/assertions, recipe_engine/file, recipe_engine/json, recipe_engine/raw_io

def RunSteps(api):

recipes / zip:examples/full

DEPS: zip, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/step

def RunSteps(api):