diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 19:49:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 19:49:47 +0000 |
commit | 9c5dd847393c7c0f37ef557d7a0d402deedd8d2a (patch) | |
tree | dcb9b4740181f58a5d235e8ca52f9855494f486e /debian/run-tests | |
parent | Adding upstream version 1:9.6p1. (diff) | |
download | openssh-9c5dd847393c7c0f37ef557d7a0d402deedd8d2a.tar.xz openssh-9c5dd847393c7c0f37ef557d7a0d402deedd8d2a.zip |
Adding debian version 1:9.6p1-4.debian/1%9.6p1-4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/run-tests')
-rwxr-xr-x | debian/run-tests | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/debian/run-tests b/debian/run-tests new file mode 100755 index 0000000..52fcaf7 --- /dev/null +++ b/debian/run-tests @@ -0,0 +1,49 @@ +#! /bin/sh +# Run installed OpenSSH regression tests. + +tmp="$1" +if [ -z "$tmp" ]; then + tmp="$(mktemp -d)" + cleanup () { + rm -rf "$tmp" + } + trap cleanup EXIT +fi +shift +if [ -z "$1" ]; then + set -- tests interop-tests +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=/bin/sh \ + TEST_SSH_SSH=/usr/bin/ssh \ + TEST_SSH_SFTPSERVER=/usr/lib/openssh/sftp-server \ + TEST_SSH_PLINK=/usr/bin/plink \ + TEST_SSH_PUTTYGEN=/usr/bin/puttygen \ + TEST_SSH_CONCH=/usr/bin/conch3 \ + TEST_SSH_DROPBEAR=/usr/bin/dropbear \ + TEST_SSH_DROPBEARKEY=/usr/bin/dropbearkey \ + TEST_SSH_DROPBEARCONVERT=/usr/bin/dropbearconvert \ + TEST_SSH_DBCLIENT=/usr/bin/dbclient \ + TEST_SSH_IPV6=yes \ + TEST_SSH_ECC=yes \ + TEST_SSH_UNSAFE_PERMISSIONS=1 \ + "$@" </dev/zero || ret="$?" +if [ "$ret" -ne 0 ]; then + for log in failed-regress.log failed-ssh.log failed-sshd.log; do + if [ -e "$tmp/regress/$log" ]; then + tail -v -n+0 "$tmp/regress/$log" + fi + done +fi +exit "$ret" |