4 # Author: Jose Lausuch (jose.lausuch@ericsson.com)
6 # Installs the Functest framework within the Docker container
7 # and run the tests automatically
11 source ${BASEDIR}/common.sh
13 if [ ! -f ${FUNCTEST_CONF_DIR}/env_active ]; then
14 error "The Functest environment is not installed. \
15 Please run prepare_env.sh before running this script...."
18 # Support for Functest offline
19 # NOTE: Still not 100% working when running the tests
21 if [ ! -z "$1" ] && [ $1 == "--offline" ]; then
27 info "Sourcing Credentials ${FUNCTEST_CONF_DIR}/openstack.creds again to run the tests.."
28 source ${FUNCTEST_CONF_DIR}/openstack.creds
32 echo "----------------------------------------------"
33 echo "---------- Running vPING test case ----------"
34 echo "----------------------------------------------"
36 python ${FUNCTEST_REPO_DIR}/testcases/vPing/CI/libraries/vPing.py --debug ${FUNCTEST_REPO_DIR}/ -r
41 echo "----------------------------------------------"
42 echo "----------- Running ODL test case -----------"
43 echo "----------------------------------------------"
44 info "Functest: run ODL suite"
45 if [ $INSTALLER_TYPE == "fuel" ]; then
46 odl_ip=$(keystone catalog --service network | grep publicURL | cut -f3 -d"/" | cut -f1 -d":")
47 neutron_ip=$(keystone catalog --service identity | grep publicURL | cut -f3 -d"/" | cut -f1 -d":")
48 usr_name=$(env | grep OS | grep OS_USERNAME | cut -f2 -d'=')
49 pass=$(env | grep OS | grep OS_PASSWORD | cut -f2 -d'=')
51 ODL_PORT=$odl_port ODL_IP=$odl_ip NEUTRON_IP=$neutron_ip USR_NAME=$usr_name PASS=$pass \
52 ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh
53 elif [ $INSTALLER_TYPE == "foreman" ]; then
55 ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh
57 error "INSTALLER_TYPE not valid."
64 echo "----------------------------------------------"
65 echo "--------- Running Rally bench suite ---------"
66 echo "----------------------------------------------"
67 info "Running Rally Bench suites"
68 python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_rally.py --debug ${FUNCTEST_REPO_DIR}/ all
73 echo "----------------------------------------------"
74 echo "-------- Running Tempest smoke tests --------"
75 echo "----------------------------------------------"
76 info "Running Tempest suite..."
77 rally verify start smoke
84 # NOTE: To be removed when all the resuls are pushed to the DB
85 info "Functest: copy results and clean Functest environment"
88 odl_logs="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/logs"
89 if [ -d ${tempest_conf} ]; then
90 cp -Rf ${odl_logs} ${FUNCTEST_CONF_DIR}/ODL/
93 # save tempest.conf for further troubleshooting
94 tempest_conf="${RALLY_VENV_DIR}/tempest/for-deployment-*/tempest.conf"
95 if [ -f ${tempest_conf} ]; then
96 cp $tempest_conf ${FUNCTEST_CONF_DIR}