Add new test, kernel_CrosECSysfs, to test EC accelerometers
Added a test for the sysfs interface to EC accelerometers. The test
makes sure that the sysfs interface exists and that the accelerometer
data is reasonable. The data is considered reasonable if acceleration
magnitude is near 1G.
Added a label, accel:cros-ec, to represent if the system has EC
accelerometers. The test itself has a dependency on accel:cros-ec,
so it only runs on systems with EC accelerometers. The label uses
ectool to check if EC has accelerometers.
BUG=none
TEST=Tested kernel_CrosECSysfsAccel.py on glimmer with accels.
To test that the label is assigned correctly, I used the accelerometer
detection code as part of kernel_CrosECSysfsAccel.py on glimmer, rambi,
alex, and link. I then moved detection code to cros_host.py and ran
it on glimmer and on a rambi in the lab using the following script.
After the script completed, glimmer has the accel:cros-ec label and
rambi didn't, which is correct.
import common
from autotest_lib.server.hosts import factory
host = factory.create_host('172.22.169.65')
labels = host.get_labels()
print '\n\n\nHEY\n'
print labels
Change-Id: I9695326b1187285469c30485ceca634d1c9ef63d
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/193322
Reviewed-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
3 files changed