From: Rob Browning Date: Sun, 22 Feb 2015 21:27:43 +0000 (-0600) Subject: test-import-duplicity: clean up; add --archive-dir X-Git-Tag: 0.27-rc2~3^2~3 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=763b2d09f993b637a81257d7efdc6a4b5448cb6e test-import-duplicity: clean up; add --archive-dir If we don't specify an --archive-dir to duplicity, it'll scribble in ~/.cache/duplicity during testing. This is only a partial fix, given the duplicity invocations inside import-duplicity itself. Signed-off-by: Rob Browning --- diff --git a/t/test-import-duplicity.sh b/t/test-import-duplicity.sh index 7e41f3f..2ae638b 100755 --- a/t/test-import-duplicity.sh +++ b/t/test-import-duplicity.sh @@ -9,25 +9,30 @@ tmpdir="$(WVPASS wvmktempdir)" || exit $? export BUP_DIR="$tmpdir/bup" export GIT_DIR="$tmpdir/bup" -bup() { "$top/bup" "$@"; } - if ! [ "$(type -p duplicity)" != "" ]; then # FIXME: add WVSKIP. echo "Cannot find duplicity; skipping test)" 1>&2 exit 0 fi +bup() { "$top/bup" "$@"; } + export PASSPHRASE=bup_duplicity_passphrase D=duplicity.tmp WVSTART "import-duplicity" WVPASS bup init WVPASS cd "$tmpdir" + +dup() { duplicity --archive-dir "$tmpdir/dup-cache" "$@"; } + WVPASS mkdir duplicity -WVPASS duplicity "$top/Documentation" "file://duplicity" +WVPASS dup "$top/lib" file://duplicity WVPASS bup tick -WVPASS duplicity "$top/Documentation" "file://duplicity" +WVPASS dup "$top/lib" file://duplicity WVPASS bup import-duplicity "file://duplicity" import-duplicity WVPASSEQ "$(bup ls import-duplicity/ | wc -l)" "3" -WVPASSEQ "$(bup ls import-duplicity/latest/ | sort)" "$(ls $top/Documentation | sort)" +WVPASSEQ "$(bup ls import-duplicity/latest/ | sort)" "$(ls "$top/lib" | sort)" +WVPASS bup restore -C restore/ import-duplicity/latest/ +WVPASS diff -ruN "$top/lib" restore WVPASS rm -rf "$tmpdir"