Fix unit tests and test configuration
A recent change in the neutron repository changed the import statements for external_process, fixing fallout. Fix post gate hook to accommodate for new os-testr. New versions now use .stestr instead of previous .testrepository directory. Related-bug: #1716746 Change-Id: Iba7579f8de63c6ce87d95167918fc46979702a35
This commit is contained in:
parent
3e10853df1
commit
d13fdaef43
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,6 +28,7 @@ subunit.log
|
||||
!/.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_dynamic_routing/tests/unit}
|
||||
top_dir=./
|
@ -18,7 +18,6 @@ import sys
|
||||
from oslo_config import cfg
|
||||
from oslo_service import service
|
||||
|
||||
from neutron.agent.linux import external_process
|
||||
from neutron.common import config as common_config
|
||||
from neutron.conf.agent import common as config
|
||||
from neutron import service as neutron_service
|
||||
@ -32,7 +31,7 @@ def register_options():
|
||||
config.register_root_helper(cfg.CONF)
|
||||
cfg.CONF.register_opts(bgp_dragent_config.BGP_DRIVER_OPTS, 'BGP')
|
||||
cfg.CONF.register_opts(bgp_dragent_config.BGP_PROTO_CONFIG_OPTS, 'BGP')
|
||||
cfg.CONF.register_opts(external_process.OPTS)
|
||||
config.register_external_process_opts(cfg.CONF)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -13,11 +13,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_PATH/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_PATH/subunit2html ./stestr.subunit testr_results.html
|
||||
gzip -9 ./stestr.subunit
|
||||
gzip -9 ./testr_results.html
|
||||
sudo mv ./*.gz /opt/stack/logs/
|
||||
fi
|
||||
|
@ -13,7 +13,6 @@ sphinx>=1.6.2 # BSD
|
||||
openstackdocstheme>=1.16.0 # Apache-2.0
|
||||
oslo.concurrency>=3.8.0 # Apache-2.0
|
||||
os-testr>=0.8.0 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
testresources>=0.2.4 # Apache-2.0/BSD
|
||||
testtools>=1.4.0 # MIT
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
|
Loading…
Reference in New Issue
Block a user