|
16 | 16 | import utils |
17 | 17 |
|
18 | 18 | 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)' |
20 | 20 | GSUTIL = utils.GetBuildbotGSUtilPath() |
21 | 21 |
|
22 | 22 | def run(args): |
@@ -65,12 +65,15 @@ def cross_compiling_builder(arch, mode): |
65 | 65 | if os.path.exists(path): |
66 | 66 | os.remove(path) |
67 | 67 |
|
68 | | -def target_builder(arch, mode): |
| 68 | +def target_builder(arch, mode, total_shards, shard_index): |
69 | 69 | test_py = os.path.join('tools', 'test.py') |
70 | 70 | test_args = [sys.executable, test_py, '--progress=line', '--report', |
71 | 71 | '--time', '--compiler=none', '--runtime=vm', '--write-debug-log', |
72 | 72 | '--write-test-outcome-log', '--mode=' + mode, '--arch=' + arch, |
73 | 73 | '--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) |
74 | 77 |
|
75 | 78 | revision = os.environ['BUILDBOT_GOT_REVISION'] |
76 | 79 | tarball = tarball_name(arch, mode, revision) |
@@ -106,8 +109,10 @@ def main(): |
106 | 109 | cross_compiling_builder(arch, mode) |
107 | 110 | elif target_vm_pattern_match: |
108 | 111 | 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) |
111 | 116 | else: |
112 | 117 | raise Exception("Unknown builder name %s" % name) |
113 | 118 |
|
|
0 commit comments