aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/input_data_parser.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-05-02 15:20:38 +0200
committerTibor Frank <tifrank@cisco.com>2018-05-02 13:26:35 +0000
commit86c46a9529acd5e204961c67ee2f5df01730186e (patch)
tree9eddbb4417054b4c6322d961b68eba8f4159417b /resources/tools/presentation/input_data_parser.py
parentdcd243002c523ca107be9403d65e1bcb6e3881b7 (diff)
Report: Delete xml file when parsed
Change-Id: Ie28c3f3fb58a76ada1cf292ba4c8a401d0ec7155 Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit 9d9b972b994fc8da54c47e3e9a2ef284776c3f52)
Diffstat (limited to 'resources/tools/presentation/input_data_parser.py')
-rw-r--r--resources/tools/presentation/input_data_parser.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py
index 18fea3e3a4..0ad07a95db 100644
--- a/resources/tools/presentation/input_data_parser.py
+++ b/resources/tools/presentation/input_data_parser.py
@@ -27,6 +27,7 @@ from robot.api import ExecutionResult, ResultVisitor
from robot import errors
from collections import OrderedDict
from string import replace
+from os import remove
class ExecutionChecker(ResultVisitor):
@@ -794,7 +795,17 @@ class InputData(object):
format(build["build"]))
logging.info(" Processing the file '{0}'".
format(build["file-name"]))
+
data = InputData._parse_tests(job, build)
+
+ logging.info(" Removing the file '{0}'".
+ format(build["file-name"]))
+ try:
+ remove(build["file-name"])
+ build["status"] = "processed"
+ except OSError as err:
+ logging.error(" Cannot remove the file '{0}': {1}".
+ format(build["file-name"], err))
if data is None:
logging.error("Input data file from the job '{job}', build "
"'{build}' is damaged. Skipped.".