Revamp cf/db.m4; test LMDB
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
noinst_DATA = krb5.conf krb5.conf-sqlite
|
||||
noinst_DATA = krb5.conf krb5.conf-sqlite krb5.conf-db3 krb5.conf-db1 krb5.conf-lmdb
|
||||
|
||||
noinst_SCRIPTS = have-db
|
||||
|
||||
@@ -13,6 +13,7 @@ TESTS = $(check_SCRIPTS)
|
||||
do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \
|
||||
-e 's,[@]top_builddir[@],$(top_builddir),g' \
|
||||
-e 's,[@]objdir[@],$(top_builddir)/tests/db,g' \
|
||||
-e 's,[@]default_db_type[@],$(db_type),g' \
|
||||
-e 's,[@]EGREP[@],$(EGREP),g'
|
||||
|
||||
loaddump-db: loaddump-db.in Makefile
|
||||
@@ -48,6 +49,18 @@ krb5.conf-sqlite: krb5.conf.in Makefile
|
||||
$(do_subst) -e 's,[@]type[@],sqlite:,g' < $(srcdir)/krb5.conf.in > krb5.conf-sqlite.tmp
|
||||
mv krb5.conf-sqlite.tmp krb5.conf-sqlite
|
||||
|
||||
krb5.conf-db3: krb5.conf.in Makefile
|
||||
$(do_subst) -e 's,[@]type[@],db3:,g' < $(srcdir)/krb5.conf.in > krb5.conf-db3.tmp
|
||||
mv krb5.conf-db3.tmp krb5.conf-db3
|
||||
|
||||
krb5.conf-db1: krb5.conf.in Makefile
|
||||
$(do_subst) -e 's,[@]type[@],db1:,g' < $(srcdir)/krb5.conf.in > krb5.conf-db1.tmp
|
||||
mv krb5.conf-db1.tmp krb5.conf-db1
|
||||
|
||||
krb5.conf-lmdb: krb5.conf.in Makefile
|
||||
$(do_subst) -e 's,[@]type[@],lmdb:,g' < $(srcdir)/krb5.conf.in > krb5.conf-lmdb.tmp
|
||||
mv krb5.conf-lmdb.tmp krb5.conf-lmdb
|
||||
|
||||
krb5-mit.conf: krb5-mit.conf.in Makefile
|
||||
$(do_subst) < $(srcdir)/krb5-mit.conf.in > krb5-mit.conf.tmp
|
||||
mv krb5-mit.conf.tmp krb5-mit.conf
|
||||
@@ -64,6 +77,9 @@ CLEANFILES= \
|
||||
mkey.file* \
|
||||
krb5.conf krb5.conf.tmp \
|
||||
krb5.conf-sqlite krb5.conf-sqlite.tmp \
|
||||
krb5.conf-db3 krb5.conf-db3.tmp \
|
||||
krb5.conf-db1 krb5.conf-db1.tmp \
|
||||
krb5.conf-lmdb krb5.conf-lmdb.tmp \
|
||||
krb5-mit.conf krb5-mit.conf.tmp \
|
||||
tempfile \
|
||||
log.current-db* \
|
||||
|
@@ -38,6 +38,9 @@ srcdir="@srcdir@"
|
||||
objdir="@objdir@"
|
||||
EGREP="@EGREP@"
|
||||
|
||||
default_db_type=@default_db_type@
|
||||
db_type=${1:-${default_db_type}}
|
||||
|
||||
# If there is no useful db support compile in, disable test
|
||||
./have-db || exit 77
|
||||
|
||||
@@ -46,7 +49,7 @@ R=EXAMPLE.ORG
|
||||
kadmin="${TESTS_ENVIRONMENT} ../../kadmin/kadmin -l -r $R"
|
||||
iproplog="${TESTS_ENVIRONMENT} ../../lib/kadm5/iprop-log"
|
||||
|
||||
KRB5_CONFIG="${objdir}/krb5.conf"
|
||||
KRB5_CONFIG="${objdir}/krb5.conf-${db_type}"
|
||||
export KRB5_CONFIG
|
||||
|
||||
rm -f current-db*
|
||||
|
@@ -36,6 +36,9 @@ srcdir="@srcdir@"
|
||||
objdir="@objdir@"
|
||||
EGREP="@EGREP@"
|
||||
|
||||
default_db_type=@default_db_type@
|
||||
db_type=${1:-${default_db_type}}
|
||||
|
||||
testfailed="echo test failed; cat messages.log; exit 1"
|
||||
|
||||
# If there is no useful db support compile in, disable test
|
||||
|
@@ -47,10 +47,11 @@ IFS="$oldIFS"
|
||||
while [ $# != 0 ] ; do
|
||||
case $1 in
|
||||
db:*) exit 0 ;;
|
||||
db1:*) exit 0 ;;
|
||||
gdbm:*) exit 0 ;;
|
||||
db4:*) exit 0 ;;
|
||||
db3:*) exit 0 ;;
|
||||
ldb:*) exit 0 ;;
|
||||
lmdb:*) exit 0 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
@@ -47,15 +47,13 @@ kstash="../../kdc/kstash"
|
||||
hprop="../../kdc/hprop"
|
||||
hpropd="../../kdc/hpropd"
|
||||
|
||||
type="${1}"
|
||||
typesep="${type:+:}"
|
||||
typeconf="${type:+-}"
|
||||
default_db_type=@default_db_type@
|
||||
db_type=${1:-${default_db_type}}
|
||||
|
||||
propdb="${hprop} --database=${db_type}:./current-db -n"
|
||||
propddb="${hpropd} --database=${db_type}:./current-db -n"
|
||||
|
||||
propdb="${hprop} --database=${type}${typesep}./current-db -n"
|
||||
propddb="${hpropd} --database=${type}${typesep}./current-db -n"
|
||||
|
||||
KRB5_CONFIG="${objdir}/krb5.conf${typeconf}${type}"
|
||||
KRB5_CONFIG="${objdir}/krb5.conf-${db_type}"
|
||||
export KRB5_CONFIG
|
||||
|
||||
rm -f current-db*
|
||||
|
@@ -35,6 +35,9 @@ top_builddir="@top_builddir@"
|
||||
env_setup="@env_setup@"
|
||||
objdir="@objdir@"
|
||||
|
||||
default_db_type=@default_db_type@
|
||||
db_type=${1:-${default_db_type}}
|
||||
|
||||
. ${env_setup}
|
||||
|
||||
# If there is no useful db support compile in, disable test
|
||||
|
Reference in New Issue
Block a user