summaryrefslogtreecommitdiff
path: root/test-cli/test/tests/qduplex_ser.py
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-07-01 10:45:34 +0200
committerHector Fernandez <hector@iatec.biz>2020-07-01 10:45:34 +0200
commit34df86b37d6838b115e65e5f3a332344afeb86b8 (patch)
tree946e1d7d6d55a4339e453c84c4fbbf4b785a1712 /test-cli/test/tests/qduplex_ser.py
parent9ac8a326412b04e4873b883c2f2a056ca0b22480 (diff)
downloadboard-34df86b37d6838b115e65e5f3a332344afeb86b8.zip
board-34df86b37d6838b115e65e5f3a332344afeb86b8.tar.gz
board-34df86b37d6838b115e65e5f3a332344afeb86b8.tar.bz2
Changes to adapt to new way to save results in DB. Created audio test. Added protections against unexpected status in DB.
Diffstat (limited to 'test-cli/test/tests/qduplex_ser.py')
-rw-r--r--test-cli/test/tests/qduplex_ser.py40
1 files changed, 3 insertions, 37 deletions
diff --git a/test-cli/test/tests/qduplex_ser.py b/test-cli/test/tests/qduplex_ser.py
index 020844a..170039b 100644
--- a/test-cli/test/tests/qduplex_ser.py
+++ b/test-cli/test/tests/qduplex_ser.py
@@ -51,23 +51,9 @@ class Qduplex(unittest.TestCase):
self.__serial1.write(test_uuid)
time.sleep(0.05) # there might be a small delay
if self.__serial2.inWaiting() == 0:
- self.__resultlist.append(
- {
- "desc": "Test result",
- "data": "FAILED: port {} wait timeout exceded".format(self.__port2),
- "type": "string"
- }
- )
self.fail("failed: port {} wait timeout exceded".format(self.__port2))
else:
if self.__serial2.readline() != test_uuid:
- self.__resultlist.append(
- {
- "desc": "Test result",
- "data": "FAILED: port {} write/read mismatch".format(self.__port2),
- "type": "string"
- }
- )
self.fail("failed: port {} write/read mismatch".format(self.__port2))
time.sleep(0.05) # there might be a small delay
@@ -81,33 +67,13 @@ class Qduplex(unittest.TestCase):
self.__serial2.write(test_uuid)
time.sleep(0.05) # there might be a small delay
if self.__serial1.inWaiting() == 0:
- self.__resultlist.append(
- {
- "desc": "Test result",
- "data": "FAILED: port {} wait timeout exceded".format(self.__port1),
- "type": "string"
- }
- )
self.fail("failed: port {} wait timeout exceded".format(self.__port1))
else:
if self.__serial1.readline() != test_uuid:
- self.__resultlist.append(
- {
- "desc": "Test result",
- "data": "FAILED: port {} write/read mismatch".format(self.__port1),
- "type": "string"
- }
- )
self.fail("failed: port {} write/read mismatch".format(self.__port1))
- # Test successful
- self.__resultlist.append(
- {
- "desc": "Test OK",
- "data": "OK",
- "type": "string"
- }
- )
-
def getresults(self):
return self.__resultlist
+
+ def gettextresult(self):
+ return ""