#!/bin/bash
#
#  This script expects to be given at least two arguments:
#     directory to cd to
#     main config file for adt-testreport-runloop which sets PATH if need be
#     remaining arguments are passed through to a-t-r unchanged

set -e
cd "$1"
shift
. "$1"
exec >>var/overall.log 2>&1
${ADT_GO_ANYWAY:-false} || test -f go
with-lock-ex -q cronjob-lock \
 adt-testreport-runloop max_test_count=100 "$@"
