1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

s3:tests: clean up old log directories of the registry.roundtrip test

This commit is contained in:
Michael Adam 2011-02-21 12:48:15 +01:00
parent 2ba57fd183
commit 4ee1c7c493

View File

@ -44,9 +44,11 @@ conf_roundtrip_step() {
# echo -n .
}
LOGDIR_PREFIX="conf_roundtrip"
conf_roundtrip()
{
local DIR=$(mktemp -d --tmpdir=$PREFIX conf_roundtrip_XXXX)
local DIR=$(mktemp -d --tmpdir=$PREFIX ${LOGDIR_PREFIX}_XXXX)
local LOG=$DIR/log
echo conf_roundtrip $1 > $LOG
@ -98,6 +100,12 @@ conf_roundtrip()
CONF_FILES=${CONF_FILES:-$(find $SRCDIR/ -name '*.conf' | xargs grep -l "\[global\]")}
# remove old logs:
for OLDDIR in $(find ${PREFIX} -type d -name "${LOGDIR_PREFIX}_*") ; do
echo "removing old directory ${OLDDIR}"
rm -rf ${OLDDIR}
done
for conf_file in $CONF_FILES
do
testit "conf_roundtrip $conf_file" \