#!/usr/bin/bash
+set -e
# We don't want -x yet, in case the private key is sensitive
if [ -n "$SSH_PRIVKEY_FILE" ]; then
echo "$SSH_PRIVKEY" > $HOME/.ssh/$SSH_PRIVKEY_FILE
--force-priority \
$CUSTOM_CONF
DISPATCHER_EXIT_FLAG='--exit-on-empty-queue'
+ teuthology-queue -m $MACHINE_TYPE -s | \
+ python3 -c "import sys, json; assert json.loads(sys.stdin.read())['count'] > 0, 'queue is empty!'"
fi
teuthology-dispatcher -v \
--log-dir /teuthology/log \
--tube $MACHINE_TYPE \
- $DISPATCHER_EXIT_FLAG
\ No newline at end of file
+ $DISPATCHER_EXIT_FLAG