Exemple #1
0
 def _log_stop(self, why):
     info = {
         'type': 'done',
         'error': str(why) if why else '',
         'end_time': now(),
     }
     self._dump(info)
Exemple #2
0
 def _log_start(self, space, env, test):
     info = {
         'type': 'start',
         'start_time': now(),
         'workspace': space.workdir,
         'log_path': space.logdir,
         'total_cases': test.count,
         'env': self._collect_env(env),
         'deps': env.query_dependencies(),
     }
     self._dump(info)
Exemple #3
0
 def log(self, data):
     msg = '|'.join([now(), json.dumps(data)]) + os.linesep
     with open(self.fname, 'a') as fp:
         fp.write(msg)
Exemple #4
0
 def log(self, msg, level="INFO"):
     self.logfile.write('%s %s: %s\n' % (now(), level, msg))
Exemple #5
0
 def _dump(self, data):
     msg = '|'.join([now(), json.dumps(data)]) + os.linesep
     with open(self.status_path, 'a') as f:
         f.write(msg)