summaryrefslogtreecommitdiff
path: root/debian/tests
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/control8
-rwxr-xr-xdebian/tests/regress52
2 files changed, 5 insertions, 55 deletions
diff --git a/debian/tests/control b/debian/tests/control
index ba59c97b4..85220df4e 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -2,12 +2,6 @@ Tests: regress
2Restrictions: needs-root allow-stderr 2Restrictions: needs-root allow-stderr
3Depends: devscripts, 3Depends: devscripts,
4 haveged, 4 haveged,
5 openssh-client, 5 openssh-tests,
6 openssh-server,
7 openssh-sftp-server,
8 openssl,
9 putty-tools (>= 0.67-2),
10 python-twisted-conch (>= 1:15.5.0-1),
11 sudo, 6 sudo,
12 sysvinit-utils, 7 sysvinit-utils,
13 @builddeps@,
diff --git a/debian/tests/regress b/debian/tests/regress
index 6c2a8daec..8bb73ee95 100755
--- a/debian/tests/regress
+++ b/debian/tests/regress
@@ -15,11 +15,10 @@ if [ "$(id -un)" != openssh-tests ]; then
15 else 15 else
16 start-stop-daemon --stop --quiet \ 16 start-stop-daemon --stop --quiet \
17 --retry=TERM/30/KILL/5 \ 17 --retry=TERM/30/KILL/5 \
18 --pidfile "$TMP/haveged.pid" \ 18 --pidfile "$ADTTMP/haveged.pid" \
19 --name haveged 19 --name haveged
20 fi 20 fi
21 fi 21 fi
22 rm -rf "$TMP"
23 rm -f /etc/sudoers.d/openssh-tests 22 rm -f /etc/sudoers.d/openssh-tests
24 if id openssh-tests >/dev/null 2>&1; then 23 if id openssh-tests >/dev/null 2>&1; then
25 deluser --remove-home openssh-tests 24 deluser --remove-home openssh-tests
@@ -37,7 +36,6 @@ openssh-tests ALL = (ALL:ALL) NOPASSWD: ALL
37EOF 36EOF
38 chmod 440 /etc/sudoers.d/openssh-tests 37 chmod 440 /etc/sudoers.d/openssh-tests
39 mkdir -p "$TMP" 38 mkdir -p "$TMP"
40 cp -a . "$TMP/tree"
41 chown -R openssh-tests:openssh-tests "$TMP" 39 chown -R openssh-tests:openssh-tests "$TMP"
42 40
43 # Depending on how the environment is configured, our test 41 # Depending on how the environment is configured, our test
@@ -56,8 +54,8 @@ EOF
56 STARTED_HAVEGED=: 54 STARTED_HAVEGED=:
57 elif ! pidof haveged >/dev/null; then 55 elif ! pidof haveged >/dev/null; then
58 start-stop-daemon --start --quiet \ 56 start-stop-daemon --start --quiet \
59 --pidfile "$TMP/haveged.pid" \ 57 --pidfile "$ADTTMP/haveged.pid" \
60 --exec /usr/sbin/haveged -- -p "$TMP/haveged.pid" 58 --exec /usr/sbin/haveged -- -p "$ADTTMP/haveged.pid"
61 STARTED_HAVEGED=: 59 STARTED_HAVEGED=:
62 fi 60 fi
63 61
@@ -65,46 +63,4 @@ EOF
65 exit "$?" 63 exit "$?"
66fi 64fi
67 65
68# Don't use "make tests"; we want to test the installed version. 66annotate-output +%H:%M:%S.%N /usr/lib/openssh/regress/run-tests "$TMP"
69
70cd "$TMP/tree"
71
72# We aren't actually going to use most of this build, but we need a basic
73# build tree in place in order to be able to build the regression tests.
74autoreconf -f -i
75cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./
76./configure
77make
78
79# The defaults for TEST_SSH_* in regress/test-exec.sh use the system
80# versions, but the top-level Makefile sets things up to test the just-built
81# versions, so we must bypass the latter in order to work correctly under
82# autopkgtest.
83make regress-prep
84make regress-binaries
85
86SRCDIR="$(pwd)"
87BUILDDIR="$SRCDIR"
88ret=0
89annotate-output +%H:%M:%S.%N make -C regress \
90 .OBJDIR="$BUILDDIR/regress" \
91 .CURDIR="$SRCDIR/regress" \
92 BUILDDIR="$BUILDDIR" \
93 OBJ="$BUILDDIR/regress" \
94 SUDO=sudo \
95 TEST_SHELL=sh \
96 TEST_SSH_SFTPSERVER=/usr/lib/openssh/sftp-server \
97 TEST_SSH_PLINK=plink \
98 TEST_SSH_PUTTYGEN=puttygen \
99 TEST_SSH_CONCH=conch \
100 TEST_SSH_IPV6=yes \
101 TEST_SSH_ECC=yes \
102 tests interop-tests </dev/zero || ret="$?"
103if [ "$ret" -ne 0 ]; then
104 for log in failed-regress.log failed-ssh.log failed-sshd.log; do
105 if [ -e "$BUILDDIR/regress/$log" ]; then
106 tail -v -n+0 "$BUILDDIR/regress/$log"
107 fi
108 done
109fi
110exit "$ret"