From 9779ee47871217df935261f6931eeb285198da51 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 8 Oct 2014 22:33:32 +0100 Subject: Run a subset of the upstream regression test suite at package build time, and the rest of it under autopkgtest. --- debian/tests/regress | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 debian/tests/regress (limited to 'debian/tests/regress') diff --git a/debian/tests/regress b/debian/tests/regress new file mode 100644 index 000000000..0e3fbc4ae --- /dev/null +++ b/debian/tests/regress @@ -0,0 +1,38 @@ +#! /bin/sh +set -e + +# Don't use "make tests"; we want to test the installed version. + +cp -a . "$ADTTMP/tree" +cd "$ADTTMP/tree" + +# We aren't actually going to use most of this build, but we need a basic +# build tree in place in order to be able to build the regression tests. +autoreconf -f -i +cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./ +./configure +make + +# The defaults for TEST_SSH_* in regress/test-exec.sh use the system +# versions, but the top-level Makefile sets things up to test the just-built +# versions, so we must bypass the latter in order to work correctly under +# autopkgtest. +make regress-prep +make regress/modpipe \ + regress/setuid-allowed \ + regress/unittests/sshbuf/test_sshbuf \ + regress/unittests/sshkey/test_sshkey + +SRCDIR="$(pwd)" +BUILDDIR="$SRCDIR" +make -C regress \ + .OBJDIR="$BUILDDIR/regress" \ + .CURDIR="$SRCDIR/regress" \ + BUILDDIR="$BUILDDIR" \ + OBJ="$BUILDDIR/regress" \ + SUDO=sudo \ + TEST_SHELL=sh \ + TEST_SSH_SFTPSERVER=/usr/lib/openssh/sftp-server \ + TEST_SSH_IPV6=yes \ + TEST_SSH_ECC=yes \ + tests interop-tests -- cgit v1.2.3