diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2015-12-14 16:41:24 +0100 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2015-12-14 16:41:24 +0100 |
commit | 824638d3e936bdb77799203d8e1ea37c95434404 (patch) | |
tree | 6b03d926a4df5312728933b3b8d41a97730c0870 /testcases/VIM | |
parent | f7f763859d7cc870df5523952ef8b0053e93bdae (diff) |
Add a flag to push the results to the DB optionaly
By default, it will NOT push, only if specified by -r
The parameter must be taken from a Jenkins job set to TRUE
JIRA: FUNCTEST-84
Change-Id: Iee3b293e90b052b88de2d4f1d337f5ec5e3b3941
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'testcases/VIM')
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/run_tempest.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py index 2d65df42..f80f4ae3 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py @@ -28,6 +28,9 @@ parser.add_argument("repo_path", help="Path to the Functest repository") parser.add_argument("-d", "--debug", help="Debug mode", action="store_true") parser.add_argument("-m", "--mode", help="Tempest test mode [smoke, all]", default="smoke") +parser.add_argument("-r", "--report", + help="Create json result file", + action="store_true") args = parser.parse_args() @@ -131,7 +134,11 @@ def run_tempest(OPTION): "tests": int(num_tests), "failures": int(num_failures)} logger.info("Results: "+str(json_results)) pod_name = functest_utils.get_pod_name(logger) - push_results_to_db(json_results, MODE, pod_name) + + # Push results in payload of testcase + if args.report: + logger.debug("Push result into DB") + push_results_to_db(json_results, MODE, pod_name) def main(): |