From 0d9265dcd4ff154a500bc5a62f3f23559e3deba8 Mon Sep 17 00:00:00 2001 From: helenyao Date: Tue, 2 May 2017 14:24:22 +0800 Subject: 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 --- functest/ci/prepare_env.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'functest/ci/prepare_env.py') 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(): -- cgit 1.2.3-korg