X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=resources%2Ftools%2Fpresentation%2Finput_data_parser.py;h=2416e057c86106c7339c59391b3e56f0fb30602c;hb=ac2c84d9561e2344057dc5d4173b0c7718015c4b;hp=f47f1bc6df62cc8e4ffee078f8506d7043e0746b;hpb=1fac7da55c5b6d5a5651bc3ecac8aa945de49ef8;p=csit.git diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index f47f1bc6df..2416e057c8 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -502,7 +502,7 @@ class ExecutionChecker(ResultVisitor): self._data["tests"][self._test_ID]["show-run"] = str() if self._lookup_kw_nr > 1: self._msg_type = None - if self._show_run_lookup_nr == 1: + if self._show_run_lookup_nr > 0: message = str(msg.message).replace(' ', '').replace('\n', '').\ replace("'", '"').replace('b"', '"').replace('u"', '"')[8:] runtime = loads(message) @@ -547,7 +547,8 @@ class ExecutionChecker(ResultVisitor): try: self._data["tests"][self._test_ID]["show-run"] += " |br| " self._data["tests"][self._test_ID]["show-run"] += \ - "**DUT" + str(self._lookup_kw_nr) + ":** |br| " + text + "**DUT" + str(self._show_run_lookup_nr) + ":** |br| " \ + + text except KeyError: pass @@ -1405,7 +1406,7 @@ class InputData(object): index += 1 tag_filter = tag_filter[:index] + " in tags" + tag_filter[index:] - def filter_data(self, element, params=None, data_set="tests", + def filter_data(self, element, params=None, data=None, data_set="tests", continue_on_error=False): """Filter required data from the given jobs and builds. @@ -1428,13 +1429,16 @@ class InputData(object): :param element: Element which will use the filtered data. :param params: Parameters which will be included in the output. If None, - all parameters are included. + all parameters are included. + :param data: If not None, this data is used instead of data specified + in the element. :param data_set: The set of data to be filtered: tests, suites, - metadata. + metadata. :param continue_on_error: Continue if there is error while reading the - data. The Item will be empty then + data. The Item will be empty then :type element: pandas.Series :type params: list + :type data: dict :type data_set: str :type continue_on_error: bool :returns: Filtered data. @@ -1456,9 +1460,10 @@ class InputData(object): if params: params.append("type") + data_to_filter = data if data else element["data"] data = pd.Series() try: - for job, builds in element["data"].items(): + for job, builds in data_to_filter.items(): data[job] = pd.Series() for build in builds: data[job][str(build)] = pd.Series()