From 7a742e83963f3dabf63a221998375facfa4409bd Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Tue, 17 Dec 2013 16:25:43 -0800 Subject: [PATCH] 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 --- devstack-vm-gate-wrap.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index f1fafbc4..d1eb86d8 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -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