X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Finput_data_parser.py;h=cd9c1a248d61497b86981df51631b0dc224040bd;hb=2d1f2d6608bf405146497bf371d58ece3176cb12;hp=e14d8d4d6658b18be89aef40eb5272b9f6b6ece2;hpb=0c3e94ed3f70c9dcd41e55ba2c043dd134aa7333;p=csit.git diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index e14d8d4d66..cd9c1a248d 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -1100,6 +1100,7 @@ class ExecutionChecker(ResultVisitor): # Use whole list in CSIT-1180. stats = jumpavg.AvgStdevStats.for_runs(items_float) test_result[u"result"][u"receive-rate"] = stats.avg + test_result[u"result"][u"receive-stdev"] = stats.stdev else: groups = re.search(self.REGEX_MRR, test.message) test_result[u"result"][u"receive-rate"] = \ @@ -1588,11 +1589,16 @@ class InputData: :type job: str :type build_nr: int :type replace: bool - :raises: PresentationError in an error occurs. + :raises: PresentationError if an error occurs. """ if not isfile(local_file): raise PresentationError(f"The file {local_file} does not exist.") + try: + build_nr = int(local_file.split(u"/")[-1].split(u".")[0]) + except (IndexError, ValueError): + pass + build = { u"build": build_nr, u"status": u"failed", @@ -1632,7 +1638,7 @@ class InputData: def process_local_directory(self, local_dir, replace=True): """Process local directory with XML file(s). The directory is processed - as a 'job' and the XML files in in as builds. + as a 'job' and the XML files in it as builds. If the given directory contains only sub-directories, these sub-directories processed as jobs and corresponding XML files as builds of their job.