faft: Add EC related client attribute
To determine if an EC test can run on a device, we need information
about EC on the device. Let's add this to FAFT client attribute.
BUG=chrome-os-partner:11629
TEST=none
Change-Id: Ide85e33243dcae1953a105665ba37721a143aec1
Reviewed-on: https://gerrit.chromium.org/gerrit/28055
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
diff --git a/server/cros/faft_client_attribute.py b/server/cros/faft_client_attribute.py
index bebffdd..e13f090 100644
--- a/server/cros/faft_client_attribute.py
+++ b/server/cros/faft_client_attribute.py
@@ -6,7 +6,9 @@
"""Class that tests platform name and gives client machine attributes."""
version = 1
- DEFAULT_SETTING = {'keyboard_dev': True}
+ DEFAULT_SETTING = {'keyboard_dev': True,
+ 'chrome_ec': False,
+ 'ec_capability': list()}
def __init__(self, platform):
"""Initialized.
@@ -26,4 +28,15 @@
'Stumpy', 'ZGB']:
setting['keyboard_dev'] = False
+ if platform in ['Link', 'Snow']:
+ setting['chrome_ec'] = True
+
+ if platform == 'Link':
+ setting['ec_capability'] = ['adc_ectemp', 'battery', 'charging',
+ 'keyboard', 'lid', 'x86', 'thermal',
+ 'usb']
+ elif platform == 'Snow':
+ setting['ec_capability'] = ['battery', 'charging', 'keyboard',
+ 'lid', 'arm']
+
return setting