mirror of https://github.com/VLSIDA/OpenRAM.git
Add unit test times to output.
This commit is contained in:
parent
e681806f0d
commit
b9086dbbe5
|
|
@ -12,11 +12,19 @@ from globals import OPTS
|
||||||
import debug
|
import debug
|
||||||
import pdb
|
import pdb
|
||||||
import traceback
|
import traceback
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
class openram_test(unittest.TestCase):
|
class openram_test(unittest.TestCase):
|
||||||
""" Base unit test that we have some shared classes in. """
|
""" Base unit test that we have some shared classes in. """
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
self.start_time = time.time()
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
duration = time.time() - self.start_time
|
||||||
|
print('%s: %.3fs' % (self.id(), duration))
|
||||||
|
|
||||||
def fail(self, msg):
|
def fail(self, msg):
|
||||||
import inspect
|
import inspect
|
||||||
s = inspect.stack()
|
s = inspect.stack()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue