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 | |
Maksym Shalamov | 98189f5 | 2018-04-24 13:36:26 +0300 | [diff] [blame] | 16 | log=$LOG_DIR/${report}.log |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 17 | |
sandriichenko | d0343d4 | 2018-06-04 13:41:31 +0300 | [diff] [blame] | 18 | cat /etc/tempest/tempest.conf | tee -a ${log} |
| 19 | |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 20 | cd $LOG_DIR |
| 21 | rm -rf env |
sandriichenko | 8547546 | 2018-04-26 11:39:59 +0300 | [diff] [blame] | 22 | |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 23 | tempest init env | tee -a $log |
| 24 | cd env |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 25 | |
Maksym Shalamov | 98189f5 | 2018-04-24 13:36:26 +0300 | [diff] [blame] | 26 | cp /var/lib/tempest/skiplists/*.list $LOG_DIR/env |
| 27 | |
| 28 | tempest run $ARGS | tee -a ${log} |
| 29 | |
| 30 | if [[ "$ARGS" =~ '-r ' || "$ARGS" =~ '--regex' || "$ARGS" =~ '-s' || "$ARGS" =~ '--smoke' || "$ARGS" =~ '--blacklist-file' || "$ARGS" =~ '-w' || "$ARGS" == '' ]]; then |
sgarbuz | c4d3c11 | 2018-04-19 10:03:02 +0300 | [diff] [blame] | 31 | testr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml || true |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 32 | fi |