X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=functest%2Fci%2Fexec_test.sh;h=aa0cfaf7e530726ab54df9ca61fb5456c1ebe9f5;hb=9815bea4fc18de05d0e9c5700ffe046ae1ad13fd;hp=640180059c7c95220f138d21d9cd32f8ddaac38c;hpb=6dce2ff0b0bf7e5819eaca161b7e67f954479f1b;p=functest.git diff --git a/functest/ci/exec_test.sh b/functest/ci/exec_test.sh old mode 100644 new mode 100755 index 640180059..aa0cfaf7e --- a/functest/ci/exec_test.sh +++ b/functest/ci/exec_test.sh @@ -36,8 +36,8 @@ if [[ "${CI_DEBUG,,}" == "true" ]];then debug="--debug" fi -FUNCTEST_REPO_DIR=${repos_dir}/functest -FUNCTEST_TEST_DIR=${repos_dir}/functest/functest/opnfv_tests +FUNCTEST_REPO_DIR=${REPOS_DIR}/functest +FUNCTEST_TEST_DIR=${REPOS_DIR}/functest/functest/opnfv_tests FUNCTEST_CONF_DIR=/home/opnfv/functest/conf export PYTHONUNBUFFERED=1 @@ -47,11 +47,17 @@ function odl_tests(){ neutron_ip=$(openstack catalog show network | grep publicURL | cut -f3 -d"/" | cut -f1 -d":") odl_ip=${neutron_ip} odl_port=8080 + odl_restport=8181 if [ "$INSTALLER_TYPE" == "fuel" ]; then odl_port=8282 elif [ "$INSTALLER_TYPE" == "apex" ]; then odl_ip=$SDN_CONTROLLER_IP - odl_port=8181 + odl_port=8081 + odl_restport=8081 + elif [ "$INSTALLER_TYPE" == "netvirt" ]; then + odl_ip=$SDN_CONTROLLER_IP + odl_port=8081 + odl_restport=8081 elif [ "$INSTALLER_TYPE" == "joid" ]; then odl_ip=$SDN_CONTROLLER elif [ "$INSTALLER_TYPE" == "compass" ]; then @@ -61,17 +67,7 @@ function odl_tests(){ fi } -function sfc_prepare(){ - ids=($(neutron security-group-list|grep default|awk '{print $2}')) - for id in ${ids[@]}; do - if ! neutron security-group-show $id|grep "22/tcp" &>/dev/null; then - neutron security-group-rule-create --protocol tcp \ - --port-range-min 22 --port-range-max 22 --direction ingress $id - neutron security-group-rule-create --protocol tcp \ - --port-range-min 22 --port-range-max 22 --direction egress $id - fi - done -} + function run_test(){ test_name=$1 @@ -82,92 +78,32 @@ function run_test(){ case $test_name in "healthcheck") - ${FUNCTEST_TEST_DIR}/OpenStack/healthcheck/healthcheck.sh - ;; - "vping_ssh") - python ${FUNCTEST_TEST_DIR}/OpenStack/vPing/vping.py -m ssh $report - ;; - "vping_userdata") - python ${FUNCTEST_TEST_DIR}/OpenStack/vPing/vping.py -m userdata $report + ${FUNCTEST_TEST_DIR}/openstack/healthcheck/healthcheck.sh ;; "odl") odl_tests [[ "$report" == "-r" ]] && args=-p - ${FUNCTEST_TEST_DIR}/Controllers/ODL/OpenDaylightTesting.py \ - --keystoneip $keystone_ip --neutronip $neutron_ip \ - --osusername ${OS_USERNAME} --ostenantname ${OS_TENANT_NAME} \ + ${FUNCTEST_TEST_DIR}/sdn/odl/odl.py \ + --keystoneip $keystone_ip \ + --neutronip $neutron_ip \ + --odlip $odl_ip \ + --odlrestconfport $odl_restport \ + --odlwebport $odl_port \ --ospassword ${OS_PASSWORD} \ - --odlip $odl_ip --odlwebport $odl_port ${args} - ;; - "tempest_smoke_serial") - python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \ - $clean_flag -s -m smoke $report - ;; - "tempest_full_parallel") - python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \ - $serial_flag $clean_flag -m full $report - ;; - "vims") - python ${FUNCTEST_TEST_DIR}/vnf/vIMS/vIMS.py $clean_flag $report - ;; - "rally_full") - python ${FUNCTEST_TEST_DIR}/OpenStack/rally/run_rally-cert.py $clean_flag all $report - ;; - "rally_sanity") - python ${FUNCTEST_TEST_DIR}/OpenStack/rally/run_rally-cert.py \ - $clean_flag --sanity all $report - ;; - "bgpvpn") - sdnvpn_repo_dir=${repos_dir}/sdnvpn/test/functest/ - python ${sdnvpn_repo_dir}/run_tests.py $report + --ostenantname ${OS_TENANT_NAME} \ + --osusername ${OS_USERNAME} \ + ${args} ;; "onos") - python ${FUNCTEST_TEST_DIR}/Controllers/ONOS/Teston/onosfunctest.py + python ${FUNCTEST_TEST_DIR}/sdn/onos/teston/onos.py ;; "onos_sfc") - python ${FUNCTEST_TEST_DIR}/Controllers/ONOS/Teston/onosfunctest.py -t sfc - ;; - "promise") - python ${FUNCTEST_TEST_DIR}/features/promise.py $report - sleep 10 # to let the instances terminate - ;; - "doctor") - python ${FUNCTEST_TEST_DIR}/features/doctor.py $report + python ${FUNCTEST_TEST_DIR}/sdn/onos/teston/onos.py -t sfc ;; "ovno") # suite under rewritting for colorado # no need to run anything until refactoring done - # ${repos_dir}/ovno/Testcases/RunTests.sh - ;; - "security_scan") - echo "Sourcing Credentials ${FUNCTEST_CONF_DIR}/stackrc for undercloud .." - source ${FUNCTEST_CONF_DIR}/stackrc - python ${repos_dir}/securityscanning/security_scan.py --config ${repos_dir}/securityscanning/config.ini - ;; - "copper") - python ${FUNCTEST_TEST_DIR}/features/copper.py $report - ;; - "moon") - python ${repos_dir}/moon/tests/run_tests.py $report - ;; - "multisite") - python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/gen_tempest_conf.py - python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \ - $clean_flag -s -m feature_multisite $report \ - -c ${FUNCTEST_TEST_DIR}/OpenStack/tempest/tempest_multisite.conf - ;; - "domino") - python ${FUNCTEST_TEST_DIR}/features/domino.py $report - ;; - "odl-sfc") - ODL_SFC_DIR=${FUNCTEST_TEST_DIR}/features/sfc - # pass FUNCTEST_REPO_DIR inside prepare_odl_sfc.bash - FUNCTEST_REPO_DIR=${FUNCTEST_REPO_DIR} python ${ODL_SFC_DIR}/prepare_odl_sfc.py || exit $? - source ${ODL_SFC_DIR}/tackerc - python ${ODL_SFC_DIR}/sfc_colorado1.py $report - ;; - "parser") - python ${FUNCTEST_TEST_DIR}/vnf/vRNC/parser.py $report + # ${REPOS_DIR}/ovno/Testcases/RunTests.sh ;; *) echo "The test case '${test_name}' does not exist." @@ -210,13 +146,9 @@ done # Source credentials -echo "Sourcing Credentials ${FUNCTEST_CONF_DIR}/openstack.creds to run the test.." -source ${FUNCTEST_CONF_DIR}/openstack.creds +echo "Sourcing Credentials ${creds} to run the test.." +source ${creds} -# ODL Boron workaround to create additional flow rules to allow port 22 TCP -if [[ $DEPLOY_SCENARIO == *"odl_l2-sfc"* ]]; then - sfc_prepare -fi # Run test run_test $TEST