aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-01-13 14:48:51 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-13 14:48:51 +0000
commitb5fbec071deb608cdba57fe1523ffc2505193249 (patch)
tree086a5deb6eda0ea9029eb0dc122a66679deaeb7d /testcases
parent4f705ea7b3f4eae366446d74e2f768c876d6cba4 (diff)
parentce427331a1d220a061abcd1dbd6caac9dff9afee (diff)
Merge "Remove arg.repo_path in run_rally_cert.py"
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",