[dvsim] Add CTRL-C support
For gracefully handle ctrl-c as request at #1723
Also kill running lsf jobs
Signed-off-by: Weicai Yang <weicai@google.com>
diff --git a/util/dvsim/SimCfg.py b/util/dvsim/SimCfg.py
index e16a519..26fd431 100644
--- a/util/dvsim/SimCfg.py
+++ b/util/dvsim/SimCfg.py
@@ -93,7 +93,6 @@
self.links = {}
self.build_list = []
self.run_list = []
- self.deploy = []
self.cov_merge_deploy = None
self.cov_report_deploy = None
self.results_summary = OrderedDict()
@@ -165,6 +164,13 @@
'''
return SimCfg(flow_cfg_file, proj_root, args)
+ def kill(self):
+ '''kill running processes and jobs gracefully
+ '''
+ super().kill()
+ for item in self.cov_deploys:
+ item.kill()
+
# Purge the output directories. This operates on self.
def _purge(self):
if self.scratch_path: