Archive the testrepository file before processing

We need to move the testrepository file archiving to before we run
the processing commands that are prone to failure, otherwise the files
will not get archived for debugging.

Change-Id: Iaa4c798874b9465346112e38e5fd4f46e76fe4bc
This commit is contained in:
Michael Johnson 2017-01-18 19:43:00 +00:00
parent da1755d610
commit d805c8de21
1 changed files with 6 additions and 4 deletions

View File

@ -47,14 +47,16 @@ function generate_testr_results {
sudo -H -u "$owner" chmod o+rw .
sudo -H -u "$owner" chmod o+rw -R .testrepository
if [ -f ".testrepository/0" ] ; then
.tox/"$testenv"/bin/subunit-1to2 < .testrepository/0 > ./testrepository.subunit
$SCRIPTS_DIR/subunit2html ./testrepository.subunit testr_results.html
gzip -9 ./testrepository.subunit
gzip -9 ./testr_results.html
# Archive the raw testrepository file to debug subunit-1to2
# ValueError: Length too long: 7341892 errors
cp .testrepository/0 ./testrepository.0
gzip -9 ./testrepository.0
sudo mv testrepository.0.gz /opt/stack/logs/
.tox/"$testenv"/bin/subunit-1to2 < .testrepository/0 > ./testrepository.subunit
$SCRIPTS_DIR/subunit2html ./testrepository.subunit testr_results.html
gzip -9 ./testrepository.subunit
gzip -9 ./testr_results.html
sudo mv ./*.gz /opt/stack/logs/
fi
}