]> arthur.barton.de Git - bup.git/blobdiff - t/test-import-duplicity.sh
get: adjust for python 3 and test there
[bup.git] / t / test-import-duplicity.sh
index 8931c084ca64733ce7299452a4857d4fbc3e767e..74aabc69e7234fdc894f8e45e3dfc6b4a5cdea02 100755 (executable)
@@ -16,7 +16,7 @@ bup() { "$top/bup" "$@"; }
 dup() { duplicity --archive-dir "$tmpdir/dup-cache" "$@"; }
 
 WVSTART "import-duplicity"
-WVPASS make install DESTDIR="$tmpdir/src"
+WVPASS "$top/t/sync-tree" "$top/t/sampledata/" "$tmpdir/src/"
 
 export BUP_DIR="$tmpdir/bup"
 export GIT_DIR="$tmpdir/bup"
@@ -30,13 +30,18 @@ WVPASS bup tick
 WVPASS touch src/new-file
 WVPASS dup src file://duplicity
 WVPASS bup import-duplicity "file://duplicity" import-duplicity
-WVPASSEQ "$(bup ls import-duplicity/ | wc -l)" "3"
+WVPASSEQ $(bup ls import-duplicity/ | wc -l) 3
 WVPASSEQ "$(bup ls import-duplicity/latest/ | sort)" "$(ls src | sort)"
 WVPASS bup restore -C restore/ import-duplicity/latest/
 WVFAIL "$top/t/compare-trees" src/ restore/ > tmp-compare-trees
-WVPASSEQ $(cat tmp-compare-trees | wc -l) 1
+WVPASSEQ $(cat tmp-compare-trees | wc -l) 4
 # Note: OS X rsync itemize output is currently only 9 chars, not 11.
-expected_diff_rx='^\.d\.\.t.\.\.\.\.?\.? \./$'
+# Expect something like this (without the leading spaces):
+#   .d..t...... ./
+#   .L..t...... abs-symlink -> /home/foo/bup/t/sampledata/var/abs-symlink-target
+#   .L..t...... b -> a
+#   .L..t...... c -> b
+expected_diff_rx='^\.d\.\.t.\.\.\.\.?\.? \./$|^\.L\.\.t.\.\.\.\.?\.? '
 if ! grep -qE "$expected_diff_rx" tmp-compare-trees; then
     echo -n 'tmp-compare-trees: ' 1>&2
     cat tmp-compare-trees 1>&2