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/vIMS/CI/vIMS.py | |
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/vIMS/CI/vIMS.py')
-rw-r--r-- | testcases/vIMS/CI/vIMS.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/testcases/vIMS/CI/vIMS.py b/testcases/vIMS/CI/vIMS.py index 05afa898b..91bec1f08 100644 --- a/testcases/vIMS/CI/vIMS.py +++ b/testcases/vIMS/CI/vIMS.py @@ -25,6 +25,9 @@ pp = pprint.PrettyPrinter(indent=4) parser = argparse.ArgumentParser() parser.add_argument("repo_path", help="Path to the repository") parser.add_argument("-d", "--debug", help="Debug mode", action="store_true") +parser.add_argument("-r", "--report", + help="Create json result file", + action="store_true") args = parser.parse_args() sys.path.append(args.repo_path + "testcases/") @@ -385,7 +388,8 @@ def test_clearwater(): except: logger.error("Unable to retrieve test results") - if vims_test_result != "": + if vims_test_result != "" & args.report: + logger.debug("Push result into DB") logger.debug("Pushing results to DB....") git_version = functest_utils.get_git_branch(args.repo_path) functest_utils.push_results_to_db(db_url=TEST_DB, case_name="vIMS", @@ -413,4 +417,4 @@ def main(): cleanup_deployments() if __name__ == '__main__': - main()
\ No newline at end of file + main() |