Grab testr logs even when testr fails.
* devstack-vm-gate-wrap.sh: Do all testr log processing when we deal with the other logs. Do not depend on other scripts/functions being called to do this. Downstream scripts may exit prematurely resulting in a loss of data. * devstack-vm-gate.sh: Stop processing testr logs here. Change-Id: I24144e32f9ba7b279aaec0d3fadcfdf3bc5ef77c
This commit is contained in:
parent
b986754c4b
commit
7cb7093b2e
|
@ -249,14 +249,14 @@ function cleanup_host {
|
|||
|
||||
sudo iptables-save > $WORKSPACE/logs/iptables.txt
|
||||
|
||||
#Copy and compress testr_results.
|
||||
if [ -f $BASE/new/tempest/testr_results.html ]; then
|
||||
sudo cp $BASE/new/tempest/testr_results.html $NEWLOGTARGET/
|
||||
sudo gzip -9 $NEWLOGTARGET/testr_results.html
|
||||
fi
|
||||
#Copy subunit log.
|
||||
if [ -f $BASE/new/tempest/subunit_log.txt ]; then
|
||||
sudo cp $BASE/new/tempest/subunit_log.txt $NEWLOGTARGET/
|
||||
# Process testr artifacts.
|
||||
if [ -f $BASE/new/tempest/.testrepository/0 ]; then
|
||||
sudo cp $BASE/new/tempest/.testrepository/0 $WORKSPACE/subunit_log.txt
|
||||
sudo python /usr/local/jenkins/slave_scripts/subunit2html.py $WORKSPACE/subunit_log.txt $WORKSPACE/testr_results.html
|
||||
sudo gzip -9 $WORKSPACE/subunit_log.txt
|
||||
sudo gzip -9 $WORKSPACE/testr_results.html
|
||||
sudo chown jenkins:jenkins $WORKSPACE/subunit_log.txt.gz $WORKSPACE/testr_results.html.gz
|
||||
sudo chmod a+r $WORKSPACE/subunit_log.txt.gz $WORKSPACE/testr_results.html.gz
|
||||
fi
|
||||
|
||||
# Make sure jenkins can read all the logs
|
||||
|
|
|
@ -265,10 +265,6 @@ if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then
|
|||
echo "Running tempest smoke tests"
|
||||
sudo -H -u stack tox -esmoke
|
||||
fi
|
||||
if [ -f .testrepository/0 ]; then
|
||||
sudo -H -u stack cp .testrepository/0 subunit_log.txt
|
||||
sudo -H -u stack python /usr/local/jenkins/slave_scripts/subunit2html.py ./subunit_log.txt testr_results.html
|
||||
fi
|
||||
else
|
||||
# Jenkins expects at least one nosetests file. If we're not running
|
||||
# tempest, then write a fake one that indicates the tests pass (since
|
||||
|
|
Loading…
Reference in New Issue