diff options
Diffstat (limited to 'debian/tests/regress')
-rwxr-xr-x | debian/tests/regress | 52 |
1 files changed, 4 insertions, 48 deletions
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 | |||
37 | EOF | 36 | EOF |
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 "$?" |
66 | fi | 64 | fi |
67 | 65 | ||
68 | # Don't use "make tests"; we want to test the installed version. | 66 | annotate-output +%H:%M:%S.%N /usr/lib/openssh/regress/run-tests "$TMP" |
69 | |||
70 | cd "$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. | ||
74 | autoreconf -f -i | ||
75 | cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./ | ||
76 | ./configure | ||
77 | make | ||
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. | ||
83 | make regress-prep | ||
84 | make regress-binaries | ||
85 | |||
86 | SRCDIR="$(pwd)" | ||
87 | BUILDDIR="$SRCDIR" | ||
88 | ret=0 | ||
89 | annotate-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="$?" | ||
103 | if [ "$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 | ||
109 | fi | ||
110 | exit "$ret" | ||