2 . ./wvtest-bup.sh || exit $?
6 top="$(WVPASS pwd)" || exit $?
7 tmpdir="$(WVPASS wvmktempdir)" || exit $?
9 export BUP_DIR="$tmpdir/bup"
10 export GIT_DIR="$tmpdir/bup"
12 if ! [ "$(type -p duplicity)" != "" ]; then
14 echo "Cannot find duplicity; skipping test)" 1>&2
18 bup() { "$top/bup" "$@"; }
20 export PASSPHRASE=bup_duplicity_passphrase
22 WVSTART "import-duplicity"
26 dup() { duplicity --archive-dir "$tmpdir/dup-cache" "$@"; }
28 WVPASS mkdir duplicity
29 WVPASS dup "$top/lib" file://duplicity
31 WVPASS dup "$top/lib" file://duplicity
32 WVPASS bup import-duplicity "file://duplicity" import-duplicity
33 WVPASSEQ "$(bup ls import-duplicity/ | wc -l)" "3"
34 WVPASSEQ "$(bup ls import-duplicity/latest/ | sort)" "$(ls "$top/lib" | sort)"
35 WVPASS bup restore -C restore/ import-duplicity/latest/
36 WVPASS diff -ruN "$top/lib" restore
38 WVPASS rm -rf "$tmpdir"