Cleanup subunit capture in run-tox.sh
This commit cleans up the subunit capture section of run-tox to accomplish 2 things. First make the output naming consistent with dsvm jobs and call the subunit output testrepository.subunit. The second is to avoid using subunit-1to2 directly. A subunit v2 stream can be achieved directly from testr last by using the --subunit flag. Change-Id: Ica644535f54e28306f4db97217b77f95d2f5943b
This commit is contained in:
parent
489a7f4549
commit
82e5bbb235
@ -704,7 +704,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'
|
||||
@ -824,4 +824,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/*"'
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user