summaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
Diffstat (limited to 'testcases')
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/run_rally-cert.py14
1 files changed, 8 insertions, 6 deletions
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",