summaryrefslogtreecommitdiffstats
path: root/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-01-13 14:53:33 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-01-13 14:49:01 +0000
commit3a0377b817cde0a1656000c3e733cb9a1161f0d9 (patch)
tree086a5deb6eda0ea9029eb0dc122a66679deaeb7d /testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
parent30c49f0a81d4b672aa4deedfaad4b8dc804001cb (diff)
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 <jose.lausuch@ericsson.com> (cherry picked from commit ce427331a1d220a061abcd1dbd6caac9dff9afee)
Diffstat (limited to 'testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py')
-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",