fi
function clean_openstack(){
+ echo -e "\n\nCleaning Openstack environment..."
python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py \
--debug
+ echo -e "\n\n"
}
function run_test(){
test_name=$1
+ echo ""
echo "----------------------------------------------"
- echo "------------- Running $i test case "
+ echo " Running test case: $i"
echo "----------------------------------------------"
+ echo ""
case $test_name in
"vping")
info "Running vPing test..."
default_tenants = defaults_yaml.get(installer).get("tenants")
def separator():
- logger.debug("-------------------------------------------")
+ logger.info("-------------------------------------------")
def remove_instances(nova_client):
logger.info("Removing Nova instances...")
logger.error("Please source the openrc credentials and run the script again.")
exit(-1)
-
remove_instances(nova_client)
separator()
remove_images(nova_client)
script += 'bundle install'
cmd = "/bin/bash -c '" + script + "'"
- functest_utils.execute_command(cmd,logger)
+ if os.environ.get("CI_DEBUG") == "false":
+ functest_utils.execute_command(cmd)
+ else:
+ functest_utils.execute_command(cmd,logger)
# Create result folder under functest if necessary
if not os.path.exists(RALLY_RESULT_DIR):
logger.debug("Cleaning up the OpenStack deployment...")
cmd='python ' + REPO_PATH + \
- '/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py -d '
+ '/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py'
functest_utils.execute_command(cmd,logger)
logger.info("Functest environment clean!")
logger.debug("Executing %s/install_rally.sh..." %RALLY_REPO_DIR)
install_script = RALLY_REPO_DIR + "/install_rally.sh --yes"
cmd = 'sudo ' + install_script
- functest_utils.execute_command(cmd,logger)
+ if os.environ.get("CI_DEBUG") == "false":
+ functest_utils.execute_command(cmd)
+ else:
+ functest_utils.execute_command(cmd,logger)
logger.debug("Creating Rally environment...")
cmd = "rally deployment create --fromenv --name="+DEPLOYMENT_MAME