blob: de3b6ca49c586230ebb261f38a003cdfe2821cd6 [file] [log] [blame]
sandriichenko7ec32172018-03-19 17:21:21 +02001#!/bin/bash -xe
2
3if [ ! -f /etc/tempest/tempest.conf ]
4then
5 echo "Please put your tempest.conf file to /etc/tempest/"
6 exit 1
7fi
8
9if [ -n "${REPORT_SUFFIX}" ]
10then
11 report="report_${REPORT_SUFFIX}"
12else
13 report='report_'`date +%F_%H-%M`
14fi
15
16log=$LOG_DIR/$report.log
17
18cd $LOG_DIR
19rm -rf env
20tempest init env | tee -a $log
21cd env
sgarbuzb4451032018-04-05 18:05:10 +030022tempest run $PATTERN | tee -a $log || true
sandriichenko7ec32172018-03-19 17:21:21 +020023
24if [[ "$PATTERN" =~ '-r ' || "$PATTERN" =~ '--regex' || "$PATTERN" =~ '-s' ]]; then
sgarbuz0a383d32018-04-05 11:10:38 +030025 testr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml
sandriichenko7ec32172018-03-19 17:21:21 +020026fi
27