From 33d74266cd1d03b3afe1b6626331deac6c762fb3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 13 Sep 2019 16:02:26 +0100 Subject: [PATCH] test suite: Test dgit-mirror-ssh-wrap This script will break if rsync changes the way it passes arguments to the peer. We need to catch that. Signed-off-by: Ian Jackson --- tests/lib-core | 2 ++ tests/tests/mirror | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/lib-core b/tests/lib-core index 7e98acfb..7fdddb42 100644 --- a/tests/lib-core +++ b/tests/lib-core @@ -11,6 +11,7 @@ t-set-intree () { : ${DGIT_BADCOMMIT_FIXUP:=$DGIT_TEST_INTREE/dgit-badcommit-fixup} : ${DGIT_REPOS_SERVER_TEST:=$DGIT_TEST_INTREE/infra/dgit-repos-server} : ${DGIT_SSH_DISPATCH_TEST:=$DGIT_TEST_INTREE/infra/dgit-ssh-dispatch} +: ${DGIT_MIRROR_SSH_WRAP_TEST:=$DGIT_TEST_INTREE/infra/dgit-mirror-ssh-wrap} : ${DGIT_DEBPUSH_TEST:=$DGIT_TEST_INTREE/git-debpush} : ${DGIT_INFRA_PFX:=$DGIT_TEST_INTREE${DGIT_TEST_INTREE:+/infra/}} : ${DGIT_GITDEBREBASE_TEST:=$DGIT_TEST_INTREE/git-debrebase} @@ -18,6 +19,7 @@ t-set-intree () { : ${DEBPUSH_GIT_PLAYTREE_SETUP:=$DGIT_TEST_INTREE/git-playtree-setup} export DGIT_TEST DGIT_BADCOMMIT_FIXUP export DGIT_REPOS_SERVER_TEST DGIT_SSH_DISPATCH_TEST + export DGIT_MIRROR_SSH_WRAP_TEST export DGIT_MANPAGES_SOURCE_DIR DEBPUSH_GIT_PLAYTREE_SETUP export PERLLIB="$DGIT_TEST_INTREE${PERLLIB:+:}${PERLLIB}" } diff --git a/tests/tests/mirror b/tests/tests/mirror index 49476880..4aa756b0 100755 --- a/tests/tests/mirror +++ b/tests/tests/mirror @@ -31,7 +31,9 @@ set -ex : $sentinel cat >&2 $sentinel shift # eat HOST -sh -c "\$*" +export SSH_ORIGINAL_COMMAND="\$*" +exec \${DGIT_MIRROR_SSH_WRAP_TEST-dgit-mirror-ssh-wrap} \ + '$tmp/git-mirror/' .git -- END chmod +x $tmp/stunt-ssh -- 2.30.2