summaryrefslogtreecommitdiffstats
path: root/debian/run-tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:26:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:26:58 +0000
commit4722d4b7980d6fd8145e2e9f08492d951ea261d1 (patch)
tree7ab498b39f5bdce46b1bbc41ef5201322df4e2d4 /debian/run-tests
parentAdding upstream version 1:7.9p1. (diff)
downloadopenssh-4722d4b7980d6fd8145e2e9f08492d951ea261d1.tar.xz
openssh-4722d4b7980d6fd8145e2e9f08492d951ea261d1.zip
Adding debian version 1:7.9p1-10+deb10u2.debian/1%7.9p1-10+deb10u2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/run-tests')
-rwxr-xr-xdebian/run-tests39
1 files changed, 39 insertions, 0 deletions
diff --git a/debian/run-tests b/debian/run-tests
new file mode 100755
index 0000000..7c7a8b2
--- /dev/null
+++ b/debian/run-tests
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Run installed OpenSSH regression tests.
+
+tmp="$1"
+if [ -z "$tmp" ]; then
+ tmp="$(mktemp -d)"
+ cleanup () {
+ rm -rf "$tmp"
+ }
+ trap cleanup EXIT
+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=sh \
+ TEST_SSH_SFTPSERVER=/usr/lib/openssh/sftp-server \
+ TEST_SSH_PLINK=plink \
+ TEST_SSH_PUTTYGEN=puttygen \
+ TEST_SSH_CONCH=conch \
+ TEST_SSH_IPV6=yes \
+ TEST_SSH_ECC=yes \
+ tests interop-tests </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"