Skip to content

Commit 9d3e7c3

Browse files
committed
Add (forward-compatible) change to annotated steps of target-arm builder to support sharding
R=ricow@google.com Review URL: https://codereview.chromium.org//1182103005.
1 parent 7158d5f commit 9d3e7c3

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

tools/bots/cross-vm.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import utils
1717

1818
CROSS_VM = r'cross-(arm)-vm-linux-(release)'
19-
TARGET_VM = r'target-(arm)-vm-linux-(release)'
19+
TARGET_VM = r'target-(arm)-vm-linux-(([0-9]+)-([0-9]+))?(release)'
2020
GSUTIL = utils.GetBuildbotGSUtilPath()
2121

2222
def run(args):
@@ -65,12 +65,15 @@ def cross_compiling_builder(arch, mode):
6565
if os.path.exists(path):
6666
os.remove(path)
6767

68-
def target_builder(arch, mode):
68+
def target_builder(arch, mode, total_shards, shard_index):
6969
test_py = os.path.join('tools', 'test.py')
7070
test_args = [sys.executable, test_py, '--progress=line', '--report',
7171
'--time', '--compiler=none', '--runtime=vm', '--write-debug-log',
7272
'--write-test-outcome-log', '--mode=' + mode, '--arch=' + arch,
7373
'--exclude-suite=pkg']
74+
if total_shards and shard_index:
75+
test_args.append('--shards=%s' % total_shards)
76+
test_args.append('--shard=%s' % shard_index)
7477

7578
revision = os.environ['BUILDBOT_GOT_REVISION']
7679
tarball = tarball_name(arch, mode, revision)
@@ -106,8 +109,10 @@ def main():
106109
cross_compiling_builder(arch, mode)
107110
elif target_vm_pattern_match:
108111
arch = target_vm_pattern_match.group(1)
109-
mode = target_vm_pattern_match.group(2)
110-
target_builder(arch, mode)
112+
mode = target_vm_pattern_match.group(5)
113+
shard_index = target_vm_pattern_match.group(3)
114+
total_shards = target_vm_pattern_match.group(4)
115+
target_builder(arch, mode, total_shards, shard_index)
111116
else:
112117
raise Exception("Unknown builder name %s" % name)
113118

0 commit comments

Comments
 (0)