summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinfra/dgit-ssh-dispatch3
-rwxr-xr-xtests/dsd-ssh5
2 files changed, 8 insertions, 0 deletions
diff --git a/infra/dgit-ssh-dispatch b/infra/dgit-ssh-dispatch
index 377f8b8..f525055 100755
--- a/infra/dgit-ssh-dispatch
+++ b/infra/dgit-ssh-dispatch
@@ -130,6 +130,9 @@ sub dispatch () {
my $cmd=$1;
selectpackage $2,$3;
if ($cmd eq 'receive-pack') {
+ $ENV{'PERLLIB'} //= '';
+ $ENV{'PERLLIB'} =~ s#^(?=.)#:#;
+ $ENV{'PERLLIB'} =~ s#^# $ENV{DGIT_TEST_INTREE} // $dgitlive #e;
my $s = "$dgitlive/infra/dgit-repos-server";
exec $s, $distro, $d, $authrune, qw(--ssh);
die "exec $s: $!";
diff --git a/tests/dsd-ssh b/tests/dsd-ssh
index 7a075f0..94a9582 100755
--- a/tests/dsd-ssh
+++ b/tests/dsd-ssh
@@ -8,6 +8,11 @@ tmp=$DGIT_TEST_TMP
cd /
userhost="$1"; shift
export SSH_ORIGINAL_COMMAND="$*"
+
+# undoes PERLLIB so that we rely on dgit-ssh-dispatch setting it
+# we have to compensate with -I so that dgit-ssh-dispatch finds Dgit.pm
+unset PERLLIB
+perl -I $DGIT_TEST_INTREE \
${DGIT_SSH_DISPATCH_TEST-dgit-ssh-dispatch} -D $tmp
: '))))))))))))))))))))))))))))))))))))))))'