Home | History | Annotate | Line # | Download | only in scripts
      1       1.1     lukem #! /bin/sh
      2   1.1.1.4      tron # $OpenLDAP$
      3       1.1     lukem ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
      4       1.1     lukem ##
      5  1.1.1.10  christos ## Copyright 1998-2024 The OpenLDAP Foundation.
      6       1.1     lukem ## All rights reserved.
      7       1.1     lukem ##
      8       1.1     lukem ## Redistribution and use in source and binary forms, with or without
      9       1.1     lukem ## modification, are permitted only as authorized by the OpenLDAP
     10       1.1     lukem ## Public License.
     11       1.1     lukem ##
     12       1.1     lukem ## A copy of this license is available in the file LICENSE in the
     13       1.1     lukem ## top-level directory of the distribution or, alternatively, at
     14       1.1     lukem ## <http://www.OpenLDAP.org/license.html>.
     15       1.1     lukem 
     16       1.1     lukem SHTOOL="$SRCDIR/../build/shtool"
     17       1.1     lukem 
     18       1.1     lukem TB="" TN=""
     19       1.1     lukem if test -t 1 ; then
     20       1.1     lukem 	TB=`$SHTOOL echo -e "%B" 2>/dev/null`
     21       1.1     lukem 	TN=`$SHTOOL echo -e "%b" 2>/dev/null`
     22       1.1     lukem fi
     23       1.1     lukem 
     24       1.1     lukem echo "#######################################################################"
     25       1.1     lukem echo "###                                                                 ###"
     26       1.1     lukem echo "### regression tests                                                ###"
     27       1.1     lukem echo "###                                                                 ###"
     28       1.1     lukem echo "#######################################################################"
     29       1.1     lukem echo "###"
     30       1.1     lukem 
     31       1.1     lukem echo ">>>>> Executing all LDAP ITS regression tests"
     32       1.1     lukem 
     33       1.1     lukem for CMD in $SRCDIR/data/regressions/its*/its*; do
     34       1.1     lukem 	# remove cruft from prior test
     35       1.1     lukem 	if test $PRESERVE = yes ; then
     36       1.1     lukem 		/bin/rm -rf testrun/db.*
     37       1.1     lukem 	else
     38       1.1     lukem 		/bin/rm -rf testrun
     39       1.1     lukem 	fi
     40       1.1     lukem 
     41       1.1     lukem 	echo ">>>>> Starting ${TB}`basename $CMD`${TN} ..."
     42       1.1     lukem 	$CMD
     43       1.1     lukem 	RC=$?
     44       1.1     lukem 	if test $RC -eq 0 ; then
     45       1.1     lukem 		echo ">>>>> $CMD completed ${TB}OK${TN}."
     46       1.1     lukem 	else
     47       1.1     lukem 		echo ">>>>> $CMD ${TB}failed${TN} (exit $RC)"
     48       1.1     lukem 		exit $RC
     49       1.1     lukem 	fi
     50       1.1     lukem 
     51       1.1     lukem 	echo ""
     52       1.1     lukem done
     53