summaryrefslogtreecommitdiffstats
path: root/.github/run_test.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2021-01-15 04:11:43 +0100
committerDarren Tucker <dtucker@dtucker.net>2021-02-17 08:20:40 +0100
commitf031366535650b88248ed7dbf23033afdf466240 (patch)
treedc79249ba5a76f7f7315463e47c304b5d9c93062 /.github/run_test.sh
parentupstream: Make sure puttygen is new enough to successfully run the (diff)
downloadopenssh-f031366535650b88248ed7dbf23033afdf466240.tar.xz
openssh-f031366535650b88248ed7dbf23033afdf466240.zip
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code is only supported on slightly wider range of platforms. To increase our test coverage beyond that, we run the runner natively on a VM host, where it runs a jobs that boot VMs of other platforms, waits for them to come up then runs the build and test by ssh'ing into the guest. This means that the minimum dependencies for the guests are quite low (basically just sshd, a compiler and make). The interface to the VM host is fairly simple (basically 3 scripts: vmstartup, vmrun and vmshutdown), but those are specific to the VM host so are not in the public repo. We also mount the working directory on the host via sshfs, so things like artifact upload by the runner also work. As part of this we are moving the per-test-target configs into a single place (.github/configs) where there will be referenced by a single short "config" key. I plan to make the github-hosted runners use this too. The self-hosted runners are run off a private repo on github since that prevents third parties from accessing them[0], and since runner quota is limited on private repos, we avoid running the tests we run on the public repo. [0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
Diffstat (limited to '.github/run_test.sh')
-rwxr-xr-x.github/run_test.sh23
1 files changed, 10 insertions, 13 deletions
diff --git a/.github/run_test.sh b/.github/run_test.sh
index 5a0e65385..c21730202 100755
--- a/.github/run_test.sh
+++ b/.github/run_test.sh
@@ -1,23 +1,11 @@
#!/usr/bin/env bash
-TARGETS=$@
-
-TEST_TARGET="tests"
-LTESTS="" # all tests by default
+. .github/configs $1 $2
[ -z "${SUDO}" ] || ${SUDO} mkdir -p /var/empty
set -ex
-for TARGET in $TARGETS; do
- case $TARGET in
- --without-openssl)
- # When built without OpenSSL we can't do the file-based RSA key tests.
- TEST_TARGET=t-exec
- ;;
- esac
-done
-
if [ -z "$LTESTS" ]; then
make $TEST_TARGET
result=$?
@@ -26,6 +14,15 @@ else
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 -------------------------------------------------------------------------