1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

r8490: make the ldb tests more portable

This commit is contained in:
Andrew Tridgell 2005-07-15 11:27:32 +00:00 committed by Gerald (Jerry) Carter
parent ccf20b2b13
commit 6b20bcbeeb
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ EOF
checkcount() { checkcount() {
count=$1 count=$1
expression="$2" expression="$2"
n=`bin/ldbsearch "$expression" | grep ^dn | wc -l` n=`bin/ldbsearch "$expression" | grep '^dn' | wc -l`
if [ $n != $count ]; then if [ $n != $count ]; then
echo "Got $n but expected $count for $expression" echo "Got $n but expected $count for $expression"
bin/ldbsearch "$expression" bin/ldbsearch "$expression"

View File

@ -58,7 +58,7 @@ echo "Starting ldbtest indexed"
time $VALGRIND ldbtest --num-records 100 --num-searches 500 || exit 1 time $VALGRIND ldbtest --num-records 100 --num-searches 500 || exit 1
echo "Testing one level search" echo "Testing one level search"
count=`$VALGRIND ldbsearch -b 'ou=Groups,o=University of Michigan,c=TEST' -s one 'objectclass=*' none |grep ^dn | wc -l` count=`$VALGRIND ldbsearch -b 'ou=Groups,o=University of Michigan,c=TEST' -s one 'objectclass=*' none |grep '^dn' | wc -l`
if [ $count != 3 ]; then if [ $count != 3 ]; then
echo returned $count records - expected 3 echo returned $count records - expected 3
exit 1 exit 1

View File

@ -7,7 +7,7 @@ mv $LDB_URL $LDB_URL.2
checkcount() { checkcount() {
count=$1 count=$1
expression="$2" expression="$2"
n=`bin/ldbsearch "$expression" | grep ^dn | wc -l` n=`bin/ldbsearch "$expression" | grep '^dn' | wc -l`
if [ $n != $count ]; then if [ $n != $count ]; then
echo "Got $n but expected $count for $expression" echo "Got $n but expected $count for $expression"
$VALGRIND bin/ldbsearch "$expression" $VALGRIND bin/ldbsearch "$expression"