Preserve testr temp files

If testr is killed before it finishes running, it saves its output in a
temp file.  If something times out this file may provide insight into
what was making it slow, so preserve the temp file.

Related-Bug: #1258682

Change-Id: I5cd1bc2326998bf3a1c29cd3773bf583f04ef3d5
This commit is contained in:
Joe Gordon 2013-12-17 16:25:43 -08:00
parent d22733174a
commit 7a742e8396
1 changed files with 6 additions and 0 deletions

View File

@ -343,6 +343,12 @@ function cleanup_host {
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
elif [ -f $BASE/new/tempest/.testrepository/tmp* ]; then
# If testr timed out, collect temp file from testr
sudo cp $BASE/new/tempest/.testrepository/tmp* $WORKSPACE/subunit_log.txt
sudo gzip -9 $WORKSPACE/subunit_log.txt
sudo chown jenkins:jenkins $WORKSPACE/subunit_log.txt.gz
sudo chmod a+r $WORKSPACE/subunit_log.txt.gz
fi
if [ -f $BASE/new/tempest/tempest.log ] ; then