Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ASNMP / tests / run_tests.sh
blobb99c1d2163e5c741718df2840f5254855609680c
1 #!/bin/sh
4 # This is the UNIX version of the one-button ACE tests.
5 # Contributed by Michael Rueger <m_rueger@SYSCOMP.DE>
6 # mrm@cisco.com - Change to for loop script could be more generic if we put
7 # this in the bin dir and fed it a file to read from
9 IFS="|"
10 tmp=/tmp
12 # these patterns should not be included in log file
13 ERROR_MSGS="assertion failed|not supported|No such file or directory|Invalid argument|timeout|Bad file number"
15 # these patterns must be included in log file
16 SUCCESS_MSGS="starting|Ending"
18 run()
20 echo running $1
21 /bin/rm -f core
23 ./$1
24 status=$?
26 if [ $status -ne 0 ]; then
27 echo \"$1\" FAILED with exit status $status!!!!
30 if [ -f core ]; then
31 echo \"$1\" dumped core!!!!
34 for i in $SUCCESS_MSGS; do
35 grep $i log/$1.log >/dev/null
36 if [ $? -eq 1 ]; then
37 echo Error in log file no line with $i
39 done
41 for i in $ERROR_MSGS; do
42 grep $i log/$1.log
43 done
46 echo "Starting tests..."
47 FILES=`ls *_Test 2>/dev/null`
49 if [ -z $FILES ]; then
50 echo "ERROR: no test programs generated matching pattern *_Test."
51 echo "ERROR: Try compiling the test programs first."
52 exit 1
55 for i in *_Test
57 run $i
58 done
60 echo "Tests complete..."
63 # EOF