summaryrefslogtreecommitdiff
path: root/verification-test
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-03-01 10:32:36 +0000
committerLars Wirzenius <liw@liw.fi>2012-03-01 10:32:36 +0000
commitf56c834c57029b248cc518c90798d194efcf4675 (patch)
treedc6f4531147b80a24155dc7cb95e8525dbb85793 /verification-test
parent357a6932a7ac63bca382520ef41eda5e67a3e340 (diff)
downloadobnam-f56c834c57029b248cc518c90798d194efcf4675.tar.gz
Store golden summain files with per-client names
Previously, every client used the same names, which meant they overwrote each others' files. Oops.
Diffstat (limited to 'verification-test')
-rwxr-xr-xverification-test8
1 files changed, 5 insertions, 3 deletions
diff --git a/verification-test b/verification-test
index 30956263..4bfef11b 100755
--- a/verification-test
+++ b/verification-test
@@ -60,11 +60,12 @@ backup()
local repo="$1"
local dir="$2"
local conf="$3"
-
+ local client=$(awk '/client-name/ { print $3 }' "$conf")
+
./obnam --no-default-configs --config="$conf" -r "$repo" backup "$dir"
local gen=$(./obnam --no-default-configs --config="$conf" -r "$repo" \
genids | tail -n1)
- summain "$dir" -r --output="$repo/summain.$gen"
+ summain "$dir" -r --output="$repo/$client.$gen.summain"
}
abspath()
@@ -81,6 +82,7 @@ verify()
local dir=$(abspath "$2")
local conf="$3"
local tempdir="$(mktemp -d)"
+ local client=$(awk '/client-name/ { print $3 }' "$conf")
./obnam --no-default-configs --config="$conf" -r "$repo" genids |
while read gen
@@ -88,7 +90,7 @@ verify()
./obnam --no-default-configs --config="$conf" -r "$repo" \
restore --to="$tempdir/$gen" --generation="$gen"
summain "$tempdir/$gen/$dir" -r --output="$tempdir/summain.$gen"
- if ! diff -u "$repo/summain.$gen" "$tempdir/summain.$gen"
+ if ! diff -u "$repo/$client.$gen.summain" "$tempdir/summain.$gen"
then
die "generation $gen failed to restore properly, see $tempdir"
fi