Fix post gate hook to accommodate for new os-testr
New os-testr uses stestr under the hood, which creates .stestr but not .testrepository directory in the current dir. Other than that, it doesn't seem like there is any difference in the format or names of files generated in the directory. Change-Id: I82d52bf0ad885bd36d2f0782a7c86ac61df532f2 Closes-Bug: #1716746 (cherry picked from commit 3e341a9941607a404ce5219292464c423a3fa5fe)
This commit is contained in:
parent
1d3568da77
commit
98bb076905
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,6 +26,7 @@ setuptools*.egg/
|
||||
!/.gitreview
|
||||
!/.mailmap
|
||||
!/.pylintrc
|
||||
!/.stestr.conf
|
||||
!/.testr.conf
|
||||
|
||||
# Files created by releasenotes build
|
||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
test_path=${OS_TEST_PATH:-./neutron/tests/unit}
|
||||
top_dir=./
|
@ -10,11 +10,11 @@ venv=${1:-"dsvm-functional"}
|
||||
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
|
||||
.tox/$venv/bin/subunit-1to2 < .testrepository/0 > ./testrepository.subunit
|
||||
$SCRIPTS_DIR/subunit2html ./testrepository.subunit testr_results.html
|
||||
gzip -9 ./testrepository.subunit
|
||||
sudo -H -u $owner chmod o+rw -R .stestr
|
||||
if [ -f ".stestr/0" ] ; then
|
||||
.tox/$venv/bin/subunit-1to2 < .stestr/0 > ./stestr.subunit
|
||||
$SCRIPTS_DIR/subunit2html ./stestr.subunit testr_results.html
|
||||
gzip -9 ./stestr.subunit
|
||||
gzip -9 ./testr_results.html
|
||||
sudo mv ./*.gz /opt/stack/logs/
|
||||
fi
|
||||
|
@ -168,9 +168,9 @@ function run_tests {
|
||||
}
|
||||
|
||||
function copy_subunit_log {
|
||||
LOGNAME=`cat .testrepository/next-stream`
|
||||
LOGNAME=`cat .stestr/next-stream`
|
||||
LOGNAME=$(($LOGNAME - 1))
|
||||
LOGNAME=".testrepository/${LOGNAME}"
|
||||
LOGNAME=".stestr/${LOGNAME}"
|
||||
cp $LOGNAME subunit.log
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ python-subunit>=0.0.18 # Apache-2.0/BSD
|
||||
sphinx>=1.6.2 # BSD
|
||||
openstackdocstheme>=1.16.0 # Apache-2.0
|
||||
oslosphinx>=4.7.0 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
testtools>=1.4.0 # MIT
|
||||
testresources>=0.2.4 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
|
Loading…
x
Reference in New Issue
Block a user