summaryrefslogtreecommitdiffstats
path: root/ci/run_tests.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-05-02 11:21:34 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-05-02 12:53:12 +0200
commit56d7f7fae5cca0268239fd2b4ce48b5817abd3ae (patch)
treef81e7eebb6ba1f77666af0459327cb095b9299d5 /ci/run_tests.py
parenta1df84c2e9f4883ebc4565bbbb7f378f70eea184 (diff)
Source the credentials in run_tests.py
JIRA: FUNCTEST-227 JIRA: FUNCTEST-190 OpenStack clean was failing due to this. Change-Id: Ia4dcf084becb532f157c0924baf44bb2441f6379 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'ci/run_tests.py')
-rw-r--r--ci/run_tests.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/ci/run_tests.py b/ci/run_tests.py
index 95bc98021..3b3ed2c47 100644
--- a/ci/run_tests.py
+++ b/ci/run_tests.py
@@ -13,8 +13,9 @@ import os
import sys
import functest.ci.tier_builder as tb
-import functest.utils.functest_logger as ft_logger
import functest.utils.clean_openstack as clean_os
+import functest.utils.functest_logger as ft_logger
+import functest.utils.openstack_utils as os_utils
""" arguments """
@@ -50,6 +51,15 @@ def print_separator(str, count=45):
logger.info("%s" % line)
+def source_rc_file():
+ rc_file = os.getenv('creds')
+ if not os.path.isfile(rc_file):
+ logger.error("RC file %s does not exist..." % rc_file)
+ sys.exit(1)
+ logger.info("Sourcing the OpenStack RC file...")
+ os_utils.source_credentials(rc_file)
+
+
def cleanup():
print_separator("+")
logger.info("Cleaning OpenStack resources...")
@@ -110,6 +120,7 @@ def main():
REPORT_FLAG = True
if args.test:
+ source_rc_file()
if _tiers.get_tier(args.test):
run_tier(_tiers.get_tier(args.test))