8 top="$(WVPASS pwd)" || exit $?
9 tmpdir="$(WVPASS wvmktempdir)" || exit $?
10 export BUP_DIR="$tmpdir/bup"
12 bup() { "$top/bup" "$@"; }
19 WVPASS force-delete $D
22 WVPASS bup random 128k >$D/b
23 WVPASS mkdir $D/d $D/d/e
24 WVPASS bup random 512 >$D/f
32 WVPASS bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
33 WVPASS rm "$BUP_DIR"/objects/pack/bup.bloom
35 WVPASS bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
36 WVPASS bup bloom -d "$BUP_DIR"/objects/pack --ruin --force
37 WVFAIL bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
38 WVPASS bup bloom --force -k 5
39 WVPASS bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
43 WVPASS bup memtest -c1 -n100
44 WVPASS bup memtest -c1 -n100 --existing
47 WVSTART "save/git-fsck"
52 WVPASS bup random 4k | WVPASS bup split -b
53 (WVPASS cd "$top/t/sampledata" && WVPASS bup save -vvn master /) || exit $?
54 result="$(git fsck --full --strict 2>&1)" || exit $?
56 WVFAIL egrep -v 'dangling (commit|tree|blob)' |
57 WVPASS tee -a /dev/stderr |
58 WVPASS wc -l) || exit $?
64 WVPASS bup ftp "cat /master/latest/$tmpdir/$D/b" >$D/b.new
65 WVPASS bup ftp "cat /master/latest/$tmpdir/$D/f" >$D/f.new
66 WVPASS bup ftp "cat /master/latest/$tmpdir/$D/f"{,} >$D/f2.new
67 WVPASS bup ftp "cat /master/latest/$tmpdir/$D/a" >$D/a.new
68 WVPASSEQ "$(sha1sum <$D/b)" "$(sha1sum <$D/b.new)"
69 WVPASSEQ "$(sha1sum <$D/f)" "$(sha1sum <$D/f.new)"
70 WVPASSEQ "$(cat $D/f.new{,} | sha1sum)" "$(sha1sum <$D/f2.new)"
71 WVPASSEQ "$(sha1sum <$D/a)" "$(sha1sum <$D/a.new)"
75 WVFAIL bup tag -d v0.n 2>/dev/null
76 WVFAIL bup tag v0.n non-existant 2>/dev/null
77 WVPASSEQ "$(bup tag)" ""
78 WVPASS bup tag v0.1 master
79 WVPASSEQ "$(bup tag)" "v0.1"
80 WVFAIL bup tag v0.1 master
81 WVPASS bup tag -f v0.1 master
82 WVPASS bup tag -d v0.1
83 WVPASS bup tag -f -d v0.1
84 WVFAIL bup tag -d v0.1
89 INDEXFILE=tmpindexfile.tmp
90 WVPASS rm -f $INDEXFILE
91 WVPASS force-delete $D
93 export BUP_DIR="$D/.bup"
98 WVPASS bup index -ux $D
99 WVPASS bup save --strip -n bupdir $D
100 WVPASSEQ "$(bup ls -F bupdir/latest/)" "a
103 WVPASS bup index -f $INDEXFILE --exclude=$D/c -ux $D
104 WVPASS bup save --strip -n indexfile -f $INDEXFILE $D
105 WVPASSEQ "$(bup ls indexfile/latest/)" "a
109 WVSTART "import-rsnapshot"
111 export BUP_DIR="$tmpdir/$D/.bup"
112 WVPASS force-delete $D
115 WVPASS mkdir -p $D/hourly.0/buptest/a
116 WVPASS touch $D/hourly.0/buptest/a/b
117 WVPASS mkdir -p $D/hourly.0/buptest/c/d
118 WVPASS touch $D/hourly.0/buptest/c/d/e
120 WVPASS bup import-rsnapshot $D/
121 WVPASSEQ "$(bup ls -F buptest/latest/)" "a/
125 WVPASS rm -rf "$tmpdir"