OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 # Recipe module for Skia Swarming trigger. | 6 # Recipe module for Skia Swarming trigger. |
7 | 7 |
8 | 8 |
9 import os | 9 import os |
10 import json | 10 import json |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 112 } |
113 dimensions['os'] = builder_cfg.get('os', 'Ubuntu') | 113 dimensions['os'] = builder_cfg.get('os', 'Ubuntu') |
114 if builder_cfg.get('extra_config', '').startswith('CT_'): | 114 if builder_cfg.get('extra_config', '').startswith('CT_'): |
115 dimensions['pool'] = 'SkiaCT' | 115 dimensions['pool'] = 'SkiaCT' |
116 return dimensions # Do not need any more dimensions for CT builders. | 116 return dimensions # Do not need any more dimensions for CT builders. |
117 if 'Win' in builder_cfg.get('os', ''): | 117 if 'Win' in builder_cfg.get('os', ''): |
118 dimensions['os'] = 'Windows' | 118 dimensions['os'] = 'Windows' |
119 if builder_cfg['role'] in ('Test', 'Perf'): | 119 if builder_cfg['role'] in ('Test', 'Perf'): |
120 if 'Android' in builder_cfg['os']: | 120 if 'Android' in builder_cfg['os']: |
121 # For Android, the device type is a better dimension than CPU or GPU. | 121 # For Android, the device type is a better dimension than CPU or GPU. |
122 dimensions['device_type'] = { | 122 device_type, device_os = { |
123 'AndroidOne': 'sprout', | 123 'AndroidOne': ('sprout', 'MOB30Q'), |
124 'GalaxyS3': 'm0', #'smdk4x12', Detected incorrectly by swarming? | 124 'GalaxyS7': ('heroqlteatt','MMB29M'), |
125 'GalaxyS4': None, # TODO(borenet,kjlubick) | 125 'NVIDIA_Shield': ('foster', 'MRA58K'), |
126 'GalaxyS7': 'heroqlteatt', | 126 'Nexus10': ('manta', 'LMY49J'), |
127 'NVIDIA_Shield': 'foster', | 127 'Nexus5': ('hammerhead', 'MOB31E'), |
128 'Nexus10': 'manta', | 128 'Nexus6': ('shamu', 'M'), |
129 'Nexus5': 'hammerhead', | 129 'Nexus6p': ('angler', 'NRD91E'), |
130 'Nexus6': 'shamu', | 130 'Nexus7': ('grouper', 'LMY47V'), |
131 'Nexus6p': 'angler', | 131 'Nexus7v2': ('flo', 'M'), |
132 'Nexus7': 'grouper', | 132 'Nexus9': ('flounder', 'NRD91D'), |
133 'Nexus7v2': 'flo', | 133 'NexusPlayer': ('fugu', 'NRD90R'), |
134 'Nexus9': 'flounder', | |
135 'NexusPlayer': 'fugu', | |
136 }[builder_cfg['model']] | 134 }[builder_cfg['model']] |
| 135 dimensions['device_type'] = device_type |
| 136 dimensions['device_os'] = device_os |
137 elif 'iOS' in builder_cfg['os']: | 137 elif 'iOS' in builder_cfg['os']: |
138 # For iOS, the device type is a better dimension than CPU or GPU. | 138 # For iOS, the device type is a better dimension than CPU or GPU. |
139 dimensions['device'] = { | 139 dimensions['device'] = { |
140 'iPad4': 'iPad4,1', | 140 'iPad4': 'iPad4,1', |
141 }[builder_cfg['model']] | 141 }[builder_cfg['model']] |
142 # TODO(borenet): Replace this hack with something better. | 142 # TODO(borenet): Replace this hack with something better. |
143 dimensions['os'] = 'iOS-9.2' | 143 dimensions['os'] = 'iOS-9.2' |
144 elif builder_cfg['cpu_or_gpu'] == 'CPU': | 144 elif builder_cfg['cpu_or_gpu'] == 'CPU': |
145 dimensions['gpu'] = 'none' | 145 dimensions['gpu'] = 'none' |
146 dimensions['cpu'] = { | 146 dimensions['cpu'] = { |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 path_config='kitchen', | 763 path_config='kitchen', |
764 revision='abc123', | 764 revision='abc123', |
765 **gerrit_kwargs) + | 765 **gerrit_kwargs) + |
766 api.step_data( | 766 api.step_data( |
767 'upload new .isolated file for test_skia', | 767 'upload new .isolated file for test_skia', |
768 stdout=api.raw_io.output('def456 XYZ.isolated')) + | 768 stdout=api.raw_io.output('def456 XYZ.isolated')) + |
769 api.step_data( | 769 api.step_data( |
770 'upload new .isolated file for upload_dm_results_skia', | 770 'upload new .isolated file for upload_dm_results_skia', |
771 stdout=api.raw_io.output('def456 XYZ.isolated')) | 771 stdout=api.raw_io.output('def456 XYZ.isolated')) |
772 ) | 772 ) |
OLD | NEW |