blob: 2ddde95d9cf80a558f543e3a1a17d7e354242e84 [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
sandriichenkod0343d42018-06-04 13:41:31 +030018cat /etc/tempest/tempest.conf | tee -a ${log}
19
sandriichenko7ec32172018-03-19 17:21:21 +020020cd $LOG_DIR
21rm -rf env
sandriichenko85475462018-04-26 11:39:59 +030022
sandriichenko7ec32172018-03-19 17:21:21 +020023tempest init env | tee -a $log
24cd env
sandriichenko7ec32172018-03-19 17:21:21 +020025
Maksym Shalamov98189f52018-04-24 13:36:26 +030026cp /var/lib/tempest/skiplists/*.list $LOG_DIR/env
27
28tempest run $ARGS | tee -a ${log}
29
30if [[ "$ARGS" =~ '-r ' || "$ARGS" =~ '--regex' || "$ARGS" =~ '-s' || "$ARGS" =~ '--smoke' || "$ARGS" =~ '--blacklist-file' || "$ARGS" =~ '-w' || "$ARGS" == '' ]]; then
sgarbuzc4d3c112018-04-19 10:03:02 +030031 testr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml || true
sandriichenko7ec32172018-03-19 17:21:21 +020032fi