blob: 0bcec09cf22e11da626f81131545055b4d27a774 [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
20tempest init env | tee -a $log
21cd env
sandriichenko7ec32172018-03-19 17:21:21 +020022
Maksym Shalamov98189f52018-04-24 13:36:26 +030023cp /var/lib/tempest/skiplists/*.list $LOG_DIR/env
24
25tempest run $ARGS | tee -a ${log}
26
27if [[ "$ARGS" =~ '-r ' || "$ARGS" =~ '--regex' || "$ARGS" =~ '-s' || "$ARGS" =~ '--smoke' || "$ARGS" =~ '--blacklist-file' || "$ARGS" =~ '-w' || "$ARGS" == '' ]]; then
sgarbuzc4d3c112018-04-19 10:03:02 +030028 testr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml || true
sandriichenko7ec32172018-03-19 17:21:21 +020029fi