dbsql/test/scr022/chk.rr
Gregory Burd c39ba47f61 Finished a pass over all the non-SQLite derrived tests (which all
live in scr050) and brought them up to date, some minor fixes along
the way.  A few tests don't work properly, I've noted those in the
TODO file for some other time.
2009-09-01 19:21:41 -04:00

28 lines
727 B
Bash

#!/bin/sh -
#
# Check for DB_RUNRECOVERY being specified instead of a call to dbsql_panic.
d=../..
t1=__1
trap 'rm -f $t1' 0 1 2 3 13 15
egrep DBSQL_RUNRECOVERY $d/*/*.c $d/*/*/*.c |
sed -e '/__db_panic(.*, DBSQL_RUNRECOVERY)/d' \
-e '/case DBSQL_RUNRECOVERY:/d' \
-e '/db_dispatch.c:.*if (ret == DBSQL_RUNRECOVERY/d' \
-e '/db_err.c:/d' \
-e '/os_errno.c:.*evalue == DBSQL_RUNRECOVERY/d' \
-e '/\/php_db4\//d' \
-e '/rep_backup.c:.*Panic the env and return DBSQL_RUNRECOVERY/d' \
-e '/txn.c:.* \* DBSQL_RUNRECOVERY and we need to/d' \
-e '/txn.c:.*returned DBSQL_RUNRECOVERY and we need to/d' \
> $t1
[ -s $t1 ] && {
echo "DBSQL_RUNRECOVERY used; should be a call to dbsql_panic."
cat $t1
exit 1
}
exit 0