summaryrefslogtreecommitdiff
path: root/ACE/tests/run_tests.check
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/tests/run_tests.check')
-rwxr-xr-xACE/tests/run_tests.check41
1 files changed, 41 insertions, 0 deletions
diff --git a/ACE/tests/run_tests.check b/ACE/tests/run_tests.check
new file mode 100755
index 00000000000..2f6ee6ccd34
--- /dev/null
+++ b/ACE/tests/run_tests.check
@@ -0,0 +1,41 @@
+#! /bin/sh -f
+# $Id$
+#
+# Checks one ore more ACE test log file(s) for expected results.
+
+IFS="|"
+tmp=/tmp
+
+# These patterns must be contained in log file.
+SUCCESS_MSGS="Starting|Ending"
+
+# These patterns should not be contained in log file.
+if [ "$1" != "log/Cached_Accept_Conn_Test.log" ]; then
+ ERROR_MSGS="assertion failed|not supported|No such file or directory|Invalid argument|timeout|Bad file number"
+else
+ # "No such file or directory" is allowed in Cached_Accept_Conn_Test.log
+ ERROR_MSGS="assertion failed|not supported|Invalid argument|timeout|Bad file number"
+fi
+status=0
+
+for arg do
+ for i in $SUCCESS_MSGS; do
+ egrep $i $arg >/dev/null 2>&1
+ if [ $? -eq 1 ]; then
+ echo Error in $arg: no line with $i
+ status=1
+ fi
+ done
+
+ for i in $ERROR_MSGS; do
+ #### 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
+
+exit $status
+
+# EOF