chiark / gitweb /
test suite: Test dgit-mirror-ssh-wrap
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 13 Sep 2019 15:02:26 +0000 (16:02 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 13 Sep 2019 15:46:40 +0000 (16:46 +0100)
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 <ijackson@chiark.greenend.org.uk>
tests/lib-core
tests/tests/mirror

index 7e98acfbe07c3dea16dae1e6b1ed4ecef0d17681..7fdddb42614cae2325b6ecaab86e9579c01b044d 100644 (file)
@@ -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}"
 }
index 49476880aa2d446b282f330af9855ee896469b81..4aa756b0f2879dd1be870f0afd43f65be795935f 100755 (executable)
@@ -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