diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-03-05 22:24:51 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-03-05 22:24:51 +0000 |
commit | f1ce9640f043f5b91d1965cdbb698862da38de78 (patch) | |
tree | b66da96b2de54616837ef79e852b88b4de759ce1 | |
parent | 5bdf1ee2512e1334d2489360a65cbab48979b64b (diff) | |
download | obnam-f1ce9640f043f5b91d1965cdbb698862da38de78.tar.gz |
Allow access to backup repository via sftp
Separate the URL for obnam's access to the repository,
and the directory pathname for the test scripts' access.
-rwxr-xr-x | test-locking | 11 | ||||
-rwxr-xr-x | test-many-generations | 13 | ||||
-rwxr-xr-x | verification-test | 18 |
3 files changed, 22 insertions, 20 deletions
diff --git a/test-locking b/test-locking index 99643a26..1c6cce09 100755 --- a/test-locking +++ b/test-locking @@ -23,17 +23,18 @@ die() exit 1 } -[ "$#" = 2 ] || die "Bad usage, read source!" +[ "$#" = 3 ] || die "Bad usage, read source!" NCLIENTS="$1" -NGENERATIONS=2 -repo="$2" +NGENERATIONS=16 +repourl="$2" +repopath="$3" pids="$(mktemp)" for i in $(seq "$NCLIENTS") do - ./test-many-generations "$NGENERATIONS" "$repo" "client-$i" \ - > "client-$i.output" 2>&1 & + ./test-many-generations "$NGENERATIONS" "$repourl" "$repopath" \ + "client-$i" > "client-$i.output" 2>&1 & echo "$!" >> "$pids" done diff --git a/test-many-generations b/test-many-generations index ed07e047..e680587b 100755 --- a/test-many-generations +++ b/test-many-generations @@ -25,11 +25,12 @@ die() exit 1 } -[ "$#" = 3 ] || die "Bad usage, read source!" +[ "$#" = 4 ] || die "Bad usage, read source!" N="$1" -repo="$2" -client="$3" +repourl="$2" +repopath="$3" +client="$4" root="$(mktemp -d)" amount="1k" @@ -40,6 +41,8 @@ client-name = $client quiet = yes log = $client.log trace = obnamlib +repository = $repourl +root = $root EOF seq "$N" | @@ -47,12 +50,12 @@ while read gen do genbackupdata --quiet --create="$amount" "$root" --seed="$RANDOM" find "$root" -exec touch --date="1970-01-01 00:00:$gen" '{}' ';' - ./verification-test backup "$repo" "$root" "$conf" + ./verification-test backup "$repopath" "$root" "$conf" done while true do - ./verification-test verify "$repo" "$root" "$conf" + ./verification-test verify "$repopath" "$root" "$conf" ret="$?" if [ "$ret" = 0 ] then diff --git a/verification-test b/verification-test index 208de90a..d645e9f5 100755 --- a/verification-test +++ b/verification-test @@ -65,10 +65,9 @@ backup() local client=$(awk '/client-name/ { print $3 }' "$conf") local genids=$(mktemp) - ./obnam --no-default-configs --config="$conf" -r "$repo" backup "$dir" + ./obnam --no-default-configs --config="$conf" backup - while ! ./obnam --no-default-configs --config="$conf" -r "$repo" genids \ - > "$genids" + while ! ./obnam --no-default-configs --config="$conf" genids > "$genids" do : done @@ -96,12 +95,12 @@ verify() local tempdir="$(mktemp -d)" local client=$(awk '/client-name/ { print $3 }' "$conf") - ./obnam --no-default-configs --config="$conf" -r "$repo" genids \ + ./obnam --no-default-configs --config="$conf" genids \ > "$tempdir"/gens || exit 42 while read gen do rm -rf "$tempdir/$gen" - ./obnam --no-default-configs --config="$conf" -r "$repo" \ + ./obnam --no-default-configs --config="$conf" \ restore --to="$tempdir/$gen" --generation="$gen" || \ exit 42 summain "$tempdir/$gen/$dir" -r --output="$tempdir/summain.$gen" @@ -114,12 +113,11 @@ verify() rm -rf "$tempdir" } -[ "$#" = 3 ] || [ "$#" = 4 ] || die "Bad usage, read source!" +[ "$#" = 4 ] || die "Bad usage, read source!" -case "$#" in - 3) repo="$2"; root="$3"; conf="/dev/null" ;; - 4) repo="$2"; root="$3"; conf="$4" ;; -esac +repo="$2" +root="$3" +conf="$4" case "$1" in backup) |