示例#1
0
 def cleanup_tempdirs(self, signum=None, frame=None):
     # delete temp files
     util.signal_logger(self.__class__.__name__, signum, frame)
     config = util_mdtf.ConfigManager()
     tmpdirs = util_mdtf.TempDirManager()
     if not config.config.get('keep_temp', False):
         tmpdirs.cleanup()
示例#2
0
 def runtime_cleanup(self, signum=None, frame=None):
     util.signal_logger(self.__class__.__name__, signum, frame)
     # kill any active subprocesses
     for p in self.pods:
         if p.log_handle is not None:
             p.log_handle.close()
         if p.process is not None:
             p.process.kill()
     exit(1)
示例#3
0
 def runtime_terminate(self, signum=None, frame=None):
     """Handler called in the event that POD execution was halted abnormally,
     by receiving  ``SIGINT`` or ``SIGTERM``.
     """
     # try to clean up everything
     util.signal_logger(self.__class__.__name__, signum, frame, log=self.case.log)
     for p in self.pods:
         util.signal_logger(self.__class__.__name__, signum, frame, log=p.pod.log)
         p.tear_down()
         p.pod.close_log_file(log=True)
     self.tear_down()
     self.case.close_log_file()
     util.exit_handler(code=1)
 def runtime_terminate(self, signum=None, frame=None):
     # try to clean up everything
     util.signal_logger(self.__class__.__name__,
                        signum,
                        frame,
                        log=self.case.log)
     for p in self.pods:
         util.signal_logger(self.__class__.__name__,
                            signum,
                            frame,
                            log=p.pod.log)
         p.tear_down()
         p.pod.close_log_file(log=True)
     self.tear_down()
     self.case.close_log_file()
     util.exit_handler(code=1)
示例#5
0
 def subprocess_cleanup(self, signum=None, frame=None):
     util.signal_logger(self.__class__.__name__, signum, frame)
     # kill any active subprocesses
     for pod in self.pods:
         if pod.process_obj is not None:
             pod.process_obj.kill()
示例#6
0
 def tempdir_cleanup_handler(self, signum=None, frame=None):
     # delete temp files
     util.signal_logger(self.__class__.__name__, signum, frame, log=_log)
     self.cleanup()