• Jeff Yoon's avatar
    Swarming-based sharding for iOS · b4f60257
    Jeff Yoon authored
    iOS utilizes otool to analyze and distribute test case execution
    against x number of shards. This logic was run in the recipe,
    such that the sublist of test cases would be passed into the isolate
    for execution. Chromium does not support recipe-level sharding.
    
    To mitigate, we clone the otool sharding logic into the test runner.
    Each swarming task (shard) is provided with two keys via env vars:
    shard index, and total number of shards.
    
    A given test on a given run should be broken down identically across
    each swarming task, because the test bundle does not change and the
    number of total shards is the same. Because each task also is provided
    the index, it can select the corresponding index from the sublist
    and execute that sublist of test cases.
    
    There is minimal performance hit, and this logic is only invoked when
    those env vars are present, which are only set by swaring for shards
    greater than 1.
    
    Change-Id: Id3b4c96cc68ef97b62ed79afc145bbbe55156063
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2040371Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
    Commit-Queue: Jeff Yoon <jeffyoon@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#739211}
    b4f60257
shard_util.py 6.76 KB