119261079SEd Maste#!/bin/sh 219261079SEd Maste 319261079SEd Maste. .github/configs $1 419261079SEd Maste 519261079SEd Maste[ -z "${SUDO}" ] || ${SUDO} mkdir -p /var/empty 619261079SEd Maste 719261079SEd Masteset -ex 819261079SEd Maste 938a52bd3SEd Maste# If we want to test hostbased auth, set up the host for it. 1038a52bd3SEd Masteif [ ! -z "$SUDO" ] && [ ! -z "$TEST_SSH_HOSTBASED_AUTH" ]; then 1138a52bd3SEd Maste sshconf=/usr/local/etc 12*0fdf8faeSEd Maste $SUDO mkdir -p "${sshconf}" 1338a52bd3SEd Maste hostname | $SUDO tee $sshconf/shosts.equiv >/dev/null 1438a52bd3SEd Maste echo "EnableSSHKeysign yes" | $SUDO tee $sshconf/ssh_config >/dev/null 1538a52bd3SEd Maste $SUDO mkdir -p $sshconf 1638a52bd3SEd Maste $SUDO cp -p /etc/ssh/ssh_host*key* $sshconf 1738a52bd3SEd Maste $SUDO make install 1838a52bd3SEd Maste for key in $sshconf/ssh_host*key*.pub; do 1938a52bd3SEd Maste echo `hostname` `cat $key` | \ 2038a52bd3SEd Maste $SUDO tee -a $sshconf/ssh_known_hosts >/dev/null 2138a52bd3SEd Maste done 2238a52bd3SEd Mastefi 2338a52bd3SEd Maste 2419261079SEd Masteoutput_failed_logs() { 254d3fc8b0SEd Maste for i in regress/failed*.log; do 2619261079SEd Maste if [ -f "$i" ]; then 2719261079SEd Maste echo ------------------------------------------------------------------------- 2819261079SEd Maste echo LOGFILE $i 2919261079SEd Maste cat $i 3019261079SEd Maste echo ------------------------------------------------------------------------- 3119261079SEd Maste fi 3219261079SEd Maste done 3319261079SEd Maste} 3419261079SEd Mastetrap output_failed_logs 0 3519261079SEd Maste 3619261079SEd Masteif [ -z "${LTESTS}" ]; then 3719261079SEd Maste make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}" 3819261079SEd Masteelse 3919261079SEd Maste make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}" 4019261079SEd Mastefi 4119261079SEd Maste 4219261079SEd Masteif [ ! -z "${SSHD_CONFOPTS}" ]; then 4319261079SEd Maste echo "rerunning t-exec with TEST_SSH_SSHD_CONFOPTS='${SSHD_CONFOPTS}'" 4419261079SEd Maste if [ -z "${LTESTS}" ]; then 4519261079SEd Maste make t-exec SKIP_LTESTS="${SKIP_LTESTS}" TEST_SSH_SSHD_CONFOPTS="${SSHD_CONFOPTS}" 4619261079SEd Maste else 4719261079SEd Maste make t-exec SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}" TEST_SSH_SSHD_CONFOPTS="${SSHD_CONFOPTS}" 4819261079SEd Maste fi 4919261079SEd Mastefi 50