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

test_cros_ec_accel_iio_data_is_valid: Fix inexisting base_path variable

The line where base_patch was defined was dropped during merge or commit
rework.
Signed-off-by: default avatarFabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent 9b9ff12d
......@@ -266,7 +266,8 @@ class TestCrosEC(unittest.TestCase):
ACCEL_MAG_VALID_OFFSET = .25
match = 0
for devname in os.listdir("/sys/bus/iio/devices"):
fd = open("/sys/bus/iio/devices/" + devname + "/name", 'r')
base_path = "/sys/bus/iio/devices/" + devname + "/"
fd = open(base_path + "name", 'r')
devtype = fd.read()
if devtype.startswith("cros-ec-accel"):
location = read_file(base_path + "location")
......
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