Home | History | Annotate | Download | only in crosperf
      1 #!/bin/bash
      2 #
      3 # Copyright 2011 Google Inc. All Rights Reserved.
      4 # Author: raymes (at] google.com (Raymes Khoury)
      5 
      6 # Make sure the base toolchain-utils directory is in our PYTHONPATH before
      7 # trying to run this script.
      8 export PYTHONPATH+=":.."
      9 
     10 num_tests=0
     11 num_failed=0
     12 
     13 for test in $(find -name \*test.py); do
     14   echo RUNNING: ${test}
     15   ((num_tests++))
     16   if ! ./${test} ; then
     17     echo
     18     echo "*** Test Failed! (${test}) ***"
     19     echo
     20     ((num_failed++))
     21   fi
     22 done
     23 
     24 echo
     25 
     26 if [ ${num_failed} -eq 0 ] ; then
     27   echo "ALL TESTS PASSED (${num_tests} ran)"
     28   exit 0
     29 fi
     30 
     31 echo "${num_failed} TESTS FAILED (out of ${num_tests})"
     32 exit 1
     33