aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Lahoudere <fabien.lahoudere@collabora.com>2019-11-26 14:17:52 +0100
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2019-12-06 09:23:42 +0100
commitcca9287feb245474029b832cea5d2f525e643d6b (patch)
treebfbe69c7269bc30ac61e4427c3c5b696712765ae
parent9b9ff12d1650b8402f1c2c368ba63c795294a94a (diff)
downloadcros-ec-tests-cca9287feb245474029b832cea5d2f525e643d6b.tar.gz
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: Fabien Lahoudere <fabien.lahoudere@collabora.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
-rwxr-xr-xtest-cros-ec.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test-cros-ec.py b/test-cros-ec.py
index 415d8c7..65f0533 100755
--- a/test-cros-ec.py
+++ b/test-cros-ec.py
@@ -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")