From db3b1e45c47a1ef23c1ad67114a09cbec0976681 Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Thu, 25 Jun 2020 11:45:31 +0200 Subject: Solved bugs. Adapted to DB changes. --- test-cli/test/tests/qram.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'test-cli/test/tests/qram.py') diff --git a/test-cli/test/tests/qram.py b/test-cli/test/tests/qram.py index 561e980..a46424f 100644 --- a/test-cli/test/tests/qram.py +++ b/test-cli/test/tests/qram.py @@ -6,6 +6,7 @@ class Qram(unittest.TestCase): params = None __memsize = "10M" __loops = "1" + __resultlist = None # resultlist is a python list of python dictionaries # varlist: memsize, loops def __init__(self, testname, testfunc, varlist): @@ -20,15 +21,30 @@ class Qram(unittest.TestCase): else: raise Exception('loops param inside Qram must be defined') self._testMethodDoc = testname + self.__resultlist = [] def execute(self): try: p = sh.memtester(self.__memsize, "1", _out="/dev/null") except sh.ErrorReturnCode as e: + self.__resultlist.append( + { + "desc": "Test result", + "data": "FAILED: could not complete memtester command", + "type": "string" + } + ) self.fail("failed: could not complete memtester command") + # Test successful + self.__resultlist.append( + { + "desc": "Test result", + "data": "OK", + "type": "string" + } + ) + def getresults(self): - # resultlist is a python list of python dictionaries - resultlist = [] - return resultlist + return self.__resultlist -- cgit v1.1