aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Lahoudere <fabien.lahoudere@collabora.com>2019-11-29 11:29:05 +0100
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2019-12-06 09:24:30 +0100
commitd215df501b94ca1231e03251eacb962cc2daf8bd (patch)
tree811e066870ff6a682fcf34db802d34f1cb527513
parent91d8a7af5f6122638138b053cd0d76d0cf0d50bf (diff)
downloadcros-ec-tests-d215df501b94ca1231e03251eacb962cc2daf8bd.tar.gz
test_cros_{ec,fp,pd,tp}_abi: Check standard MCU ABI
The scripts checks the embedded controller and other MCU ABI to ensure that all required files are present. Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
-rwxr-xr-xtest-cros-ec.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/test-cros-ec.py b/test-cros-ec.py
index 8d52ef9..043507b 100755
--- a/test-cros-ec.py
+++ b/test-cros-ec.py
@@ -171,6 +171,12 @@ def sysfs_check_attributes_exists(s, path, name, files, check_devtype):
if match == 0:
s.skipTest("No " + name + " found, skipping")
+def check_mcu_abi(s, name):
+ if not os.path.exists("/dev/cros_" + name):
+ s.skipTest("MCU " + name + " not supported, skipping")
+ files = ["flashinfo", "reboot", "version"]
+ sysfs_check_attributes_exists(s, "/sys/class/chromeos/", "cros_" + name, files, False)
+
###############################################################################
# TEST RUNNERS
###############################################################################
@@ -388,6 +394,18 @@ class TestCrosEC(unittest.TestCase):
line = fd.readline()
fd.close()
+ def test_cros_ec_abi(self):
+ check_mcu_abi(self, "ec");
+
+ def test_cros_fp_abi(self):
+ check_mcu_abi(self, "fp");
+
+ def test_cros_tp_abi(self):
+ check_mcu_abi(self, "tp");
+
+ def test_cros_pd_abi(self):
+ check_mcu_abi(self, "pd");
+
if __name__ == '__main__':
unittest.main(testRunner=LavaTestRunner(),
# these make sure that some options that are not applicable