don't out \r to syslog
[oweals/busybox.git] / testsuite / runtest
index 7411aec6487aae72df0546d3ac9d4fa0526b9d3a..4ac1d3bfed0b637ab5fe61383c26e2145446dc8c 100755 (executable)
@@ -90,25 +90,29 @@ else
 fi
 
 for applet in $applets; do
-       if [ "$applet" == links ]; then continue; fi
-       if [ "$applet" != CVS -a -d "$srcdir/$applet" ]; then
+       if [ "$applet" = "links" ]; then continue; fi
+       if [ "$applet" != "CVS" -a -d "$srcdir/$applet" ]; then
                if run_applet_tests $applet; then
                        :
                else
                        status=1
                fi
        fi
-       applet=`echo "$applet" | sed -n 's/\.tests$//p'`
-       if [ ${#applet} != 0 ]
+       applet=$(echo "$applet" | sed -n 's/\.tests$//p')
+       if [ ${#applet} -ne 0 ]
        then
-               mkdir links 2>/dev/null
-               rm -f links/"$applet"
+               if [ -d links ]; then
+                       rm -f links/"$applet" 
+               else
+                       mkdir links 2> /dev/null
+               fi
                ln -s ${bindir:-../..}/busybox links/"$applet"
-               PATH="$srcdir:$PATH" COMMAND="links/$applet" "${srcdir:-.}/$applet".tests
+               PATH="$srcdir:$PATH" COMMAND="links/$applet" \
+                       "${srcdir:-.}/$applet".tests
                if [ $? -ne 0 ]; then status=1; fi
        fi
 
-
 done
-
+rm -f links/*
+rmdir links
 exit $status