Masato Taruishi
taru****@users*****
2004年 10月 11日 (月) 20:13:57 JST
=================================================================== RCS file: ultrapossum/module/test/runtest,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ultrapossum/module/test/runtest 2004/10/05 17:11:14 1.2 +++ ultrapossum/module/test/runtest 2004/10/11 11:13:57 1.3 @@ -19,8 +19,6 @@ set -e -INCLUDE_TEST=${INCLUDE_TEST:-/} - eval `ultrapossum-config init` TMPFILE=`tempfile` export TMPFILE @@ -32,9 +30,9 @@ test_init() { if test `$MODULEDIR/server/startup status` != "running"; then - addcmd="slapadd -b $SUFFIX -f $SLAPDMASTERCONF" + addcmd="$SLAPADD -b $SUFFIX -f $SLAPDMASTERCONF" else - addcmd="ldapadd -x -D $ROOTDN -w $ROOTPW" + addcmd="ldapadd -h $LDAPMASTER -x -D $ROOTDN -w $ROOTPW" fi echo " dn: $TESTSUFFIX @@ -49,16 +47,21 @@ $MODULEDIR/server/startup start tmpstart=1 fi - ldapdelete -r -x -D $ROOTDN -w $ROOTPW $TESTSUFFIX > /dev/null 2> /dev/null + ldapdelete -r -h $LDAPMASTER -x -D $ROOTDN -w $ROOTPW $TESTSUFFIX > /dev/null 2> /dev/null if test "$tmpstart" = "1"; then $MODULEDIR/server/startup stop fi } -ldapdelete -r -x -D $ROOTDN -w $ROOTPW $TESTSUFFIX > /dev/null 2> /dev/null || true +test_term || true test_init -tests=`find $TESTSCRIPTSDIR -type f | sort | grep $INCLUDE_TEST` +if test "x$1" != "x"; then + tests="$@" +else + tests="`find $TESTSCRIPTSDIR -type f | sort`" +fi + for e in $tests do echo -n "Testing $e... " =================================================================== RCS file: ultrapossum/module/test/ultrapossum-test,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ultrapossum/module/test/ultrapossum-test 2004/10/06 11:53:11 1.3 +++ ultrapossum/module/test/ultrapossum-test 2004/10/11 11:13:57 1.4 @@ -52,5 +52,5 @@ echo "done" fi fi -$MODULEDIR/test/runtest 2>> $ERRORFILE +$MODULEDIR/test/runtest "$@" 2>> $ERRORFILE