diff options
author | Colin Watson <cjwatson@debian.org> | 2018-11-05 23:20:28 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-11-05 23:20:29 +0000 |
commit | b6760514d86206ce810da5f8895f3c364b047515 (patch) | |
tree | a560e672484de8661bc961eacaea2e0b64d92a8f /debian/run-tests | |
parent | d41b9922e63e5069991d0e28079d710637715149 (diff) |
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.
Diffstat (limited to 'debian/run-tests')
-rwxr-xr-x | debian/run-tests | 39 |
1 files changed, 39 insertions, 0 deletions
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 @@ | |||
1 | #! /bin/sh | ||
2 | # Run installed OpenSSH regression tests. | ||
3 | |||
4 | tmp="$1" | ||
5 | if [ -z "$tmp" ]; then | ||
6 | tmp="$(mktemp -d)" | ||
7 | cleanup () { | ||
8 | rm -rf "$tmp" | ||
9 | } | ||
10 | trap cleanup EXIT | ||
11 | fi | ||
12 | |||
13 | # Copy the regression tests to a fresh directory; this is easier than trying | ||
14 | # to pick apart which ones need write access. | ||
15 | cp -a /usr/lib/openssh/regress "$tmp/regress" | ||
16 | |||
17 | ret=0 | ||
18 | make -C "$tmp/regress" \ | ||
19 | .OBJDIR="$tmp/regress" \ | ||
20 | .CURDIR="$tmp/regress" \ | ||
21 | BUILDDIR="$tmp/regress" \ | ||
22 | OBJ="$tmp/regress" \ | ||
23 | SUDO=sudo \ | ||
24 | TEST_SHELL=sh \ | ||
25 | TEST_SSH_SFTPSERVER=/usr/lib/openssh/sftp-server \ | ||
26 | TEST_SSH_PLINK=plink \ | ||
27 | TEST_SSH_PUTTYGEN=puttygen \ | ||
28 | TEST_SSH_CONCH=conch \ | ||
29 | TEST_SSH_IPV6=yes \ | ||
30 | TEST_SSH_ECC=yes \ | ||
31 | tests interop-tests </dev/zero || ret="$?" | ||
32 | if [ "$ret" -ne 0 ]; then | ||
33 | for log in failed-regress.log failed-ssh.log failed-sshd.log; do | ||
34 | if [ -e "$tmp/regress/$log" ]; then | ||
35 | tail -v -n+0 "$tmp/regress/$log" | ||
36 | fi | ||
37 | done | ||
38 | fi | ||
39 | exit "$ret" | ||