aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-08-11 16:58:35 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-08-11 16:58:35 +0800
commite648bdc9f4f52208a44936fd8732afbe256a20c2 (patch)
tree56e0146ed89f6ac91ba14cba66983de69a221a7f /testcases
parentb1c0cd2f1a6c7c5c213d587b8fdb86ea44aa424e (diff)
add report flag to parser
parser has no report flag, every time we run the test the results will be reported to db JIRA: FUNCTEST-410 Change-Id: I6336b4c367fd8edc70e076b81d01d9356580bc22 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testcases')
-rw-r--r--testcases/vnf/vRNC/parser.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/testcases/vnf/vRNC/parser.py b/testcases/vnf/vRNC/parser.py
index d5d3f78a..9678591f 100644
--- a/testcases/vnf/vRNC/parser.py
+++ b/testcases/vnf/vRNC/parser.py
@@ -17,10 +17,17 @@
import os
import time
import yaml
+import argparse
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as functest_utils
+parser = argparse.ArgumentParser()
+parser.add_argument("-r", "--report",
+ help="Create json result file",
+ action="store_true")
+args = parser.parse_args()
+
with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
functest_yaml = yaml.safe_load(f)
@@ -51,13 +58,15 @@ def main():
status,
details)
- functest_utils.push_results_to_db(project,
- case_name,
- logger,
- start_time,
- stop_time,
- status,
- details)
+ if args.report:
+ logger.debug("Report Parser Results to DB......")
+ functest_utils.push_results_to_db(project,
+ case_name,
+ logger,
+ start_time,
+ stop_time,
+ status,
+ details)
exit(ret)
if __name__ == '__main__':