]> arthur.barton.de Git - bup.git/commitdiff
test-fsck.sh: use stable data for tests
authorRob Browning <rlb@defaultvalue.org>
Sun, 8 Mar 2015 21:02:28 +0000 (16:02 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 8 Mar 2015 21:03:47 +0000 (16:03 -0500)
Use a stable install tree plus t/sampledata (for some variety) for the
test data, instead of "whatever's in ./lib, ./Documentation, and ./cmd".

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
t/test-fsck.sh

index d902331cace16026a2778be24b45bae42b12c857..27f103afc9ad9572571c0b2028fd94b05697cee0 100755 (executable)
@@ -6,20 +6,24 @@ set -o pipefail
 top="$(WVPASS pwd)" || exit $?
 tmpdir="$(WVPASS wvmktempdir)" || exit $?
 
+bup() { "$top/bup" "$@"; }
+
+WVPASS make install DESTDIR="$tmpdir/src"
+WVPASS cp -a "$top/t/sampledata" "$tmpdir/src/"
+
 export BUP_DIR="$tmpdir/bup"
 export GIT_DIR="$tmpdir/bup"
 
-bup() { "$top/bup" "$@"; }
-
 WVPASS bup init
 WVPASS cd "$tmpdir"
 
 WVSTART "fsck"
 
-WVPASS bup index "$top"
-WVPASS bup save -n fsck-test "$top/lib"
-WVPASS bup save -n fsck-test "$top/Documentation"
-WVPASS bup save -n fsck-test "$top/cmd"
+WVPASS bup index src
+WVPASS bup save -n fsck-test src/sampledata
+WVPASS bup save -n fsck-test src/usr/bin
+WVPASS bup save -n fsck-test src/usr/lib
+WVPASS bup save -n fsck-test src/usr/share
 WVPASS bup fsck
 WVPASS bup fsck --quick
 if bup fsck --par2-ok; then