10 echo "Run all ONE tests"
12 echo This must be run with superuser privileges.
14 echo " ./run.sh [vhc]"
16 echo " -v : verbose output"
18 echo " -h : show help"
23 while [ $# -gt 0 ] ; do
27 if [ $arg == "-v" ]; then
29 elif [ $arg == "-h" ] ; then
32 elif [ $arg == "-c" ] ; then
48 if [[ $(id -u) != 0 ]]; then
49 echo "Superuser privileges needed!"
53 # check whether ODL is running
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 "------------------------------------------------------"