Commit d215df50 authored by Fabien Lahoudere's avatar Fabien Lahoudere Committed by Enric Balletbo i Serra

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: default avatarFabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent 91d8a7af
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment