summaryrefslogtreecommitdiffstats
path: root/.github/run_test.sh
blob: 66fd5260362fd35a0d85b1f11dba31ec99050d2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash

. .github/configs $1 $2

[ -z "${SUDO}" ] || ${SUDO} mkdir -p /var/empty

set -ex

if [ -z "${LTESTS}" ]; then
    make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}"
    result=$?
else
    make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}"
    result=$?
fi

if [ ! -z "${SSHD_CONFOPTS}" ]; then
    echo "rerunning tests with TEST_SSH_SSHD_CONFOPTS='${SSHD_CONFOPTS}'"
    make t-exec TEST_SSH_SSHD_CONFOPTS="${SSHD_CONFOPTS}"
    result2=$?
    if [ "${result2}" -ne 0 ]; then
        result="${result2}"
    fi
fi

if [ "$result" -ne "0" ]; then
    for i in regress/failed*; do
        echo -------------------------------------------------------------------------
        echo LOGFILE $i
        cat $i
        echo -------------------------------------------------------------------------
    done
fi