Merge "Cleanup subunit capture in run-tox.sh"

This commit is contained in:
Jenkins 2015-06-05 01:39:43 +00:00 committed by Gerrit Code Review
commit ed696bcdcf
3 changed files with 9 additions and 9 deletions

View File

@ -700,7 +700,7 @@
keep-hierarchy: false
copy-after-failure: true
- target: 'logs/$LOG_PATH'
source: '**/*subunit_log.txt.gz'
source: '**/*testrepository.subunit.gz'
keep-hierarchy: false
copy-after-failure: true
- target: 'logs/$LOG_PATH/tox'
@ -820,4 +820,4 @@
name: zuul-swift-test-results-with-console
publishers:
- zuul-swift-upload-logs-with-console:
upload_source: '"**/*nose_results.html" "**/*testr_results.html.gz" ".testrepository/tmp*" "**/*subunit_log.txt.gz" ".tox/*/log/*"'
upload_source: '"**/*nose_results.html" "**/*testr_results.html.gz" ".testrepository/tmp*" "**/*testrepository.subunit.gz" ".tox/*/log/*"'

View File

@ -33,7 +33,7 @@
mv nose_results.html $WORKSPACE/logs
mv testr_results.html.gz $WORKSPACE/logs
mv .testrepository/tmp* $WORKSPACE/logs
mv subunit_log.txt.gz $WORKSPACE/logs
mv testrepository.subunit $WORKSPACE/logs
}}
export -f post_test_hook

View File

@ -35,18 +35,18 @@ function process_testr_artifacts {
fi
if [ -f ".testrepository/0.2" ] ; then
cp .testrepository/0.2 ./subunit_log.txt
cp .testrepository/0.2 ./testrepository.subunit
elif [ -f ".testrepository/0" ] ; then
$bin_path/subunit-1to2 < .testrepository/0 > ./subunit_log.txt
$bin_path/testr last --subunit > ./testrepository.subunit
fi
$PYTHON $script_path/subunit2html.py ./subunit_log.txt testr_results.html
SUBUNIT_SIZE=$(du -k ./subunit_log.txt | awk '{print $1}')
gzip -9 ./subunit_log.txt
$PYTHON $script_path/subunit2html.py ./testrepository.subunit testr_results.html
SUBUNIT_SIZE=$(du -k ./testrepository.subunit | awk '{print $1}')
gzip -9 ./testrepository.subunit
gzip -9 ./testr_results.html
if [[ "$SUBUNIT_SIZE" -gt 50000 ]]; then
echo
echo "sub_unit.log was > 50 MB of uncompressed data!!!"
echo "testrepository.subunit was > 50 MB of uncompressed data!!!"
echo "Something is causing tests for this project to log significant amounts"
echo "of data. This may be writers to python logging, stdout, or stderr."
echo "Failing this test as a result"