9 echo "Run all ONE tests"
11 echo This must be run with superuser privileges.
13 echo " ./run.sh [vhc] [--config-method vat|cli]"
15 echo " -v : verbose output"
17 echo " -h : show help"
18 echo " --config-method : select configuration method. Default is VAT."
26 while [ $# -gt 0 ] ; do
30 if [ $arg == "-v" ]; then
32 elif [ $arg == "-h" ] ; then
35 elif [ $arg == "-c" ] ; then
38 elif [ $arg == "--config-method" ] ; then
41 if [ $type != "vat" -a $type != "cli" ] ; then
42 echo "ERROR: expected one of 'cli' or 'vat' "
46 export CFG_METHOD=$type
64 if [[ $(id -u) != 0 ]]; then
65 echo "Superuser privileges needed!"
69 # check whether ODL is running
74 test_num=`ls -l "$TESTS_DIR"/test_* | wc -l`
77 echo "Running VPP lite test suite."
79 echo "Config method: $CFG_METHOD"
82 for test_case in "$TESTS_DIR"/test_*
84 let "count=$count + 1"
87 base_name=`basename -a "$test_case"`
88 printf "*** %2d/%d : %-45s" $count $test_num "$base_name"
90 if [ $verbose -ne 0 ] ; then
93 "$test_case" &> /dev/null
97 if [ $rc -ne 0 ] ; then
99 failed_tcs+=("$test_case")
100 let "failed_num=$failed_num + 1"
103 let "passed_num=$passed_num + 1"
109 runtime=$((end_time-start_time))
112 echo "------------------------------------------------------"
113 echo "Runtime: " `date -u -d @${runtime} +"%M min %S sec"`
116 if [ $failed_num -eq 0 ]; then
117 echo "All tests have passed."
119 echo "List of failed test cases:"
120 for tc in "${failed_tcs[@]}"
126 echo "------------------------------------------------------"