10 echo "Run all ONE tests"
12 echo This must be run with superuser privileges.
16 echo " -v : verbose output"
17 echo " -h : show help"
22 while [ $# -gt 0 ] ; do
26 if [ $arg == "-v" ]; then
28 elif [ $arg == "-h" ] ; then
43 # check whether ODL is running
44 if [ "`curl -X DELETE \
45 "http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database" \
46 -u ${ODL_USER}:${ODL_PASSWD} -s -o /dev/null -w "%{http_code}"`" != 200 ] ; then
47 echo "ODL is not running!"
52 if [[ $(id -u) != 0 ]]; then
53 echo "Superuser privileges needed!"
58 test_num=`ls -l "$TESTS_DIR"/test_* | wc -l`
61 echo "Running VPP lite test suite."
64 for test_case in "$TESTS_DIR"/test_*
66 let "count=$count + 1"
69 base_name=`basename -a "$test_case"`
70 printf "*** %2d/%d : %-45s" $count $test_num "$base_name"
72 if [ $verbose -ne 0 ] ; then
75 "$test_case" &> /dev/null
79 if [ $rc -ne 0 ] ; then
81 failed_tcs+=("$test_case")
82 let "failed_num=$failed_num + 1"
85 let "passed_num=$passed_num + 1"
91 runtime=$((end_time-start_time))
94 echo "------------------------------------------------------"
95 echo "Runtime: " `date -u -d @${runtime} +"%M min %S sec"`
98 if [ $failed_num -eq 0 ]; then
99 echo "All tests have passed."
101 echo "List of failed test cases:"
102 for tc in "${failed_tcs[@]}"
108 echo "------------------------------------------------------"