Example #1
0
 def on_recorder_stop(self):
     '''
     recorder stop time
     '''
     self.results.end_time = Utils.get_datetime_now()
     self.results.duration = Utils.get_date_result(self.results.begin_time, self.results.end_time)
     for suite_name in self.results.summary.keys():
         self.results.summary[suite_name].begin_time = getattr(self.results.details.get(suite_name), "begin_time")
         self.results.summary[suite_name].end_time = getattr(self.results.details.get(suite_name), "end_time")
         self.results.summary[suite_name].duration = getattr(self.results.details.get(suite_name), "duration")
Example #2
0
 def add_result_to_suite(self, result):
     '''
     add result to suite which case belong to.
     '''
     if result.case.bench_name not in self.results.suite_name:
         self.results.suite_name.append(result.case.bench_name)
         case = result.case
         suite = Detail(case.bench_name)
         suite.begin_time = result.begin_time
     else:
         # find suite here
         for suite in self.results.details.values():
             if suite.suite_name == result.case.bench_name:
                 suite = suite
                 break
     suite.end_time = result.end_time
     suite.duration = Utils.get_date_result(suite.begin_time, suite.end_time)
     suite.cases.append(result)
     self.results.details[result.case.bench_name] = suite
Example #3
0
File: result.py Project: hautof/haf
 def on_case_end(self):
     self.end_time = Utils.get_datetime_now()
     self.duration = Utils.get_date_result(self.begin_time, self.end_time)