Skip to content

Commit 8b6ebde

Browse files
author
Wayne Davison
committed
Be clear on which part(s) of testsuite's checkit() failed.
1 parent 1c99b1d commit 8b6ebde

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

testsuite/rsync.fns

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,31 +222,32 @@ checkit() {
222222
eval "$1"
223223
status=$?
224224
if [ $status != 0 ]; then
225-
failed="YES";
225+
failed="$failed status=$status"
226226
fi
227227

228228
echo "-------------"
229229
echo "check how the directory listings compare with diff:"
230230
echo ""
231231
( cd "$2" && rsync_ls_lR . ) > "$tmpdir/ls-from"
232232
( cd "$3" && rsync_ls_lR . ) > "$tmpdir/ls-to"
233-
diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to" || failed=YES
233+
diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to" || failed="$failed dir-diff"
234234

235235
echo "-------------"
236236
echo "check how the files compare with diff:"
237237
echo ""
238238
if [ "x$4" != x ]; then
239239
echo " === Skipping (as directed) ==="
240240
else
241-
diff -r $diffopt "$2" "$3" || failed=YES
241+
diff -r $diffopt "$2" "$3" || failed="$failed file-diff"
242242
fi
243243

244244
echo "-------------"
245245
if [ -z "$failed" ] ; then
246246
return 0
247-
else
248-
return 1
249247
fi
248+
249+
echo "Failed: $failed"
250+
return 1
250251
}
251252

252253

0 commit comments

Comments
 (0)