Add comment: cyeoh says that getpass is deprecated, because it may
[rsync/rsync.git] / testsuite / master.test
index ab0cd4f..4df5f34 100755 (executable)
@@ -21,6 +21,8 @@
 
 # The pwd is undefined when this script starts.
 
+set -x
+
 set -e
 
 if ! [ -d "$testdir" ] && ! mkdir "$testdir"
@@ -32,7 +34,10 @@ fi
 testdir=`cd $testdir && pwd`
 
 echo "srcdir is originally \"$srcdir\""
-srcdir=`cd "$srcdir" && pwd`
+if [ "$srcdir" != "" ]
+then
+    srcdir=`cd "$srcdir" && pwd`
+fi
 
 echo "============================================================"
 echo "$0 running in `pwd`"
@@ -50,7 +55,7 @@ missing=0
 passed=0
 failed=0
 
-suitedir=`cd ./testsuite && pwd`
+suitedir="$srcdir/testsuite"
 echo "    suitedir=$suitedir"
 
 . "$suitedir/config.sh"
@@ -85,3 +90,10 @@ echo "      $failed failed"
 echo "      $skipped skipped"
 echo "      $missing missing"
 echo '------------------------------------------------------------'
+
+if test $failed -gt 0
+then
+    exit 1
+else
+    exit 0
+fi