|
|
|
@ -45,19 +45,15 @@ fi
|
|
|
|
|
function generate_testr_results { |
|
|
|
|
# Give job user rights to access tox logs |
|
|
|
|
sudo -H -u "$owner" chmod o+rw . |
|
|
|
|
sudo -H -u "$owner" chmod o+rw -R .testrepository |
|
|
|
|
if [ -f ".testrepository/0" ] ; then |
|
|
|
|
# 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/ |
|
|
|
|
if [ -d ".stestr" ] ; then |
|
|
|
|
sudo -H -u "$owner" chmod o+rw -R .stestr |
|
|
|
|
if [ -f ".stestr/0" ] ; then |
|
|
|
|
stestr last --subunit > ./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 |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|