Fix test suite breakage in calling tls.
authorMartin Pool <mbp@samba.org>
Sun, 2 Dec 2001 07:22:54 +0000 (07:22 +0000)
committerMartin Pool <mbp@samba.org>
Sun, 2 Dec 2001 07:22:54 +0000 (07:22 +0000)
Clean up test directory on completion.

testsuite/hands.test
testsuite/rsync.fns

index 01f19bc..fced34a 100644 (file)
@@ -26,3 +26,5 @@ cp ${FROM}/text ${TO}/ThisShouldGo
 runtest " --delete" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
 checkforlogs ${LOG}.?
+
+hands_cleanup
\ No newline at end of file
index 8f8e7d3..cf22a97 100644 (file)
@@ -53,7 +53,8 @@ hands_setup() {
     # Clean before creation
     rm -rf $FROM
     rm -rf $TO
-    
+
+    [ -d $TMP ] || mkdir $TMP
     [ -d $FROM ] || mkdir $FROM
     [ -d $TO ] || mkdir $TO
 
@@ -72,7 +73,7 @@ hands_setup() {
     mkdir ${FROM}/emptydir
 
     # a hundred lines of text or so
-    rsync_ls_lR ${srcdir} > ${FROM}/filelist
+    rsync_ls_lR "${srcdir}" > ${FROM}/filelist
 
     # This might fail on systems that don't have -n
     echo $ECHO_N "This file has no trailing lf$ECHO_C" > ${FROM}/nolf
@@ -94,6 +95,11 @@ hands_setup() {
 }
 
 
+hands_cleanup() {
+    rm -r "$TMP"
+}
+
+
 
 
 ####################
@@ -149,8 +155,8 @@ checkit() {
     echo "-------------">>${log}
     echo "check how the directory listings compare with diff:">>${log}
     echo "">>${log}
-    ( cd "$2" && rsync_ls_lR ) > ${TMP}/ls-from 2>>${log}
-    ( cd "$3" && rsync_ls_lR ) > ${TMP}/ls-to  2>>${log}
+    ( cd "$2" && rsync_ls_lR ) > ${TMP}/ls-from 2>>${log}
+    ( cd "$3" && rsync_ls_lR ) > ${TMP}/ls-to  2>>${log}
     diff -c ${TMP}/ls-from ${TMP}/ls-to >>${log} 2>&1 || failed=YES
     if [ -z "${failed}" ] ; then
        rm $log
@@ -204,3 +210,5 @@ EOF
 }
 
 
+# be reproducible
+umask 077
\ No newline at end of file