Export autoconf settings to test scripts. Use this to cope with
authorMartin Pool <mbp@samba.org>
Fri, 17 Aug 2001 01:57:42 +0000 (01:57 +0000)
committerMartin Pool <mbp@samba.org>
Fri, 17 Aug 2001 01:57:42 +0000 (01:57 +0000)
systems that don't use "echo -n".

configure.in
testsuite/hands.test
testsuite/master.test

index 5652296..56db4a0 100644 (file)
@@ -340,4 +340,4 @@ AC_SUBST(OBJ_RESTORE)
 AC_SUBST(CC_SHOBJ_FLAG)
 AC_SUBST(BUILD_POPT)
 
-AC_OUTPUT(Makefile lib/dummy zlib/dummy)
+AC_OUTPUT(Makefile lib/dummy zlib/dummy testsuite/config.sh)
index dcd80c5..ba1b176 100644 (file)
@@ -12,7 +12,7 @@
 RSYNC="$rsync_bin"
 
   runtest() {
-    echo -n "Test $1: "
+    echo $ECHO_N "Test $1: $ECHO_C"
     eval "$2"
   }
   printmsg() {
@@ -35,7 +35,9 @@ mkdir $TO
 touch ${FROM}/empty
 mkdir ${FROM}/emptydir
 ps ax > ${FROM}/pslist
-echo -n "This file has no trailing lf" > ${FROM}/nolf
+
+# This might fail on systems that don't have -n
+echo $ECHO_N "This file has no trailing lf$ECHO_C" > ${FROM}/nolf
 ln -s nolf ${FROM}/nolf-symlink
 cat /etc/inittab /etc/services /etc/resolv.conf > ${FROM}/${F1}
 mkdir ${FROM}/dir
@@ -68,7 +70,7 @@ checkit() {
   ( cd $3 ; ls -laR ) > ${TMP}/ls-to  2>>${log}
   diff -u ${TMP}/ls-from ${TMP}/ls-to >>${log} 2>&1 || failed=YES
   if [ -z "${failed}" ] ; then
-    echo "     done."
+    echo "${ECHO_T}    done."
     rm $log
     return 0
   else
@@ -76,7 +78,7 @@ checkit() {
       cat ${log}
       rm ${log}
     else
-      echo "   FAILED (test # ${testnum} status=$status).\a"
+      echo "${ECHO_T}  FAILED (test # ${testnum} status=$status).\a"
     fi
     return 1
   fi
index 2260386..f675c08 100755 (executable)
@@ -53,6 +53,8 @@ suitedir="$srcdir/testsuite"
 cd "$suitedir"
 echo "    suitedir=$suitedir"
 
+. "$suitedir/config.sh"
+
 for testbase in $test_names
 do
     testscript="./$testbase.test"