#!/bin/bash set -e echo "Testing \"$@\" in Makefile:" TOP="$(pwd)" export BUP_DIR="$TOP/buptest.tmp" alias bup="$TOP/bup" set -x rm -rf "$BUP_DIR" bup init bup split --bench -b tags1.tmp bup split -vvvv -b testfile2 >tags2.tmp bup split -t testfile2 >tags2t.tmp bup split -c testfile2 >tags2c.tmp diff -u tags1.tmp tags2.tmp || true wc -c testfile1 testfile2 wc -l tags1.tmp tags2.tmp bup join $(cat tags1.tmp) >out1.tmp bup join out2.tmp bup join out2t.tmp bup join out2c.tmp diff -u testfile1 out1.tmp diff -u testfile2 out2.tmp diff -u testfile2 out2t.tmp diff -u testfile2 out2c.tmp ( set -e cd "$BUP_DIR" || exit 1 git repack -Ad git prune (cd "$TOP/t/sampledata" && bup save -vvn master .) || exit 1 n=$(git fsck --full --strict 2>&1 | tee /dev/stderr | wc -l) if [ "$n" != 0 ]; then echo "git fsck error." exit 5 fi ) || exit 1