blob: ade7aeb6f619666aedd20fefaa455bceb80ee5d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import unittest
import sh
class Qram(unittest.TestCase):
__memsize = "10M"
__loops = "1"
# varlist: memsize, loops
def __init__(self, testname, testfunc, varlist):
super(Qram, self).__init__(testfunc)
if "memsize" in varlist:
self.__memsize = varlist["memsize"]
else:
raise Exception('memsize param inside Qram must be defined')
if "loops" in varlist:
self.__loops = varlist["loops"]
else:
raise Exception('loops param inside Qram must be defined')
self._testMethodDoc = testname
def execute(self):
try:
sh.memtester(self.__memsize, "1")
except sh.ErrorReturnCode as e:
self.fail("failed: could not complete memtester command")
|