Be clear on which part(s) of testsuite's checkit() failed.
authorWayne Davison <wayned@samba.org>
Sun, 2 Jan 2011 01:28:56 +0000 (17:28 -0800)
committerWayne Davison <wayned@samba.org>
Mon, 21 Feb 2011 19:32:51 +0000 (11:32 -0800)
testsuite/rsync.fns

index 412ea3b..903bd6c 100644 (file)
@@ -223,7 +223,7 @@ checkit() {
     eval "$1" 
     status=$?
     if [ $status != 0 ]; then
-       failed="YES";
+       failed="$failed status=$status"
     fi
 
     echo "-------------"
@@ -231,7 +231,7 @@ checkit() {
     echo ""
     ( cd "$2" && rsync_ls_lR . ) > "$tmpdir/ls-from"
     ( cd "$3" && rsync_ls_lR . ) > "$tmpdir/ls-to"
-    diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to" || failed=YES
+    diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to" || failed="$failed dir-diff"
 
     echo "-------------"
     echo "check how the files compare with diff:"
@@ -239,15 +239,16 @@ checkit() {
     if [ "x$4" != x ]; then
        echo "  === Skipping (as directed) ==="
     else
-       diff -r $diffopt "$2" "$3" || failed=YES
+       diff -r $diffopt "$2" "$3" || failed="$failed file-diff"
     fi
 
     echo "-------------"
     if [ -z "$failed" ] ; then
        return 0
-    else
-       return 1
     fi
+
+    echo "Failed: $failed"
+    return 1
 }