blob: f471d1b3c9d2dda40fdc0cf8468268ee289c6512 [file] [log] [blame]
Kevin Chenga2619dc2016-03-28 11:42:08 -07001# Copyright 2016 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5"""This class defines the CrosHost Label class."""
6
C Shapiro05dd3222017-09-22 10:42:33 -06007import collections
Kevin Chenga2619dc2016-03-28 11:42:08 -07008import logging
Kevin Chenga2619dc2016-03-28 11:42:08 -07009import re
10
11import common
12
13from autotest_lib.client.bin import utils
Kevin Cheng80ad5732016-03-31 16:01:56 -070014from autotest_lib.client.common_lib import global_config
Kevin Chenga2619dc2016-03-28 11:42:08 -070015from autotest_lib.client.cros.audio import cras_utils
Kevin Chenga2619dc2016-03-28 11:42:08 -070016from autotest_lib.server.cros.dynamic_suite import constants as ds_constants
17from autotest_lib.server.hosts import base_label
18from autotest_lib.server.hosts import common_label
Garry Wang11b5e872020-03-11 15:14:08 -070019from autotest_lib.server.hosts import servo_constants
Kevin Cheng80ad5732016-03-31 16:01:56 -070020from autotest_lib.site_utils import hwid_lib
Kevin Chenga2619dc2016-03-28 11:42:08 -070021
22# pylint: disable=missing-docstring
C Shapiro05dd3222017-09-22 10:42:33 -060023LsbOutput = collections.namedtuple('LsbOutput', ['unibuild', 'board'])
24
Gregory Nisbetfb68a1f2019-08-22 10:27:33 -070025# fallback values if we can't contact the HWID server
26HWID_LABELS_FALLBACK = ['sku', 'phase', 'touchscreen', 'touchpad', 'variant', 'stylus']
27
Eshwar Narayan871a2c02020-02-06 11:15:24 -080028# Repair and Deploy taskName
29REPAIR_TASK_NAME = 'repair'
30DEPLOY_TASK_NAME = 'deploy'
31
Gregory Nisbetfb68a1f2019-08-22 10:27:33 -070032
C Shapiro05dd3222017-09-22 10:42:33 -060033def _parse_lsb_output(host):
Allen Lia0c7afc2019-02-26 15:50:06 -080034 """Parses the LSB output and returns key data points for labeling.
C Shapiro05dd3222017-09-22 10:42:33 -060035
Allen Lia0c7afc2019-02-26 15:50:06 -080036 @param host: Host that the command will be executed against
37 @returns: LsbOutput with the result of parsing the /etc/lsb-release output
38 """
39 release_info = utils.parse_cmd_output('cat /etc/lsb-release',
40 run_method=host.run)
C Shapiro05dd3222017-09-22 10:42:33 -060041
Allen Lia0c7afc2019-02-26 15:50:06 -080042 unibuild = release_info.get('CHROMEOS_RELEASE_UNIBUILD') == '1'
43 return LsbOutput(unibuild, release_info['CHROMEOS_RELEASE_BOARD'])
C Shapiro05dd3222017-09-22 10:42:33 -060044
Kevin Chenga2619dc2016-03-28 11:42:08 -070045
C Shapirobe0ff8d2019-06-14 10:41:43 -060046class DeviceSkuLabel(base_label.StringPrefixLabel):
47 """Determine the correct device_sku label for the device."""
48
49 _NAME = ds_constants.DEVICE_SKU_LABEL
50
51 def generate_labels(self, host):
52 device_sku = host.host_info_store.get().device_sku
53 if device_sku:
54 return [device_sku]
55
56 mosys_cmd = 'mosys platform sku'
57 result = host.run(command=mosys_cmd, ignore_status=True)
58 if result.exit_status == 0:
59 return [result.stdout.strip()]
60
61 return []
62
Eshwar Narayan871a2c02020-02-06 11:15:24 -080063 def update_for_task(self, task_name):
64 # This label is stored in the lab config, so only deploy tasks update it
65 # or when no task name is mentioned.
66 return task_name in (DEPLOY_TASK_NAME, '')
67
C Shapirobe0ff8d2019-06-14 10:41:43 -060068
Ned Nguyene0a619d2019-07-01 15:50:23 -060069class BrandCodeLabel(base_label.StringPrefixLabel):
70 """Determine the correct brand_code (aka RLZ-code) for the device."""
71
72 _NAME = ds_constants.BRAND_CODE_LABEL
73
74 def generate_labels(self, host):
75 brand_code = host.host_info_store.get().brand_code
76 if brand_code:
77 return [brand_code]
78
Greg Edelston7cea0c42019-11-26 15:17:22 -070079 cros_config_cmd = 'cros_config / brand-code'
80 result = host.run(command=cros_config_cmd, ignore_status=True)
Ned Nguyene0a619d2019-07-01 15:50:23 -060081 if result.exit_status == 0:
82 return [result.stdout.strip()]
83
84 return []
85
86
Shijin Abrahamc09587d2020-02-14 20:46:55 -080087class BluetoothPeerLabel(base_label.StringPrefixLabel):
88 """Return the Bluetooth peer labels.
89
90 working_bluetooth_btpeer label is applied if a Raspberry Pi Bluetooth peer
91 is detected.There can be up to 4 Bluetooth peers. Labels
92 working_bluetooth_btpeer:[1-4] will be assigned depending on the number of
93 peers present.
94
95 """
96
97 _NAME = 'working_bluetooth_btpeer'
98
99 def exists(self, host):
100 return len(host._btpeer_host_list) > 0
101
102 def generate_labels(self, host):
103 labels_list = []
104 count = 1
105
106 for (btpeer, btpeer_host) in \
107 zip(host.btpeer_list, host._btpeer_host_list):
108 try:
109 # Initialize one device type to make sure the peer is working
110 bt_hid_device = btpeer.get_bluetooth_hid_mouse()
111 if bt_hid_device.CheckSerialConnection():
112 labels_list.append(str(count))
113 count += 1
114 except Exception as e:
115 logging.error('Error with initializing bt_hid_mouse on '
116 'btpeer %s %s', btpeer_host.hostname, e)
117
118 logging.info('Bluetooth Peer labels are %s', labels_list)
119 return labels_list
120
121 def update_for_task(self, task_name):
Shijin Abraham76bc1db2020-03-06 10:52:10 -0800122 # This label is stored in the state config, so only repair tasks update
123 # it or when no task name is mentioned.
124 return task_name in (REPAIR_TASK_NAME, '')
Shijin Abrahamc09587d2020-02-14 20:46:55 -0800125
Kevin Chenga2619dc2016-03-28 11:42:08 -0700126
Mary Ruthven935ebad2018-06-13 16:13:20 -0700127class Cr50Label(base_label.StringPrefixLabel):
Mary Ruthven6c462642019-09-17 19:13:36 -0700128 """Label indicating the cr50 image type."""
Mary Ruthven935ebad2018-06-13 16:13:20 -0700129
130 _NAME = 'cr50'
131
132 def __init__(self):
133 self.ver = None
134
Mary Ruthven935ebad2018-06-13 16:13:20 -0700135 def exists(self, host):
136 # Make sure the gsctool version command runs ok
137 self.ver = host.run('gsctool -a -f', ignore_status=True)
138 return self.ver.exit_status == 0
139
Mary Ruthven6c462642019-09-17 19:13:36 -0700140 def _get_version(self, region):
141 """Get the version number of the given region"""
142 return re.search(region + ' (\d+\.\d+\.\d+)', self.ver.stdout).group(1)
Mary Ruthven935ebad2018-06-13 16:13:20 -0700143
144 def generate_labels(self, host):
145 # Check the major version to determine prePVT vs PVT
Mary Ruthven6c462642019-09-17 19:13:36 -0700146 version = self._get_version('RW')
147 major_version = int(version.split('.')[1])
Mary Ruthven935ebad2018-06-13 16:13:20 -0700148 # PVT images have a odd major version prePVT have even
Mary Ruthven6c462642019-09-17 19:13:36 -0700149 return ['pvt' if (major_version % 2) else 'prepvt']
150
Xixuan Wu61b2b262020-03-06 10:09:55 -0800151 def update_for_task(self, task_name):
152 # This label is stored in the state config, so only repair tasks update
153 # it or when no task name is mentioned.
154 return task_name in (REPAIR_TASK_NAME, '')
155
Mary Ruthven6c462642019-09-17 19:13:36 -0700156
157class Cr50RWKeyidLabel(Cr50Label):
158 """Label indicating the cr50 RW version."""
159 _REGION = 'RW'
160 _NAME = 'cr50-rw-keyid'
161
162 def _get_keyid_info(self, region):
163 """Get the keyid of the given region."""
164 match = re.search('keyids:.*%s (\S+)' % region, self.ver.stdout)
165 keyid = match.group(1).rstrip(',')
166 is_prod = int(keyid, 16) & (1 << 2)
167 return [keyid, 'prod' if is_prod else 'dev']
168
169 def generate_labels(self, host):
170 """Get the key type."""
171 return self._get_keyid_info(self._REGION)
172
173
174class Cr50ROKeyidLabel(Cr50RWKeyidLabel):
175 """Label indicating the RO key type."""
176 _REGION = 'RO'
177 _NAME = 'cr50-ro-keyid'
178
179
Kevin Chenga2619dc2016-03-28 11:42:08 -0700180class ChameleonLabel(base_label.BaseLabel):
181 """Determine if a Chameleon is connected to this host."""
182
183 _NAME = 'chameleon'
184
185 def exists(self, host):
Xixuan Wu7afb54f2019-09-17 11:45:20 -0700186 # See crbug.com/1004500#2 for details.
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800187 has_chameleon = host._chameleon_host is not None
Gregory Nisbetb2f6d792019-09-11 14:30:47 -0700188 # TODO(crbug.com/995900) -- debug why chameleon label is flipping
189 try:
190 logging.info("has_chameleon %s", has_chameleon)
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800191 logging.info("_chameleon_host %s",
192 getattr(host, "_chameleon_host", "NO_ATTRIBUTE"))
193 logging.info("chameleon %s",
194 getattr(host, "chameleon", "NO_ATTRIBUTE"))
Gregory Nisbetb2f6d792019-09-11 14:30:47 -0700195 except:
196 pass
197 return has_chameleon
198
Eshwar Narayan871a2c02020-02-06 11:15:24 -0800199 def update_for_task(self, task_name):
200 # This label is stored in the state config, so only repair tasks update
201 # it or when no task name is mentioned.
202 return task_name in (REPAIR_TASK_NAME, '')
Kevin Chenga2619dc2016-03-28 11:42:08 -0700203
204
205class ChameleonConnectionLabel(base_label.StringPrefixLabel):
206 """Return the Chameleon connection label."""
207
208 _NAME = 'chameleon'
209
210 def exists(self, host):
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800211 return host._chameleon_host is not None
Joseph Hwangeac44312016-08-31 12:08:38 +0800212
Kevin Chenga2619dc2016-03-28 11:42:08 -0700213 def generate_labels(self, host):
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800214 return [host.chameleon.get_label()]
Kevin Chenga2619dc2016-03-28 11:42:08 -0700215
Eshwar Narayan871a2c02020-02-06 11:15:24 -0800216 def update_for_task(self, task_name):
217 # This label is stored in the lab config, so only deploy tasks update it
218 # or when no task name is mentioned.
219 return task_name in (DEPLOY_TASK_NAME, '')
220
Kevin Chenga2619dc2016-03-28 11:42:08 -0700221
Joseph Hwangeac44312016-08-31 12:08:38 +0800222class ChameleonPeripheralsLabel(base_label.StringPrefixLabel):
223 """Return the Chameleon peripherals labels.
224
225 The 'chameleon:bt_hid' label is applied if the bluetooth
226 classic hid device, i.e, RN-42 emulation kit, is detected.
227
228 Any peripherals plugged into the chameleon board would be
229 detected and applied proper labels in this class.
230 """
231
232 _NAME = 'chameleon'
233
234 def exists(self, host):
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800235 return host._chameleon_host is not None
Joseph Hwangeac44312016-08-31 12:08:38 +0800236
237 def generate_labels(self, host):
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800238 labels = []
239 try:
240 bt_hid_device = host.chameleon.get_bluetooth_hid_mouse()
241 if bt_hid_device.CheckSerialConnection():
242 labels.append('bt_hid')
243 except:
244 logging.error('Error with initializing bt_hid_mouse')
howardchung83e55272019-08-08 14:08:05 +0800245
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800246 try:
247 ble_hid_device = host.chameleon.get_ble_mouse()
248 if ble_hid_device.CheckSerialConnection():
249 labels.append('bt_ble_hid')
250 except:
251 logging.error('Error with initializing ble_hid_mouse')
howardchung83e55272019-08-08 14:08:05 +0800252
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800253 try:
254 bt_a2dp_sink = host.chameleon.get_bluetooth_a2dp_sink()
255 if bt_a2dp_sink.CheckSerialConnection():
256 labels.append('bt_a2dp_sink')
257 except:
258 logging.error('Error with initializing bt_a2dp_sink')
howardchung83e55272019-08-08 14:08:05 +0800259
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800260 try:
Joseph Hwang94044ea2020-01-03 14:47:43 +0800261 bt_audio_device = host.chameleon.get_bluetooth_audio()
262 if bt_audio_device.IsDetected():
263 labels.append('bt_audio')
264 except:
265 logging.error('Error in detecting bt_audio')
266
267 try:
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800268 bt_base_device = host.chameleon.get_bluetooth_base()
269 if bt_base_device.IsDetected():
270 labels.append('bt_base')
271 except:
272 logging.error('Error in detecting bt_base')
howardchung83e55272019-08-08 14:08:05 +0800273
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800274 if labels != []:
275 labels.append('bt_peer')
Joseph Hwang89e779c2019-12-24 16:05:56 +0800276
Shijin Abraham783a7dd2020-02-14 15:36:11 -0800277 logging.info('Chameleon Bluetooth labels are %s', labels)
278 return labels
Shijin Abrahamff61ac32019-05-20 12:35:44 -0700279
Eshwar Narayan871a2c02020-02-06 11:15:24 -0800280 def update_for_task(self, task_name):
281 # This label is stored in the lab config, so only deploy tasks update it
282 # or when no task name is mentioned.
283 return task_name in (DEPLOY_TASK_NAME, '')
Joseph Hwangeac44312016-08-31 12:08:38 +0800284
285
Kevin Chenga2619dc2016-03-28 11:42:08 -0700286class AudioLoopbackDongleLabel(base_label.BaseLabel):
287 """Return the label if an audio loopback dongle is plugged in."""
288
289 _NAME = 'audio_loopback_dongle'
290
291 def exists(self, host):
Gregory Nisbete280ea22019-08-16 17:50:03 -0700292 # Based on crbug.com/991285, AudioLoopbackDongle sometimes flips.
293 # Ensure that AudioLoopbackDongle.exists returns True
294 # forever, after it returns True *once*.
295 if self._cached_exists(host):
296 # If the current state is True, return it, don't run the command on
297 # the DUT and potentially flip the state.
298 return True
299 # If the current state is not True, run the command on
300 # the DUT. The new state will be set to whatever the command
301 # produces.
302 return self._host_run_exists(host)
303
304 def _cached_exists(self, host):
305 """Get the state of AudioLoopbackDongle in the data store"""
306 info = host.host_info_store.get()
307 for label in info.labels:
308 if label.startswith(self._NAME):
309 return True
310 return False
311
312 def _host_run_exists(self, host):
313 """Detect presence of audio_loopback_dongle by physically
314 running a command on the DUT."""
Kevin Chenga2619dc2016-03-28 11:42:08 -0700315 nodes_info = host.run(command=cras_utils.get_cras_nodes_cmd(),
316 ignore_status=True).stdout
317 if (cras_utils.node_type_is_plugged('HEADPHONE', nodes_info) and
318 cras_utils.node_type_is_plugged('MIC', nodes_info)):
Otabek Kasimovcefc0d12020-02-07 17:13:52 -0800319 return True
Kevin Chenga2619dc2016-03-28 11:42:08 -0700320 return False
321
Eshwar Narayan871a2c02020-02-06 11:15:24 -0800322 def update_for_task(self, task_name):
323 # This label is stored in the state config, so only repair tasks update
324 # it or when no task name is mentioned.
325 return task_name in (REPAIR_TASK_NAME, '')
326
Kevin Chenga2619dc2016-03-28 11:42:08 -0700327
Otabek Kasimov43185912020-03-11 16:01:52 -0700328class ServoTypeLabel(base_label.StringPrefixLabel):
Otabek Kasimove7565282020-04-14 13:26:12 -0700329 _NAME = servo_constants.SERVO_TYPE_LABEL_PREFIX
Otabek Kasimov43185912020-03-11 16:01:52 -0700330
331 def generate_labels(self, host):
332 info = host.host_info_store.get()
333
334 servo_type = self._get_from_labels(info)
335 if servo_type != '':
Otabek Kasimov1b67c002020-04-15 13:27:38 -0700336 logging.info("Using servo_type: %s from cache!", servo_type)
Otabek Kasimov43185912020-03-11 16:01:52 -0700337 return [servo_type]
338
339 if host.servo is not None:
340 try:
341 servo_type = host.servo.get_servo_version()
342 if servo_type != '':
343 return [servo_type]
Otabek Kasimov1b67c002020-04-15 13:27:38 -0700344 logging.warning('Cannot collect servo_type from servo'
345 ' by `dut-control servo_type`! Please file a bug'
346 ' and inform infra team as we are not expected '
347 ' to reach this point.')
Otabek Kasimov43185912020-03-11 16:01:52 -0700348 except Exception as e:
349 # We don't want fail the label and break DUTs here just
350 # because of servo issue.
351 logging.error("Failed to update servo_type, %s", str(e))
352 return []
353
354 def _get_from_labels(self, info):
355 prefix = self._NAME + ':'
356 for label in info.labels:
357 if label.startswith(prefix):
358 suffix_length = len(prefix)
359 return label[suffix_length:]
360 return ''
361
362 def update_for_task(self, task_name):
363 # This label is stored in the lab config,
364 # only deploy and repair tasks update it
365 # or when no task name is mentioned.
Otabek Kasimove7908f52020-05-05 18:13:33 -0700366 return task_name in (DEPLOY_TASK_NAME, '')
Otabek Kasimov43185912020-03-11 16:01:52 -0700367
368
Xixuan Wu78569d02019-09-15 16:08:25 -0700369def _parse_hwid_labels(hwid_info_list):
370 if len(hwid_info_list) == 0:
371 return hwid_info_list
372
373 res = []
374 # See crbug.com/997816#c7 for details of two potential formats of returns
375 # from HWID server.
376 if isinstance(hwid_info_list[0], dict):
377 # Format of hwid_info:
378 # [{u'name': u'sku', u'value': u'xxx'}, ..., ]
379 for hwid_info in hwid_info_list:
380 value = hwid_info.get('value', '')
381 name = hwid_info.get('name', '')
382 # There should always be a name but just in case there is not.
383 if name:
384 new_label = name if not value else '%s:%s' % (name, value)
385 res.append(new_label)
386 else:
387 # Format of hwid_info:
388 # [<DUTLabel name: 'sku' value: u'xxx'>, ..., ]
389 for hwid_info in hwid_info_list:
390 new_label = str(hwid_info)
391 logging.info('processing hwid label: %s', new_label)
392 res.append(new_label)
393
394 return res
395
396
Kevin Cheng80ad5732016-03-31 16:01:56 -0700397class HWIDLabel(base_label.StringLabel):
398 """Return all the labels generated from the hwid."""
399
400 # We leave out _NAME because hwid_lib will generate everything for us.
401
402 def __init__(self):
403 # Grab the key file needed to access the hwid service.
404 self.key_file = global_config.global_config.get_config_value(
405 'CROS', 'HWID_KEY', type=str)
406
407
Gregory Nisbetfb68a1f2019-08-22 10:27:33 -0700408 @staticmethod
409 def _merge_hwid_label_lists(new, old):
410 """merge a list of old and new values for hwid_labels.
411 preferring new values if available
412
413 @returns: list of labels"""
414 # TODO(gregorynisbet): what is the appropriate way to merge
415 # old and new information?
416 retained = set(x for x in old)
417 for label in new:
418 key, sep, value = label.partition(':')
419 # If we have a key-value key such as variant:aaa,
420 # then we remove all the old labels with the same key.
421 if sep:
422 retained = set(x for x in retained if (not x.startswith(key + ':')))
423 return list(sorted(retained.union(new)))
424
425
426 def _hwid_label_names(self):
427 """get the labels that hwid_lib controls.
428
429 @returns: hwid_labels
430 """
431 all_hwid_labels, _ = self.get_all_labels()
432 # If and only if get_all_labels was unsuccessful,
433 # it will return a falsey value.
Gregory Nisbetbfd120f2019-09-04 14:49:46 -0700434 out = all_hwid_labels or HWID_LABELS_FALLBACK
435
436 # TODO(gregorynisbet): remove this
437 # TODO(crbug.com/999785)
438 if "sku" not in out:
439 logging.info("sku-less label names %s", out)
440
441 return out
Gregory Nisbetfb68a1f2019-08-22 10:27:33 -0700442
443
444 def _old_label_values(self, host):
445 """get the hwid_lib labels on previous run
446
447 @returns: hwid_labels"""
448 out = []
449 info = host.host_info_store.get()
450 for hwid_label in self._hwid_label_names():
451 for label in info.labels:
452 # NOTE: we want *all* the labels starting
453 # with this prefix.
454 if label.startswith(hwid_label):
455 out.append(label)
456 return out
457
458
Kevin Cheng80ad5732016-03-31 16:01:56 -0700459 def generate_labels(self, host):
Gregory Nisbetfb68a1f2019-08-22 10:27:33 -0700460 # use previous values as default
461 old_hwid_labels = self._old_label_values(host)
Xixuan Wue63f8352019-09-13 15:18:03 -0700462 logging.info("old_hwid_labels: %r", old_hwid_labels)
Kevin Cheng80ad5732016-03-31 16:01:56 -0700463 hwid = host.run_output('crossystem hwid').strip()
Gregory Nisbetfb68a1f2019-08-22 10:27:33 -0700464 hwid_info_list = []
465 try:
466 hwid_info_response = hwid_lib.get_hwid_info(
467 hwid=hwid,
468 info_type=hwid_lib.HWID_INFO_LABEL,
469 key_file=self.key_file,
470 )
Xixuan Wue63f8352019-09-13 15:18:03 -0700471 logging.info("hwid_info_response: %r", hwid_info_response)
Gregory Nisbetfb68a1f2019-08-22 10:27:33 -0700472 hwid_info_list = hwid_info_response.get('labels', [])
473 except hwid_lib.HwIdException as e:
474 logging.info("HwIdException: %s", e)
Kevin Cheng80ad5732016-03-31 16:01:56 -0700475
Xixuan Wu78569d02019-09-15 16:08:25 -0700476 new_hwid_labels = _parse_hwid_labels(hwid_info_list)
477 logging.info("new HWID labels: %r", new_hwid_labels)
Gregory Nisbetbfd120f2019-09-04 14:49:46 -0700478
Gregory Nisbetfb68a1f2019-08-22 10:27:33 -0700479 return HWIDLabel._merge_hwid_label_lists(
480 old=old_hwid_labels,
Xixuan Wu78569d02019-09-15 16:08:25 -0700481 new=new_hwid_labels,
Gregory Nisbetfb68a1f2019-08-22 10:27:33 -0700482 )
Kevin Cheng80ad5732016-03-31 16:01:56 -0700483
484
485 def get_all_labels(self):
486 """We need to try all labels as a prefix and as standalone.
487
488 We don't know for sure which labels are prefix labels and which are
489 standalone so we try all of them as both.
490 """
491 all_hwid_labels = []
492 try:
493 all_hwid_labels = hwid_lib.get_all_possible_dut_labels(
494 self.key_file)
495 except IOError:
496 logging.error('Can not open key file: %s', self.key_file)
497 except hwid_lib.HwIdException as e:
498 logging.error('hwid service: %s', e)
499 return all_hwid_labels, all_hwid_labels
500
501
Kevin Chenga2619dc2016-03-28 11:42:08 -0700502CROS_LABELS = [
Eshwar Narayanf46904c2020-02-11 17:57:31 -0800503 AudioLoopbackDongleLabel(), #STATECONFIG
Shijin Abraham76bc1db2020-03-06 10:52:10 -0800504 BluetoothPeerLabel(), #STATECONFIG
Eshwar Narayanf46904c2020-02-11 17:57:31 -0800505 ChameleonConnectionLabel(), #LABCONFIG
506 ChameleonLabel(), #STATECONFIG
507 ChameleonPeripheralsLabel(), #LABCONFIG
Kevin Chenga2619dc2016-03-28 11:42:08 -0700508 common_label.OSLabel(),
Eshwar Narayanf46904c2020-02-11 17:57:31 -0800509 DeviceSkuLabel(), #LABCONFIG
Kevin Cheng80ad5732016-03-31 16:01:56 -0700510 HWIDLabel(),
Otabek Kasimov43185912020-03-11 16:01:52 -0700511 ServoTypeLabel(), #LABCONFIG
Xixuan Wu457b4ac2020-03-02 14:39:08 -0800512 # Temporarily add back as there's no way to reference cr50 configs.
513 # See crbug.com/1057145 for the root cause.
514 # See crbug.com/1057719 for future tracking.
515 Cr50Label(),
516 Cr50ROKeyidLabel(),
Kevin Chenga2619dc2016-03-28 11:42:08 -0700517]
Garry Wange4b6d6e2019-06-17 17:08:46 -0700518
519LABSTATION_LABELS = [
Garry Wange4b6d6e2019-06-17 17:08:46 -0700520 common_label.OSLabel(),
521]