sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 1 | #!/bin/bash -xe |
| 2 | |
| 3 | if [ ! -f /etc/tempest/tempest.conf ] |
| 4 | then |
| 5 | echo "Please put your tempest.conf file to /etc/tempest/" |
| 6 | exit 1 |
| 7 | fi |
| 8 | |
| 9 | if [ -n "${REPORT_SUFFIX}" ] |
| 10 | then |
| 11 | report="report_${REPORT_SUFFIX}" |
| 12 | else |
| 13 | report='report_'`date +%F_%H-%M` |
| 14 | fi |
| 15 | |
| 16 | log=$LOG_DIR/$report.log |
| 17 | |
| 18 | cd $LOG_DIR |
| 19 | rm -rf env |
sandriichenko | 8547546 | 2018-04-26 11:39:59 +0300 | [diff] [blame^] | 20 | |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 21 | tempest init env | tee -a $log |
| 22 | cd env |
sgarbuz | c4d3c11 | 2018-04-19 10:03:02 +0300 | [diff] [blame] | 23 | tempest run $ARGS | tee -a $log |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 24 | |
sandriichenko | 2ce3c9b | 2018-04-13 12:22:21 +0300 | [diff] [blame] | 25 | if [[ "$ARGS" =~ '-r ' || "$ARGS" =~ '--regex' || "$ARGS" =~ '-s' || "$ARGS" =~ '-w' || "$ARGS" =~ '' ]]; then |
sgarbuz | c4d3c11 | 2018-04-19 10:03:02 +0300 | [diff] [blame] | 26 | testr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml || true |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 27 | fi |
| 28 | |