Changeset 167
- Timestamp:
- 10/14/07 15:15:07
- Files:
-
- guts_main/guts_main.sh (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
guts_main/guts_main.sh
r163 r167 36 36 failed=0 37 37 cmp_failed=0 38 39 # specify second argument as ON to turn on the coloring in the output 40 COLOR=$2 38 41 39 42 # flags for Berkeley UPC Compiler … … 63 66 exe_output=`$RUN` 64 67 if test $? -eq 0 ; then 65 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$UNIT]" 68 if [ "$COLOR" == "ON" ]; then 69 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$UNIT]" 70 fi 71 printf "TEST PASSED for the unit [$UNIT]" 66 72 echo $exe_output 67 73 echo "$UNIT" >>units.passed 68 74 passed=`expr $passed + 1` 69 75 else 70 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$UNIT]" 76 if [ "$COLOR" == "ON" ]; then 77 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$UNIT]" 78 fi 79 printf "TEST FAILED for the unit [$UNIT]" 80 71 81 printf "\n" 72 82 echo $exe_output … … 102 112 echo "ERROR: The NEGATIVE unit [$NUNIT] pass the compilation phase" 103 113 echo "The unit will not be run!!!" 104 echo -e "TEST \033[31m\033[1mFAILED\033[0m for the unit [$NUNIT]" 105 echo "$NUNIT" >>units.notpassed 114 if [ "$COLOR" == "ON" ]; then 115 echo -e "TEST \033[31m\033[1mFAILED\033[0m for the unit [$NUNIT]" 116 fi 117 echo -e "TEST FAILED for the unit [$NUNIT]" 118 119 echo "$NUNIT" >>units.notpassed 106 120 failed=`expr $failed + 1` 107 121 cmp_failed=`expr $cmp_failed + 1` … … 111 125 echo "Note that this is the EXPECTED result since the unit is negative" 112 126 echo "The unit will not be run!!!" 113 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$NUNIT]" 114 echo "$NUNIT" >>units.passed 127 if [ "$COLOR" == "ON" ]; then 128 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$NUNIT]" 129 fi 130 printf "TEST PASSED for the unit [$NUNIT]" 131 echo "$NUNIT" >>units.passed 115 132 passed=`expr $passed + 1` 116 133 … … 145 162 exe_output=`$RUN` 146 163 if test $? -eq 0 ; then 147 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$UNIT]" 148 echo "$UNIT" >>units.notpassed 164 if [ "$COLOR" == "ON" ]; then 165 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$UNIT]" 166 fi 167 printf "TEST FAILED for the unit [$UNIT]" 168 echo "$UNIT" >>units.notpassed 149 169 failed=`expr $failed + 1` 150 170 else 151 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$UNIT]" 152 echo "$UNIT" >>units.passed 171 if [ "$COLOR" == "ON" ]; then 172 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$UNIT]" 173 fi 174 printf "TEST PASSED for the unit [$UNIT]" 175 echo "$UNIT" >>units.passed 153 176 passed=`expr $passed + 1` 154 177 fi … … 174 197 printf "________________ GWU-HPCL UPC Compiler Testing Summary ________________\n" 175 198 echo "SUCCESSFUL UNITS --> (units.passed)" 176 printf "\033[34m\033[1m" 199 200 if [ "$COLOR" == "ON" ]; then 201 printf "\033[34m\033[1m" 202 fi 203 177 204 if test -f units.passed ; then 178 205 cat units.passed|sort|uniq 179 206 fi 180 printf "\033[0m" 207 208 if [ "$COLOR" == "ON" ]; then 209 printf "\033[0m" 210 fi 181 211 182 212 echo " FAILED UNITS --> (units.notpassed)" 183 printf "\033[31m\033[1m" 213 214 if [ "$COLOR" == "ON" ]; then 215 printf "\033[31m\033[1m" 216 fi 217 184 218 if test -f units.notpassed ; then 185 219 cat units.notpassed|sort|uniq 186 220 fi 187 printf "\033[0m" 188 189 printf "\033[5m\033[1m\033[35m" 221 222 if [ "$COLOR" == "ON" ]; then 223 printf "\033[0m" 224 printf "\033[1m\033[1m\033[35m" 225 fi 226 190 227 echo " --> Number of units PASSED : $passed" 191 228 echo " --> Number of units FAILED : $failed" … … 194 231 195 232 printf " --> $percentage % of the units have PASSED\n" 196 printf "\033[0m" 233 234 if [ "$COLOR" == "ON" ]; then 235 printf "\033[0m" 236 fi 237 197 238 printf "=========================== TEST END ====================================\n"
