aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2015-06-15 11:12:55 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2015-06-16 09:10:28 +0200
commitfd9979ed8948962b501c00e4078d21fae3f257d6 (patch)
treed644659fe4b4d8e8f9b2dcfee83bda827f85163d /testcases
parent8f29fea7af25c86133378a43790dd346d233aa01 (diff)
modify functest config to prepare result folder
JIRA: FUNCTEST-9 Change-Id: I7ff1452da27dc904f349bcbefbc43a480a3e8843 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'testcases')
-rw-r--r--testcases/config_functest.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/testcases/config_functest.py b/testcases/config_functest.py
index 48eb279be..a106f07bc 100644
--- a/testcases/config_functest.py
+++ b/testcases/config_functest.py
@@ -53,6 +53,7 @@ REPO_PATH = args.repo_path
RALLY_DIR = REPO_PATH + functest_yaml.get("general").get("directories").get("dir_rally")
RALLY_REPO_DIR = HOME + functest_yaml.get("general").get("directories").get("dir_rally_repo")
RALLY_INSTALLATION_DIR = HOME + functest_yaml.get("general").get("directories").get("dir_rally_inst")
+RALLY_RESULT_DIR = HOME + functest_yaml.get("general").get("directories").get("dir_rally_res")
VPING_DIR = REPO_PATH + functest_yaml.get("general").get("directories").get("dir_vping")
ODL_DIR = REPO_PATH + functest_yaml.get("general").get("directories").get("dir_odl")
@@ -96,6 +97,9 @@ def action_start():
action_clean()
exit(-1)
+ # Create result folder under functest if necessary
+ if not os.path.exists(RALLY_RESULT_DIR):
+ os.makedirs(RALLY_RESULT_DIR)
logger.info("Downloading image...")
if not functest_utils.download_url(IMAGE_URL, IMAGE_DIR):
@@ -206,6 +210,11 @@ def action_clean():
cmd = "glance image-delete " + image_id
functest_utils.execute_command(cmd,logger)
+ if os.path.exists(RALLY_RESULT_DIR):
+ logger.debug("Removing Result directory")
+ shutil.rmtree(RALLY_RESULT_DIR,ignore_errors=True)
+
+
logger.info("Functest environment clean!")