From b6760514d86206ce810da5f8895f3c364b047515 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 5 Nov 2018 23:20:28 +0000 Subject: Add an openssh-tests binary package This contains enough files to run the upstream regression tests. Doing this allows autopkgtest to run more efficiently, as it doesn't have to build part of the source tree again. --- debian/run-tests | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 debian/run-tests (limited to 'debian/run-tests') diff --git a/debian/run-tests b/debian/run-tests new file mode 100755 index 000000000..7c7a8b2a3 --- /dev/null +++ b/debian/run-tests @@ -0,0 +1,39 @@ +#! /bin/sh +# Run installed OpenSSH regression tests. + +tmp="$1" +if [ -z "$tmp" ]; then + tmp="$(mktemp -d)" + cleanup () { + rm -rf "$tmp" + } + trap cleanup EXIT +fi + +# Copy the regression tests to a fresh directory; this is easier than trying +# to pick apart which ones need write access. +cp -a /usr/lib/openssh/regress "$tmp/regress" + +ret=0 +make -C "$tmp/regress" \ + .OBJDIR="$tmp/regress" \ + .CURDIR="$tmp/regress" \ + BUILDDIR="$tmp/regress" \ + OBJ="$tmp/regress" \ + SUDO=sudo \ + TEST_SHELL=sh \ + TEST_SSH_SFTPSERVER=/usr/lib/openssh/sftp-server \ + TEST_SSH_PLINK=plink \ + TEST_SSH_PUTTYGEN=puttygen \ + TEST_SSH_CONCH=conch \ + TEST_SSH_IPV6=yes \ + TEST_SSH_ECC=yes \ + tests interop-tests