Unverified Commit ef2f229b authored by Jakob Görgen's avatar Jakob Görgen
Browse files

added simualtor cleanup_commands

parent ce2027ee
......@@ -248,6 +248,9 @@ class Simulator(utils_base.IdObj):
def checkpoint_commands(self) -> list[str]:
return []
def cleanup_commands(self) -> list[str]:
return []
@abc.abstractmethod
def supported_socket_types(self) -> set[inst_base.SockType]:
......
......@@ -90,6 +90,9 @@ class Gem5Sim(HostSim):
def checkpoint_commands(self) -> list[str]:
return ["m5 checkpoint"]
def cleanup_commands(self) -> list[str]:
return ["m5 exit"]
def run_cmd(self, inst: inst_base.Instantiation) -> str:
cpu_type = self.cpu_type
......
......@@ -105,9 +105,13 @@ class BaseLinuxHost(FullSystemHost):
def cleanup_cmds(self, inst: instantiation.Instantiation) -> list[str]:
"""Commands to run to cleanup node."""
return self._concat_app_cmds(
cmds = self._concat_app_cmds(
inst, app.BaseLinuxApplication.cleanup_cmds.__name__
)
)
sim = inst.find_sim_by_spec(spec=self)
cleanup = sim.cleanup_commands()
cmds += cleanup
return cmds
def config_files(self, inst: instantiation.Instantiation) -> dict[str, tp.IO]:
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment