aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/exec_test.sh2
-rw-r--r--testcases/vnf/vRNC/parser.py23
2 files changed, 17 insertions, 8 deletions
diff --git a/ci/exec_test.sh b/ci/exec_test.sh
index 97b567af..9951c097 100755
--- a/ci/exec_test.sh
+++ b/ci/exec_test.sh
@@ -173,7 +173,7 @@ function run_test(){
python ${FUNCTEST_REPO_DIR}/testcases/features/sfc/sfc.py
;;
"parser")
- python ${FUNCTEST_REPO_DIR}/testcases/vnf/vRNC/parser.py
+ python ${FUNCTEST_REPO_DIR}/testcases/vnf/vRNC/parser.py $report
;;
*)
echo "The test case '${test_name}' does not exist."
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__':