summaryrefslogtreecommitdiff
path: root/test-cli/test/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/tests')
-rw-r--r--test-cli/test/tests/qeeprom.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/test-cli/test/tests/qeeprom.py b/test-cli/test/tests/qeeprom.py
index 5bb0755..c2293c2 100644
--- a/test-cli/test/tests/qeeprom.py
+++ b/test-cli/test/tests/qeeprom.py
@@ -5,10 +5,9 @@ import unittest
class Qeeprom(unittest.TestCase):
__position = None
- __uuid = None
__eeprompath = None
- # varlist: position, uuid, eeprompath
+ # varlist: position, eeprompath
def __init__(self, testname, testfunc, varlist):
super(Qeeprom, self).__init__(testfunc)
self._testMethodDoc = testname
@@ -16,25 +15,23 @@ class Qeeprom(unittest.TestCase):
self.__position = varlist["position"]
else:
raise Exception('position param inside Qeeprom must be defined')
- if "uuid" in varlist:
- self.__uuid = varlist["uuid"]
- else:
- raise Exception('uuid param inside Qeeprom must be defined')
if "eeprompath" in varlist:
self.__eeprompath = varlist["eeprompath"]
else:
raise Exception('eeprompath param inside Qeeprom must be defined')
def execute(self):
+ # generate some data
+ data_tx = "isee_test"
# write data into the eeprom
- p = sh.dd(sh.echo(self._uuid), "of=" + self.__eeprompath, "bs=1", "seek=" + self.__position)
+ p = sh.dd(sh.echo(data_tx), "of=" + self.__eeprompath, "bs=1", "seek=" + self.__position)
if p.exit_code == 0:
# read data from the eeprom
- p = sh.dd("if=" + self.__eeprompath, "bs=1", "skip=" + self.__position, "count=" + len(self.__uuid))
+ p = sh.dd("if=" + self.__eeprompath, "bs=1", "skip=" + self.__position, "count=" + len(data_tx))
if p.exit_code == 0:
- uuid_rx = p.stdout.decode('ascii')
+ data_rx = p.stdout.decode('ascii')
# compare both values
- if (uuid_rx != self.__uuid):
+ if data_rx != data_tx:
self.fail("failed: mismatch between written and received values.")
else: