X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/db10766ab215cee68aa55f425708153d4db1c2b3..b8e9c234e657d0490eff5fcb0ef03c1c8366e160:/testsuite/rsync.fns diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index 7c44d591..80c218dd 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -32,6 +32,9 @@ else diffopt="-c" fi +HOME="$scratchdir" +export HOME + runtest() { echo $ECHO_N "Test $1: $ECHO_C" if eval "$2" @@ -44,6 +47,20 @@ runtest() { fi } +# Call this if you want to filter out verbose messages (-v or -vv) from +# the output of an rsync run (whittling the output down to just the file +# messages). This isn't needed if you use -i without -v. +filter_outfile() { + sed -e '/^building file list /d' \ + -e '/^created directory /d' \ + -e '/^done$/d' \ + -e '/ --whole-file$/d' \ + -e '/^total: /d' \ + -e '/^$/,$d' \ + <"$outfile" >"$outfile.new" + mv "$outfile.new" "$outfile" +} + printmsg() { echo "$1" }