diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-25 01:54:56 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-25 01:54:56 +0000 |
commit | 8b25ac2b5870ecb24cf85324e3c4d22e0c64ad70 (patch) | |
tree | 552b5d740e973a9e8a001c20ce84a1dfeae1dd2e /tests/run_tests.check | |
parent | 363941a0652a01985b44150ce0f69e3b46f15d60 (diff) | |
download | ATCD-8b25ac2b5870ecb24cf85324e3c4d22e0c64ad70.tar.gz |
print out test name with error messages
Diffstat (limited to 'tests/run_tests.check')
-rwxr-xr-x | tests/run_tests.check | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/run_tests.check b/tests/run_tests.check index 775092a6c9b..2485ea7bc4b 100755 --- a/tests/run_tests.check +++ b/tests/run_tests.check @@ -1,29 +1,33 @@ #! /bin/sh -f +# $Id$ +# # Checks one ore more ACE test log file(s) for expected results. IFS="|" tmp=/tmp -# these patterns should not be included in log file -ERROR_MSGS="assertion failed|not supported|No such file or directory|Invalid argument|timeout|Bad file number" - -# these patterns must be included in log file +# These patterns must be contained in log file. SUCCESS_MSGS="starting|Ending" +# These patterns should not be contained in log file. +ERROR_MSGS="assertion failed|not supported|No such file or directory|Invalid argument|timeout|Bad file number" + status=0 -for arg -do +for arg do for i in $SUCCESS_MSGS; do - grep $i $arg >/dev/null + egrep -q $i $arg if [ $? -eq 1 ]; then - echo Error in log file no line with $i + echo Error in $arg: no line with $i status=1 fi done for i in $ERROR_MSGS; do - grep $i $arg + #### The /dev/null arg to egrep causes the filename to be printed + #### out. The sed command strips off the leading 'log/' and + #### trailing '.log'. + egrep $i $arg /dev/null | sed -e 's%^log/%%' -e 's%[.]log:%: %' if [ $? -ne 0 ]; then status=1; fi done done |