X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=t%2Ftest-import-duplicity.sh;h=74aabc69e7234fdc894f8e45e3dfc6b4a5cdea02;hb=bf67f94dd4f4096de4eee07a7dc377d6c889a016;hp=8931c084ca64733ce7299452a4857d4fbc3e767e;hpb=637b15a6f5123ed80a6855cf6cc646c7675da9f2;p=bup.git diff --git a/t/test-import-duplicity.sh b/t/test-import-duplicity.sh index 8931c08..74aabc6 100755 --- a/t/test-import-duplicity.sh +++ b/t/test-import-duplicity.sh @@ -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