1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598
|
#!/bin/sh
#!c:/appls/cygwin/bin/sh
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1996-2003
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Smith <MarkCSmithWork@aol.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#UNAME=c:/appls/relbld-tools/gmake3.76.1/uname.exe
UNAME=uname
#
# Perform a sanity check on the LDAP C SDK by executing the command line tools
#
# cd to the directory that contains platform subdirectories before executing
# this script, e.g.,
# cd /shared-builds/ldapsdk50/20011120D
# ~/tests/sdk/accept/test-sdk
#
usage()
{
echo "usage: $0 [-v] [-c] [-s] [-3] [-C] [-b basedn] [-d debuglevel] [-h server] [-p ldap-port] [-P ldaps-port] [-W ssl-keyfile-passwd] [-L extra-lib-path ]" 2>&1
exit 2
}
# By default, SSL tests are done. -s turns them off.
TEST_SSL=yes
# component dependencies
NSS_RELEASE=nss/NSS_3_7_7_RTM
NSS_RELEASE_ROOT=/shared-builds
NSPR_RELEASE=nspr20/v4.2.2
NSPR_RELEASE_ROOT=/shared-builds
# hard coded variables
BINDDN="cn=Directory Manager"
BINDPW="secret"
CERTDB=/tmp/certdb
CERTNAME="Kirsten Vaughan's Example ID"
TOOLS_OUTFILE=/dev/null
TOOLS_TMPFILE=/tmp/testsdk-tools-tmp.$$
# defaults
LDAPHOST=ldap.example.com
LDAPPORT=389
LDAPSPORT=636
LDAPBASE="dc=example,dc=com"
KEYPASSWD=
VERBOSE=0
REALLY_VERBOSE=0
LDAPDEBUG=""
STOP_ON_ERRORS=1
COPY_ROOT_CERT_LIB=0
EXTRA_LIB_PATH=""
EXTRA_SSL_ARGS=""
#set - - `getopt vb:d:h:p:P: $*`
#if [ $? != 0 ]; then
# usage;
#fi
#for i in $*; do
#echo $i
# case $i in
# -v) VERBOSE=1;;
# -b) LDAPBASE=$2; shift 2;;
# -d) LDAPDEBUG=$2; shift 2;;
# -h) LDAPHOST=$2; shift 2;;
# -p) LDAPPORT=$2; shift 2;;
# -P) LDAPSPORT=$2; shift 2;;
# esac
#done
while getopts vcCs3b:d:h:L:p:P:W: c; do
case $c in
v) if [ $VERBOSE -eq 1 ]; then
REALLY_VERBOSE=1;
else
VERBOSE=1
fi
;;
c) STOP_ON_ERRORS=0;;
C) COPY_ROOT_CERT_LIB=1;;
s) TEST_SSL="no";;
3) EXTRA_SSL_ARGS="$EXTRA_SSL_ARGS -3";;
b) LDAPBASE=$OPTARG;;
d) LDAPDEBUG=$OPTARG;;
h) LDAPHOST=$OPTARG;;
L) EXTRA_LIB_PATH=$OPTARG;;
p) LDAPPORT=$OPTARG;;
P) LDAPSPORT=$OPTARG;;
W) KEYPASSWD=$OPTARG;;
\?) usage;;
esac
done
shift `expr $OPTIND - 1`
if [ -z "$KEYPASSWD" -a z$TEST_SSL = z"yes" ]; then
echo "Please provide the keyfile password (-W password)"
usage;
fi
if [ $# -gt 0 ]; then
usage;
fi
if [ $REALLY_VERBOSE -ne 0 ]; then
TOOLS_OUTFILE=/dev/tty
fi
DEV_NULL=/dev/null
BUILD_VARIANTS="DBG.OBJ OPT.OBJ"
ICONV_SRC_CHARSET=ISO8859-1
ICONV_UTF8_CHARSET=UTF-8
OS=`$UNAME`
case $OS in
SunOS)
if [ `$UNAME -r` = "5.6" ]; then
ICONV_SRC_CHARSET=8859-1
fi
OS_VARIANTS="SunOS5.6 SunOS5.8 SunOS5.8_64"
LDAPTOOL_LC_CTYPE=en_US.ISO8859-1
;;
HP-UX)
OS_VARIANTS="HP-UXB.11.00 HP-UXB.11.00_64"
LDAPTOOL_LC_CTYPE=en_US.iso88591
ICONV_SRC_CHARSET=iso8859_1
ICONV_UTF8_CHARSET=utf8
;;
AIX)
OS_VARIANTS="AIX4.3"
LDAPTOOL_LC_CTYPE=en_US.ISO8859-1
;;
Linux)
OS_VARIANTS="Linux2.2_x86_glibc_PTH Linux2.4_x86_glibc_PTH"
LDAPTOOL_LC_CTYPE=en_US.ISO8859-1
ICONV_SRC_CHARSET=ISO-8859-1
;;
WINNT)
OS_VARIANTS="WINNT5.0"
BUILD_VARIANTS="$BUILD_VARIANTS DBG.OBJD"
CERTDB=c:/Dev/test/ldapcsdk/client-kvaughan-db-10-2003
DEV_NULL="nul:"
;;
*)
echo "unknown operating system $OS" 2>&1
exit 1
esac
# set up locale environment (charset)
if [ $OS != WINNT ]; then
LC_ALL=$LDAPTOOL_LC_CTYPE; export LC_ALL
if [ $VERBOSE -ne 0 ]; then
echo "$0: LC_ALL=$LDAPTOOL_LC_CTYPE"
locale
fi
fi
if [ "$OS" = "WINNT" ]; then
CMD_TO_UTF8=cat
else
CMD_TO_UTF8="iconv -f $ICONV_SRC_CHARSET -t $ICONV_UTF8_CHARSET"
fi
TEST_SSL_CLIENT_AUTH=yes
TEST_SEARCHES=yes
TEST_MODIFIES=yes
# moddn, etc.
TEST_MODDNNEWSUP=no
if [ ! -z "$LDAPDEBUG" ]; then
DEBUG_ARG="-d $LDAPDEBUG"
fi
if [ $VERBOSE -ne 0 ]; then
VERBOSE_ARG="-v"
fi
SEP="++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
# OS, OBJDIR, NSS_RELEASE, and NSPR_RELEASE must be set
setup_shlib_access()
{
NSS_LIB_PATH="$NSS_RELEASE_ROOT/$NSS_RELEASE/$OBJDIR/lib"
NSPR_LIB_PATH="$NSPR_RELEASE_ROOT/$NSPR_RELEASE/$OBJDIR/lib"
if [ -z "$EXTRA_LIB_PATH" ]; then
SHARED_LIB_PATH=$NSS_LIB_PATH:$NSPR_LIB_PATH
else
SHARED_LIB_PATH=$NSS_LIB_PATH:$NSPR_LIB_PATH:$EXTRA_LIB_PATH
fi
case $OS in
SunOS|IRIX)
LD_LIBRARY_PATH=$SHARED_LIB_PATH;
export LD_LIBRARY_PATH;
ROOT_CERT_SO=libnssckbi.so
;;
HP-UX)
SHLIB_PATH=$SHARED_LIB_PATH;
export SHLIB_PATH;
ROOT_CERT_SO=libnssckbi.sl
;;
AIX)
LIBPATH=$SHARED_LIB_PATH;
export LIBPATH;
ROOT_CERT_SO=libnssckbi.so
;;
Linux)
LD_LIBRARY_PATH=$SHARED_LIB_PATH;
export LD_LIBRARY_PATH;
ROOT_CERT_SO=libnssckbi.so
;;
WINNT)
PATH="`pwd`/$OBJDIR/lib;:$PATH;"
export PATH;
ROOT_CERT_SO=nssckbi.dll
;;
*)
echo "setup_shlib_access: unknown operating system $OS" 2>&1
exit 1
esac
if [ z$TEST_SSL = z"yes" ]; then
# Copy root cert shared library to cert DB location
ROOT_CERT_SO_DST_PATH=$CERTDB/$ROOT_CERT_SO
if [ "$COPY_ROOT_CERT_LIB" -ne 0 ]; then
echo setup_shlib_access: cp -p $NSS_LIB_PATH/$ROOT_CERT_SO $ROOT_CERT_SO_DST_PATH
cp -p $NSS_LIB_PATH/$ROOT_CERT_SO $ROOT_CERT_SO_DST_PATH
fi
fi
}
# ROOT_CERT_SO_DST_PATH must be set
cleanup_shlib_access()
{
if [ "$COPY_ROOT_CERT_LIB" -ne 0 ]; then
echo cleanup_shlib_access: rm $ROOT_CERT_SO_DST_PATH
rm $ROOT_CERT_SO_DST_PATH
fi
}
# OBJDIR and OS must be set
test_one()
{
TEST_ONE_RC=0
if [ "$OS" = "WINNT" ]; then
# echo "cd $OBJDIR/lib"
# cd $OBJDIR/lib
# LDAPTOOLSDIR=../tools
LDAPTOOLSDIR=$OBJDIR/tools
else
echo "cd $OBJDIR/tools"
cd $OBJDIR/tools
LDAPTOOLSDIR=.
fi
if [ z$TEST_SEARCHES = z"yes" ]; then
# test searches
echo search1 $SEP
$LDAPTOOLSDIR/ldapsearch $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPPORT \
-b "$LDAPBASE" 'objectClass=*' > $TOOLS_OUTFILE < $DEV_NULL
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE search1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
if [ z$TEST_SSL = z"yes" ]; then
echo sslsearch1 $SEP
$LDAPTOOLSDIR/ldapsearch $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPSPORT \
-b "$LDAPBASE" $EXTRA_SSL_ARGS -Z -P $CERTDB \
'objectClass=*' > $TOOLS_OUTFILE < $DEV_NULL
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE sslsearch1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
if [ z$TEST_SSL_CLIENT_AUTH = z"yes" ]; then
echo sslsearch2-clientauth $SEP
$LDAPTOOLSDIR/ldapsearch $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPSPORT \
-b "" -s base $EXTRA_SSL_ARGS -Z -P $CERTDB -N "$CERTNAME" \
-W "$KEYPASSWD" 'objectClass=*' > $TOOLS_OUTFILE < $DEV_NULL
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE sslsearch2 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
fi
# end of SSL client auth search tests
fi
# end of SSL search tests
fi
# end of search tests
if [ z$TEST_MODIFIES = z"yes" ]; then
# modify
echo modify1 $SEP
$LDAPTOOLSDIR/ldapmodify $VERBOSE_ARG $DEBUG_ARG -a \
-h $LDAPHOST -p $LDAPPORT \
-D "$BINDDN" -w "$BINDPW" <<MOD1 > $TOOLS_OUTFILE
dn: cn=Test Entry, $LDAPBASE
cn: Test Entry
sn: Entry
objectClass: person
MOD1
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE modify1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
echo modverifysearch1 $SEP
$LDAPTOOLSDIR/ldapsearch $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPPORT \
-b "$LDAPBASE" 'sn=Entry' > $TOOLS_OUTFILE < $DEV_NULL
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE modverifysearch1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
# I18n modify and search
echo i18nmodify1 $SEP
LAST_ENTRY_DN_88591="cn= with accent Entry,$LDAPBASE"
LAST_ENTRY_DN_UTF8="cn=\C3\A1 with accent Entry,$LDAPBASE"
if [ $OS != WINNT ]; then
$CMD_TO_UTF8 <<I18NMOD1 > $TOOLS_TMPFILE
dn: $LAST_ENTRY_DN_88591
cn: with accent Entry
sn: A Entry
objectClass: person
I18NMOD1
else
cat <<I18NMOD1b > $TOOLS_TMPFILE
dn: $LAST_ENTRY_DN_UTF8
sn: A Entry
objectClass: person
I18NMOD1b
fi
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
rm $TOOLS_TMPFILE
echo "** FAILURE $CMD_TO_UTF8 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
$LDAPTOOLSDIR/ldapmodify $VERBOSE_ARG $DEBUG_ARG -a \
-h $LDAPHOST -p $LDAPPORT \
-D "$BINDDN" -w "$BINDPW" < $TOOLS_TMPFILE > $TOOLS_OUTFILE
TOOLS_RC=$?
rm $TOOLS_TMPFILE
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE i18nmodify1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
echo i18nmodverifysearch1 $SEP
$LDAPTOOLSDIR/ldapsearch $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPPORT -s base \
-b "$LAST_ENTRY_DN_88591" 'objectClass=*' > $TOOLS_OUTFILE < $DEV_NULL
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE i18nmodverifysearch1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
echo i18ndelete1 $SEP
$LDAPTOOLSDIR/ldapdelete $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPPORT \
-D "$BINDDN" -w "$BINDPW" \
-i $ICONV_UTF8_CHARSET "$LAST_ENTRY_DN_UTF8" > $TOOLS_OUTFILE
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE i18ndelete1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
# modrdn
echo modrdn1 $SEP
$LDAPTOOLSDIR/ldapmodify $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPPORT \
-D "$BINDDN" -w "$BINDPW" <<MOD2 > $TOOLS_OUTFILE
dn: cn=Test Entry, $LDAPBASE
changetype: modrdn
newrdn: cn=Testy Entry
deleteoldrdn: 0
MOD2
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE modrdn1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
LAST_ENTRY_DN="cn=Testy Entry, $LDAPBASE"
echo modverifysearch2 $SEP
$LDAPTOOLSDIR/ldapsearch $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPPORT \
-b "$LDAPBASE" 'sn=Entry' > $TOOLS_OUTFILE < $DEV_NULL
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE modverifysearch2 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
if [ z$TEST_MODDNNEWSUP = z"yes" ]; then
# moddn with new superior
echo moddn1 $SEP
$LDAPTOOLSDIR/ldapmodify -V 3 $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPPORT \
-D "$BINDDN" -w "$BINDPW" <<MOD3 > $TOOLS_OUTFILE
dn: cn=Test Entry, $LDAPBASE
changetype: moddn
newrdn: cn=Testier Entry
deleteoldrdn: 0
newparent: ou=People, $LDAPBASE
MOD3
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE moddn1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
LAST_ENTRY_DN="cn=Testier Entry, ou=People, $LDAPBASE"
echo modverifysearch3 $SEP
$LDAPTOOLSDIR/ldapsearch $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPPORT \
-b "$LDAPBASE" 'sn=Entry' > $TOOLS_OUTFILE < $DEV_NULL
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE modverifysearch3 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
# end of moddn with new superior tests
fi
if [ z$TEST_SSL = z"yes" ]; then
echo delete1 $SEP
$LDAPTOOLSDIR/ldapdelete $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPSPORT \
-D "$BINDDN" -w "$BINDPW" $EXTRA_SSL_ARGS -Z -P $CERTDB \
"$LAST_ENTRY_DN" > $TOOLS_OUTFILE
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE ssldelete1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
else
echo delete 1 $SEP
$LDAPTOOLSDIR/ldapdelete $VERBOSE_ARG $DEBUG_ARG \
-h $LDAPHOST -p $LDAPPORT \
-D "$BINDDN" -w "$BINDPW" \
"$LAST_ENTRY_DN" > $TOOLS_OUTFILE
TOOLS_RC=$?
if [ $TOOLS_RC -ne 0 ]; then
echo "** FAILURE delete1 ($TOOLS_RC)";
if [ $STOP_ON_ERRORS -ne 0 ]; then return $TOOLS_RC; fi
TEST_ONE_RC=$TOOLS_RC;
fi
fi
# end of SSL or non-SSL delete test
fi
# end of modify tests
return $TEST_ONE_RC;
}
echo $0 started
echo server: $LDAPHOST:$LDAPPORT
echo ssl: $TEST_SSL "(port $LDAPSPORT)"
echo clientath: $TEST_SSL_CLIENT_AUTH
echo moddn: $TEST_MODDNNEWSUP
echo search: $TEST_SEARCHES
echo modify: $TEST_MODIFIES
echo nss: $NSS_RELEASE
echo nspr: $NSPR_RELEASE
RC=0
TESTED_STR=""
TESTED_COUNT=0
TESTED_FAIL_COUNT=0
TESTED_SKIP_COUNT=0
HOMEBASE_DIR=`pwd`;
for os in $OS_VARIANTS; do
for build in $BUILD_VARIANTS; do
OBJDIR="${os}_${build}"
echo ""
if [ ! -d "$OBJDIR" ]; then
echo "Skipping $OBJDIR (no such directory)..."
TESTED_SKIP_COUNT=`expr $TESTED_SKIP_COUNT + 1`;
continue;
fi
echo Testing $OBJDIR...
setup_shlib_access;
test_one;
ONE_RC=$?
cleanup_shlib_access;
TESTED_COUNT=`expr $TESTED_COUNT + 1`;
TESTED_STR="$TESTED_STR $OBJDIR";
if [ $ONE_RC -ne 0 ]; then
echo "** FAILURE $OBJDIR";
TESTED_FAIL_COUNT=`expr $TESTED_FAIL_COUNT + 1`;
if [ $STOP_ON_ERRORS -ne 0 ]; then
exit $ONE_RC;
else
RC=$ONE_RC;
fi
fi
cd $HOMEBASE_DIR
done
done
echo ""
if [ "$TESTED_SKIP_COUNT" -gt 0 ]; then
SKIP_STR=" (skipped $TESTED_SKIP_COUNT tests)";
else
SKIP_STR="";
fi
if [ -z "$TESTED_STR" ]; then
echo "No tests executed$SKIP_STR."
RC=2;
else
echo "Tested $TESTED_STR."
if [ "$ONE_RC" -eq 0 ]; then
echo "All $TESTED_COUNT tests completed OK$SKIP_STR."
else
echo "$TESTED_FAIL_COUNT tests of $TESTED_COUNT failed $SKIP_STR."
fi
fi
echo $0 done.
exit $RC
|