Gatefix: Migrate from testr to stestr

Change-Id: I7339874be54b29a7eba9933c534445899b6fb8c1
This commit is contained in:
Adam Harwell 2017-09-12 13:56:02 -06:00
parent 08bb17abeb
commit 8f381e8d39
4 changed files with 13 additions and 14 deletions

1
.gitignore vendored
View File

@ -21,6 +21,7 @@ setuptools*.egg/
subunit.log subunit.log
tempest.log tempest.log
.testrepository .testrepository
.stestr
.tox/ .tox/
.venv/ .venv/
*.mo *.mo

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./octavia/tests/unit}
top_dir=./

View File

@ -45,19 +45,15 @@ fi
function generate_testr_results { function generate_testr_results {
# Give job user rights to access tox logs # Give job user rights to access tox logs
sudo -H -u "$owner" chmod o+rw . sudo -H -u "$owner" chmod o+rw .
sudo -H -u "$owner" chmod o+rw -R .testrepository if [ -d ".stestr" ] ; then
if [ -f ".testrepository/0" ] ; then sudo -H -u "$owner" chmod o+rw -R .stestr
# Archive the raw testrepository file to debug subunit-1to2 if [ -f ".stestr/0" ] ; then
# ValueError: Length too long: 7341892 errors stestr last --subunit > ./testrepository.subunit
cp .testrepository/0 ./testrepository.0 $SCRIPTS_DIR/subunit2html ./testrepository.subunit testr_results.html
gzip -9 ./testrepository.0 gzip -9 ./testrepository.subunit
sudo mv testrepository.0.gz /opt/stack/logs/ gzip -9 ./testr_results.html
sudo mv ./*.gz /opt/stack/logs/
.tox/"$testenv"/bin/subunit-1to2 < .testrepository/0 > ./testrepository.subunit fi
$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
} }

View File

@ -103,7 +103,6 @@ whitelist_externals =
find find
commands = commands =
find . -type f -name "*.pyc" -delete find . -type f -name "*.pyc" -delete
rm -f .testrepository/times.dbm
python -m unittest specs-tests.test_titles python -m unittest specs-tests.test_titles