aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-03-26 15:33:31 +0200
committerTibor Frank <tifrank@cisco.com>2018-03-26 15:33:31 +0200
commiteb9c66ae07b3b3cf2146ac6b4a52e5ddd4424f44 (patch)
treeabb29e793a4c0e2e95c600af75b41a22252378f9 /resources/tools
parentc046d7b7d364abcfdbdfcdbe0df970e55dc9c3f1 (diff)
Report: Detect outliers for the comparative tables
Change-Id: Ia1be590a720df71ff51e8a7ca910ed27a4642209 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools')
-rw-r--r--resources/tools/presentation/pal.py82
-rw-r--r--resources/tools/presentation/specification.yaml1
-rw-r--r--resources/tools/presentation/specification_parser.py8
3 files changed, 46 insertions, 45 deletions
diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py
index a43082df0b..98642c898c 100644
--- a/resources/tools/presentation/pal.py
+++ b/resources/tools/presentation/pal.py
@@ -87,48 +87,48 @@ def main():
return 1
ret_code = 0
- #try:
- env = Environment(spec.environment, args.force)
- env.set_environment()
-
- if spec.is_debug:
- if spec.debug["input-format"] == "zip":
- unzip_files(spec)
- else:
- download_data_files(spec)
-
- prepare_static_content(spec)
-
- data = InputData(spec)
- data.read_data()
-
- generate_tables(spec, data)
- generate_plots(spec, data)
- generate_files(spec, data)
-
- if spec.output["output"] == "report":
- generate_report(args.release, spec)
- logging.info("Successfully finished.")
- elif spec.output["output"] == "CPTA":
- sys.stdout.write(generate_cpta(spec, data))
- logging.info("Successfully finished.")
- else:
- logging.critical("The output '{0}' is not supported.".
- format(spec.output["output"]))
+ try:
+ env = Environment(spec.environment, args.force)
+ env.set_environment()
+
+ if spec.is_debug:
+ if spec.debug["input-format"] == "zip":
+ unzip_files(spec)
+ else:
+ download_data_files(spec)
+
+ prepare_static_content(spec)
+
+ data = InputData(spec)
+ data.read_data()
+
+ generate_tables(spec, data)
+ generate_plots(spec, data)
+ generate_files(spec, data)
+
+ if spec.output["output"] == "report":
+ generate_report(args.release, spec)
+ logging.info("Successfully finished.")
+ elif spec.output["output"] == "CPTA":
+ sys.stdout.write(generate_cpta(spec, data))
+ logging.info("Successfully finished.")
+ else:
+ logging.critical("The output '{0}' is not supported.".
+ format(spec.output["output"]))
+ ret_code = 1
+
+ except (KeyError, ValueError, PresentationError) as err:
+ logging.info("Finished with an error.")
+ logging.critical(str(err))
ret_code = 1
-
- # except (KeyError, ValueError, PresentationError) as err:
- # logging.info("Finished with an error.")
- # logging.critical(str(err))
- # ret_code = 1
- # except Exception as err:
- # logging.info("Finished with an unexpected error.")
- # logging.critical(str(err))
- # ret_code = 1
- # finally:
- # if spec is not None and not spec.is_debug:
- # clean_environment(spec.environment)
- # return ret_code
+ except Exception as err:
+ logging.info("Finished with an unexpected error.")
+ logging.critical(str(err))
+ ret_code = 1
+ finally:
+ if spec is not None and not spec.is_debug:
+ 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 b8ee748aab..9d51d51fae 100644
--- a/resources/tools/presentation/specification.yaml
+++ b/resources/tools/presentation/specification.yaml
@@ -627,6 +627,7 @@
-
type: "output"
+ output: "report"
format:
html:
- full
diff --git a/resources/tools/presentation/specification_parser.py b/resources/tools/presentation/specification_parser.py
index 7b7d35bffb..207507e3b6 100644
--- a/resources/tools/presentation/specification_parser.py
+++ b/resources/tools/presentation/specification_parser.py
@@ -489,10 +489,10 @@ class Specification(object):
# defined as a range <start, build_type>
build_nr = self._get_build_number(job, build_nr)
builds = [x for x in range(builds["start"], build_nr+1)]
- self._specification["input"]["builds"][job] = list()
- for build in builds:
- self._specification["input"]["builds"][job]. \
- append({"build": build, "status": None})
+ self._specification["input"]["builds"][job] = list()
+ for build in builds:
+ self._specification["input"]["builds"][job]. \
+ append({"build": build, "status": None})
else:
logging.warning("No build is defined for the job '{}'. "