diff options
Diffstat (limited to 'test-cli/test/tests/qram.py')
-rw-r--r-- | test-cli/test/tests/qram.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test-cli/test/tests/qram.py b/test-cli/test/tests/qram.py new file mode 100644 index 0000000..8ec0210 --- /dev/null +++ b/test-cli/test/tests/qram.py @@ -0,0 +1,22 @@ +from test.helpers.syscmd import SysCommand +import unittest + +class Qram(unittest.TestCase): + + def __init__(self, testname, testfunc, memSize): + super(Qram, self).__init__(testfunc) + self.__memSize = memSize + self._testMethodDoc = testname + + def execute(self): + str_cmd= "free -m" + free_command = SysCommand("free_ram", str_cmd) + if free_command.execute() == 0: + self.__raw_out = free_command.getOutput() + if self.__raw_out == "": + return -1 + lines = free_command.getOutput().splitlines() + aux = [int(s) for s in lines[1].split() if s.isdigit()] + self.failUnless(int(aux[0])>int(self.__memSize),"failed: total ram memory size lower than expected") + else: + self.fail("failed: could not complete iperf command") |