diff options
author | Tibor Frank <tifrank@cisco.com> | 2018-04-09 16:13:14 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2018-04-09 16:13:14 +0200 |
commit | 6ea69cafac7f15af3abc161bbc200ab2bd320e87 (patch) | |
tree | 705249ada7399b4cbae5743b25f3ee8e0df79628 /resources/tools/presentation/input_data_parser.py | |
parent | 061ea1864e550ea7f9fbc6bc2a096b2cedd94b96 (diff) |
PAL Trending: Add build date to csv and txt tables
Change-Id: I75e614b45bcf1b38709b551ba13bc6e54d2c978d
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/input_data_parser.py')
-rw-r--r-- | resources/tools/presentation/input_data_parser.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index 87d822f880..7adc9c085b 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -21,6 +21,7 @@ import re import pandas as pd import logging +import xml.etree.ElementTree as ET from robot.api import ExecutionResult, ResultVisitor from robot import errors @@ -758,6 +759,10 @@ class InputData(object): :rtype: dict """ + tree = ET.parse(build["file-name"]) + root = tree.getroot() + generated = root.attrib["generated"] + with open(build["file-name"], 'r') as data_file: try: result = ExecutionResult(data_file) @@ -765,7 +770,7 @@ class InputData(object): logging.error("Error occurred while parsing output.xml: {0}". format(err)) return None - checker = ExecutionChecker(job=job, build=build) + checker = ExecutionChecker(job=job, build=build, generated=generated) result.visit(checker) return checker.data |