blob: 2c2138ee9d743f3d79cc295d38e0f1653dfe9527 [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
sgarbuzc4d3c112018-04-19 10:03:02 +030022tempest run $ARGS | tee -a $log
sandriichenko7ec32172018-03-19 17:21:21 +020023
sandriichenko2ce3c9b2018-04-13 12:22:21 +030024if [[ "$ARGS" =~ '-r ' || "$ARGS" =~ '--regex' || "$ARGS" =~ '-s' || "$ARGS" =~ '-w' || "$ARGS" =~ '' ]]; then
sgarbuzc4d3c112018-04-19 10:03:02 +030025 testr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml || true
sandriichenko7ec32172018-03-19 17:21:21 +020026fi
27