blob: a4cbaf4270d5d0af856457e0ad875fbb8dcdb03a [file] [log] [blame]
#!/bin/bash -xe
if [ ! -f /etc/tempest/tempest.conf ]
then
echo "Please put your tempest.conf file to /etc/tempest/"
exit 1
fi
if [ -n "${REPORT_SUFFIX}" ]
then
report="report_${REPORT_SUFFIX}"
else
report='report_'`date +%F_%H-%M`
fi
log=$LOG_DIR/$report.log
cd $LOG_DIR
rm -rf env
tempest init env | tee -a $log
cd env
tempest run $ARGS | tee -a $log
if [[ "$ARGS" =~ '-r ' || "$ARGS" =~ '--regex' || "$ARGS" =~ '-s' || "$ARGS" =~ '-w' || "$ARGS" =~ '' ]]; then
testr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml || true
fi