blob: 4f92e891a982605c24071037489267d287e20858 [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
Maksym Shalamov98189f52018-04-24 13:36:26 +030016log=$LOG_DIR/${report}.log
sandriichenko7ec32172018-03-19 17:21:21 +020017
18cd $LOG_DIR
19rm -rf env
sandriichenko85475462018-04-26 11:39:59 +030020
sandriichenko7ec32172018-03-19 17:21:21 +020021tempest init env | tee -a $log
22cd env
sandriichenko7ec32172018-03-19 17:21:21 +020023
Maksym Shalamov98189f52018-04-24 13:36:26 +030024cp /var/lib/tempest/skiplists/*.list $LOG_DIR/env
25
26tempest run $ARGS | tee -a ${log}
27
28if [[ "$ARGS" =~ '-r ' || "$ARGS" =~ '--regex' || "$ARGS" =~ '-s' || "$ARGS" =~ '--smoke' || "$ARGS" =~ '--blacklist-file' || "$ARGS" =~ '-w' || "$ARGS" == '' ]]; then
sgarbuzc4d3c112018-04-19 10:03:02 +030029 testr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml || true
sandriichenko7ec32172018-03-19 17:21:21 +020030fi