diff options
Diffstat (limited to 'resources/tools/presentation')
-rw-r--r-- | resources/tools/presentation/generator_files.py | 22 | ||||
-rw-r--r-- | resources/tools/presentation/input_data_files.py | 5 | ||||
-rw-r--r-- | resources/tools/presentation/pal.py | 78 | ||||
-rw-r--r-- | resources/tools/presentation/specification.yaml | 2 |
4 files changed, 56 insertions, 51 deletions
diff --git a/resources/tools/presentation/generator_files.py b/resources/tools/presentation/generator_files.py index ef7ebea968..1247924cdf 100644 --- a/resources/tools/presentation/generator_files.py +++ b/resources/tools/presentation/generator_files.py @@ -108,13 +108,23 @@ def file_test_results(file_spec, input_data): for suite_longname, suite in suites.iteritems(): if len(suite_longname.split(".")) <= file_spec["data-start-level"]: continue - file_handler.write("\n{0}\n{1}\n".format( - suite["name"], get_rst_title_char( - suite["level"] - file_spec["data-start-level"] - 1) * - len(suite["name"]))) - file_handler.write("\n{0}\n".format( - suite["doc"].replace('|br|', '\n\n -'))) + + if not ("-ndrpdr" in suite["name"] or + "-mrr" in suite["name"] or + "-func" in suite["name"] or + "-device" in suite["name"]): + file_handler.write("\n{0}\n{1}\n".format( + suite["name"], get_rst_title_char( + suite["level"] - file_spec["data-start-level"] - 1) * + len(suite["name"]))) + if _tests_in_suite(suite["name"], tests): + file_handler.write("\n{0}\n{1}\n".format( + suite["name"], get_rst_title_char( + suite["level"] - file_spec["data-start-level"] - 1) * + len(suite["name"]))) + file_handler.write("\n{0}\n".format( + suite["doc"].replace('|br|', '\n\n -'))) for tbl_file in table_lst: if suite["name"] in tbl_file: file_handler.write( diff --git a/resources/tools/presentation/input_data_files.py b/resources/tools/presentation/input_data_files.py index d90f113edb..a1ab2432a6 100644 --- a/resources/tools/presentation/input_data_files.py +++ b/resources/tools/presentation/input_data_files.py @@ -16,7 +16,6 @@ Download all data. """ import re -import logging from os import rename, mkdir from os.path import join @@ -182,13 +181,9 @@ def download_and_unzip_data_file(spec, job, build, pid, log): format(job=job, sep=SEPARATOR, build=build["build"], name=file_name)) - logging.info(new_name) - # Download the file from the defined source (Jenkins, logs.fd.io): success = _download_file(url, new_name, log) - logging.info("{}: {}".format(url, success)) - if success and new_name.endswith(".zip"): if not is_zipfile(new_name): success = False diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py index 211f24d4d8..72493cb0d3 100644 --- a/resources/tools/presentation/pal.py +++ b/resources/tools/presentation/pal.py @@ -94,45 +94,45 @@ def main(): return 1 ret_code = 1 - # try: - env = Environment(spec.environment, args.force) - env.set_environment() - - prepare_static_content(spec) - - data = InputData(spec) - data.download_and_parse_data(repeat=2) - - generate_tables(spec, data) - generate_plots(spec, data) - generate_files(spec, data) - - if spec.output["output"] == "report": - generate_report(args.release, spec, args.version) - logging.info("Successfully finished.") - elif spec.output["output"] == "CPTA": - sys.stdout.write(generate_cpta(spec, data)) - alert = Alerting(spec) - alert.generate_alerts() - logging.info("Successfully finished.") - ret_code = 0 - - # except AlertingError as err: - # logging.critical("Finished with an alerting error.") - # logging.critical(repr(err)) - # except PresentationError as err: - # logging.critical("Finished with an PAL error.") - # logging.critical(repr(err)) - # except (KeyError, ValueError) as err: - # logging.critical("Finished with an error.") - # logging.critical(repr(err)) - # except Exception as err: - # logging.critical("Finished with an unexpected error.") - # logging.critical(repr(err)) - # finally: - # if spec is not None: - # clean_environment(spec.environment) - # return ret_code + try: + env = Environment(spec.environment, args.force) + env.set_environment() + + prepare_static_content(spec) + + data = InputData(spec) + data.download_and_parse_data(repeat=2) + + generate_tables(spec, data) + generate_plots(spec, data) + generate_files(spec, data) + + if spec.output["output"] == "report": + generate_report(args.release, spec, args.version) + logging.info("Successfully finished.") + elif spec.output["output"] == "CPTA": + sys.stdout.write(generate_cpta(spec, data)) + alert = Alerting(spec) + alert.generate_alerts() + logging.info("Successfully finished.") + ret_code = 0 + + except AlertingError as err: + logging.critical("Finished with an alerting error.") + logging.critical(repr(err)) + except PresentationError as err: + logging.critical("Finished with an PAL error.") + logging.critical(repr(err)) + except (KeyError, ValueError) as err: + logging.critical("Finished with an error.") + logging.critical(repr(err)) + except Exception as err: + logging.critical("Finished with an unexpected error.") + logging.critical(repr(err)) + finally: + if spec is not None: + clean_environment(spec.environment) + return ret_code if __name__ == '__main__': diff --git a/resources/tools/presentation/specification.yaml b/resources/tools/presentation/specification.yaml index fc245838a0..95139a1939 100644 --- a/resources/tools/presentation/specification.yaml +++ b/resources/tools/presentation/specification.yaml @@ -2511,7 +2511,7 @@ - type: "table" title: "Detailed Test Results - VPP Performance Results 2n-dnv" - algorithm: "table_merged_details" + algorithm: "table_details" output-file-ext: ".csv" output-file: "{DIR[DTR,PERF,VPP,2N,DNV]}/vpp_performance_results_2n_dnv" columns: |