From ce427331a1d220a061abcd1dbd6caac9dff9afee Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Wed, 13 Jan 2016 14:53:33 +0100 Subject: Remove arg.repo_path in run_rally_cert.py It is not needed as we have an env variable which points to the repositories directories Change-Id: I4c07e6a28a9e31a2794d74182436545fe6561a92 Signed-off-by: jose.lausuch --- testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'testcases/VIM/OpenStack/CI') diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py index 082c0cf41..a52e7f08a 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py @@ -31,7 +31,6 @@ from neutronclient.v2_0 import client as neutronclient tests = ['authenticate', 'glance', 'cinder', 'heat', 'keystone', 'neutron', 'nova', 'quotas', 'requests', 'vm', 'all'] parser = argparse.ArgumentParser() -parser.add_argument("repo_path", help="Path to the repository") parser.add_argument("test_name", help="Module name to be tested. " "Possible values are : " @@ -54,9 +53,6 @@ args = parser.parse_args() client_dict = {} -sys.path.append(args.repo_path + "testcases/") -import functest_utils - """ logging configuration """ logger = logging.getLogger("run_rally") logger.setLevel(logging.DEBUG) @@ -72,12 +68,18 @@ formatter = logging.Formatter("%(asctime)s - %(name)s - " ch.setFormatter(formatter) logger.addHandler(ch) +REPO_PATH=os.environ['repos_dir']+'/functest/' +if not os.path.exists(REPO_PATH): + logger.error("Functest repository directory not found '%s'" % REPO_PATH) + exit(-1) +sys.path.append(REPO_PATH + "testcases/") +import functest_utils + with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() HOME = os.environ['HOME']+"/" -REPO_PATH = args.repo_path ####todo: #SCENARIOS_DIR = REPO_PATH + functest_yaml.get("general"). \ # get("directories").get("dir_rally_scn") @@ -115,7 +117,7 @@ def push_results_to_db(payload): url = TEST_DB + "/results" installer = functest_utils.get_installer_type(logger) - git_version = functest_utils.get_git_branch(args.repo_path) + git_version = functest_utils.get_git_branch(REPO_PATH) pod_name = functest_utils.get_pod_name(logger) # TODO pod_name hardcoded, info shall come from Jenkins params = {"project_name": "functest", "case_name": "Rally", -- cgit 1.2.3-korg