Reorganize test dir to ensure test of installed pkg
This commit is contained in:
33
tests/lib/simulators/__init__.py
Normal file
33
tests/lib/simulators/__init__.py
Normal file
@@ -0,0 +1,33 @@
|
||||
from typing import Type, TYPE_CHECKING, List
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..sim_testcase import SimTestCase
|
||||
|
||||
class Simulator:
|
||||
|
||||
def __init__(self, testcase_cls: 'Type[SimTestCase]' = None, testcase_cls_inst: 'SimTestCase' = None) -> None:
|
||||
self.testcase_cls = testcase_cls
|
||||
self.testcase_cls_inst = testcase_cls_inst
|
||||
|
||||
@property
|
||||
def tb_files(self) -> List[str]:
|
||||
files = []
|
||||
files.extend(self.testcase_cls.cpuif.get_sim_files())
|
||||
files.append("regblock_pkg.sv")
|
||||
files.append("regblock.sv")
|
||||
files.append("tb.sv")
|
||||
|
||||
return files
|
||||
|
||||
def compile(self) -> None:
|
||||
raise NotImplementedError
|
||||
|
||||
def run(self, plusargs:List[str] = None) -> None:
|
||||
raise NotImplementedError
|
||||
|
||||
class StubSimulator(Simulator):
|
||||
def compile(self) -> None:
|
||||
pass
|
||||
|
||||
def run(self, plusargs:List[str] = None) -> None:
|
||||
pass
|
||||
Reference in New Issue
Block a user