diff --git a/.github/workflows/run-schedulers b/.github/workflows/run-schedulers index 0aa3ffea3bff..5cb6cc2303b2 100755 --- a/.github/workflows/run-schedulers +++ b/.github/workflows/run-schedulers @@ -16,6 +16,26 @@ if [ ! -x `which vng` ]; then exit 1 fi +function runtest() { + local bin="${1}" + + if [ -z "${bin}" ]; then + echo "No binary passed to runtest" + exit 1 + fi + + if ! [ -f "${bin}" ]; then + echo "Binary ${bin} was not a regular file" + exit 1 + fi + + rm -f /tmp/output + (timeout --foreground --preserve-status ${GUEST_TIMEOUT} \ + vng --force-9p --disable-microvm --verbose -- \ + "timeout --foreground --preserve-status ${TEST_TIMEOUT} ${bin}" \ + 2>&1 &1