xref: /openssh-portable/.github/run_test.sh (revision ffcdd3d9)
1#!/usr/bin/env bash
2
3. .github/configs $1 $2
4
5[ -z "${SUDO}" ] || ${SUDO} mkdir -p /var/empty
6
7set -ex
8
9if [ -z "${LTESTS}" ]; then
10    make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}"
11    result=$?
12else
13    make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}"
14    result=$?
15fi
16
17if [ ! -z "${SSHD_CONFOPTS}" ]; then
18    echo "rerunning tests with TEST_SSH_SSHD_CONFOPTS='${SSHD_CONFOPTS}'"
19    make t-exec TEST_SSH_SSHD_CONFOPTS="${SSHD_CONFOPTS}"
20    result2=$?
21    if [ "${result2}" -ne 0 ]; then
22        result="${result2}"
23    fi
24fi
25
26if [ "$result" -ne "0" ]; then
27    for i in regress/failed*; do
28        echo -------------------------------------------------------------------------
29        echo LOGFILE $i
30        cat $i
31        echo -------------------------------------------------------------------------
32    done
33fi
34