PACKAGE=$1
UBUNTU=false
FAILURE=false
+FAILED_TESTS=""
PLATFORM=$(python -mplatform)
TOKEN=$(openssl rand -hex 10)
MYSQL_PASS=mysql_pass
sleep 10
}
+try () {
+ TEST_FUNCTION=$1
+ for i in {1..5}
+ do
+ FAILURE=false
+ $TEST_FUNCTION
+ if ! $FAILURE
+ then break
+ elif [ $i -eq 5 ]
+ then
+ FAILED_TESTS+="$TEST_FUNCTION "
+ fi
+ done
+}
+
check_neutron_server() {
#Execute tests
neutron $NEUTRON_AUTH net-create $FORMAT mynet1
}
check_error () {
- if $FAILURE
+ if [ "$FAILED_TESTS" != "" ]
then
grep TRACE /var/log/neutron/*
grep ERROR /var/log/neutron/*
+ echo "Failed tests are: $FAILED_TESTS"
exit 1
fi
}
setup_neutron_services
upgrade_neutron_db
start_neutron_server
- check_neutron_server
+ try check_neutron_server
check_error
;;
openstack-neutron)
setup_neutron_services
upgrade_neutron_db
start_neutron_server
- check_neutron_server
- check_neutron_l3_agent
- check_neutron_dhcp_agent
- check_neutron_metadata_agent
+ try check_neutron_server
+ try check_neutron_l3_agent
+ try check_neutron_dhcp_agent
+ try check_neutron_metadata_agent
check_error
;;
openstack-neutron-ml2)
setup_neutron_services
upgrade_neutron_db
start_neutron_server
- check_neutron_server
+ try check_neutron_server
check_error
;;
openstack-neutron-openvswitch|neutron-plugin-openvswitch-agent)
setup_neutron_services
upgrade_neutron_db
start_neutron_server
- check_neutron_openvswitch
+ try check_neutron_openvswitch
check_error
;;
python-neutronclient)
setup_neutron_services
upgrade_neutron_db
start_neutron_server
- check_neutron_l3_agent
+ try check_neutron_l3_agent
check_error
;;
neutron-dhcp-agent)
setup_neutron_services
upgrade_neutron_db
start_neutron_server
- check_neutron_dhcp_agent
+ try check_neutron_dhcp_agent
check_error
;;
neutron-metadata-agent)
setup_neutron_services
upgrade_neutron_db
start_neutron_server
- check_neutron_metadata_agent
+ try check_neutron_metadata_agent
check_error
;;
openstack-neutron-metering-agent|neutron-plugin-metering-agent)
setup_neutron_services
upgrade_neutron_db
start_neutron_server
- check_neutron_metering_agent
+ try check_neutron_metering_agent
check_error
;;
esac