aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci/prepare_env.py
diff options
context:
space:
mode:
authorhelenyao <yaohelan@huawei.com>2017-05-02 14:24:22 +0800
committerhelenyao <yaohelan@huawei.com>2017-05-18 15:24:07 +0800
commit0d9265dcd4ff154a500bc5a62f3f23559e3deba8 (patch)
tree0dd1fa5ffefd70a9287a5368f7706239375ed9c2 /functest/ci/prepare_env.py
parent57da7080488785813adcaff4e2410e2338dccf2a (diff)
Add a new directory to hold pre-downloaded images
Put all images in the new direcotry. If users want to use the local image, map the local directory to the ${HOME}/functest/images Change-Id: I0d309b93f52b3da23d6130056f1a19907313ef68 Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'functest/ci/prepare_env.py')
-rwxr-xr-xfunctest/ci/prepare_env.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index 9fd07958..8e17a4fc 100755
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -156,8 +156,8 @@ def create_directories():
logger.info(" %s created." %
CONST.__getattribute__('dir_functest_conf'))
else:
- logger.debug(" %s already exists."
- % CONST.__getattribute__('dir_functest_conf'))
+ logger.debug(" %s already exists." %
+ CONST.__getattribute__('dir_functest_conf'))
if not os.path.exists(CONST.__getattribute__('dir_functest_data')):
os.makedirs(CONST.__getattribute__('dir_functest_data'))
@@ -166,6 +166,13 @@ def create_directories():
else:
logger.debug(" %s already exists." %
CONST.__getattribute__('dir_functest_data'))
+ if not os.path.exists(CONST.__getattribute__('dir_functest_images')):
+ os.makedirs(CONST.__getattribute__('dir_functest_images'))
+ logger.info(" %s created." %
+ CONST.__getattribute__('dir_functest_images'))
+ else:
+ logger.debug(" %s already exists." %
+ CONST.__getattribute__('dir_functest_images'))
def source_rc_file():