Fixing the non-SQLite tests, the ones adopted from DB.

This commit is contained in:
Gregory Burd 2009-09-01 09:53:56 -04:00
parent f157b8d0e4
commit 62311bde64
14 changed files with 39 additions and 12 deletions

0
dist/pubdef.in vendored Normal file
View file

0
docs_src/m4/m4.links Normal file
View file

View file

@ -260,13 +260,13 @@ int pydbsql_statement_recompile(pydbsql_Statement* self, PyObject* params)
* version 3.2.2 or later. For older DBSQL releases, that might not
* even define DBSQL_VERSION_NUMBER, we do it the manual way.
*/
#ifdef DBSQL_VERSION_NUMBER
#if DBSQL_VERSION_NUMBER >= 3002002
#ifdef DBSQL_VERSION_NUMBER
#if DBSQL_VERSION_NUMBER >= 3002002
(void)dbsql_transfer_bindings(self->st, new_st);
#endif
#else
#endif
#else
statement_bind_parameters(self, params);
#endif
#endif
(void)dbsql_finalize(self->st);
self->st = new_st;

View file

@ -2,14 +2,15 @@
#
# Check to make sure that the code samples in the documents build.
d=../../../db_docs
d=../../docs
b=../../build_unix
[ -d $d ] || {
echo 'FAIL: cannot find source distribution directory.'
exit 1
}
[ -f ../libsqldb.a ] || (cd .. && make libsqldb.a) || {
echo 'FAIL: unable to find or build libsqldb.a'
[ -f $b/libdbsql.a ] || (cd $b && make libdbsql.a) || {
echo 'FAIL: unable to find or build libdbsql.a'
exit 1
}

View file

@ -15,8 +15,15 @@ f=$d/build_win32/libdb.def
t1=__1
t2=__2
trap 'rm -f $t1 $t2' 0 1 2 3 13 15
exitv=0
[ -f $f ] || {
echo 'FAIL: unable to find or build' $f
exit 1
}
sed '/; /d' $f |
egrep @ |
awk '{print $1}' |

View file

@ -15,8 +15,9 @@ t1=__1
t2=__2
t3=__3
trap 'rm -f $t1 $t2 $t3' 0 1 2 3 13 15
find $d -name '*.c' -o -name '*.cpp' |
sed -e '/queue.h/d' |
xargs egrep '^[ ][ ]*#' > $t1
test -s $t1 && {
echo "FAIL: found #defines with leading white space:"

View file

@ -9,11 +9,14 @@ d=../..
exit 1
}
trap 'rm -f t t.c' 0 1 2 3 13 15
cat << END_OF_CODE > t.c
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
int chk(FILE *, char *);

View file

@ -11,6 +11,8 @@ d=../..
t=__1
trap 'rm -f $t1' 0 1 2 3 13 15
egrep -w off_t $d/*/*.[ch] $d/*/*.in |
sed -e "/_/d" > $t

View file

@ -13,7 +13,10 @@ t1=__1
t2=__2
t3=__3
trap 'rm -f $t1 $t2 $t3' 0 1 2 3 13 15
egrep '__P' $d/src/inc/*.h |
sed -e '/db_int.h/d' |
sed -e 's/[ ][ ]*__P.*//' \
-e 's/^.*[ *]//' \
> $t1

View file

@ -61,7 +61,7 @@ Check that pubdef.in has everything listed in dbsql.in.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
END_OF_TEXT
f=$d/src/db.in
f=$d/src/dbsql.in
sed -n \
-e 's/^#define[ ]*\(DBSQL_[A-Z_0-9][A-Z_0-9]*\).*/\1/p' \
-e 's/^[ ]*\(DBSQL_[A-Z_]*\)=[0-9].*/\1/p' \
@ -77,7 +77,7 @@ done
cat <<END_OF_TEXT
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Check that db.in has everything listed in pubdef.in.
Check that dbsql.in has everything listed in pubdef.in.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
END_OF_TEXT

View file

@ -10,10 +10,14 @@ d=../..
exit 1
}
[ -d $d/build_win32 ] || exit 0
f=$d/dist/srcfiles.in
t1=__1
t2=__2
trap 'rm -f $t1 $t2' 0 1 2 3 13 15
sed -e '/^[ #]/d' \
-e '/^$/d' < $f |
awk '{print $1}' > $t1

View file

@ -11,6 +11,8 @@ d=../..
t1=__1
trap 'rm -f $t1' 0 1 2 3 13 15
sed -e '/^#include/d' \
-e '/"/!d' \
-e 's/^[^"]*//' \

View file

@ -13,6 +13,8 @@ d=../..
t1=__1
t2=__2
trap 'rm -f $t1 $t2' 0 1 2 3 13 15
(cd $d && ls -F | egrep / | sort |
sed -e 's/\///' \
-e '/_\//d' \

View file

@ -16,11 +16,13 @@ docs=$d/docs_src
exitv=0
t=__tmp
trap 'rm -f $t1 IGNORE' 0 1 2 3 13 15
# Extract the field names for a structure from the dbsql.h file.
inc_fields()
{
sed -e "/struct $1 {/,/^};$/p" \
-e d < $d/src/inc/dbsql.in |
-e d < $d/src/dbsql.in |
sed -e 1d \
-e '$d' \
-e '/;/!d' \