diff --git a/.gitignore b/.gitignore index 7b1888a6..6e4fe6de 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,12 @@ releasenotes/build .*.swp .*sw? .idea/* + +# dont ignore: +!/.coveragerc +!/.gitignore +!/.gitreview +!/.mailmap +!/.pylintrc +!/.stestr.conf +!/.testr.conf diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..8773694b --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./networking_bgpvpn/tests/unit} +top_dir=./ diff --git a/devstack/post_test_hook.sh b/devstack/post_test_hook.sh index 8c34fd25..d3bb739e 100755 --- a/devstack/post_test_hook.sh +++ b/devstack/post_test_hook.sh @@ -5,18 +5,19 @@ set -xe NETWORKING_BGPVPN_DIR="$BASE/new/networking-bgpvpn" LOGS=/opt/stack/logs GATE_STACK_USER=stack +SCRIPTS_DIR="/usr/os-testr-env/bin/" typetest=${1:-"unknown"} function generate_testr_results { sudo -H -u $GATE_STACK_USER chmod o+rw . - sudo -H -u $GATE_STACK_USER chmod o+rw -R .testrepository - if [ -f ".testrepository/0" ]; then - .tox/$venv/bin/subunit-1to2 < .testrepository/0> ./testrepository.subunit - .tox/$venv/bin/subunit2html ./testrepository.subunit ./testr_results.html - gzip ./testrepository.subunit - gzip ./testr_results.html - sudo mv ./testrepository.subunit.gz testr_results.html.gz $LOGS + sudo -H -u $GATE_STACK_USER 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 $LOGS fi } diff --git a/networking_bgpvpn/tests/unit/services/bagpipe/test_bagpipe.py b/networking_bgpvpn/tests/unit/services/bagpipe/test_bagpipe.py index c9783764..b8067e40 100644 --- a/networking_bgpvpn/tests/unit/services/bagpipe/test_bagpipe.py +++ b/networking_bgpvpn/tests/unit/services/bagpipe/test_bagpipe.py @@ -17,9 +17,10 @@ import copy import mock import webob.exc +from oslo_config import cfg + from neutron.debug import debug_agent -from neutron.plugins.ml2 import config as ml2_config from neutron.plugins.ml2 import rpc as ml2_rpc from neutron.tests.common import helpers @@ -286,9 +287,9 @@ class TestBagpipeServiceDriverCallbacks(TestBagpipeCommon): _plugin_name = 'neutron.plugins.ml2.plugin.Ml2Plugin' def setUp(self): - ml2_config.cfg.CONF.set_override('mechanism_drivers', - ['logger', 'fake_agent'], - 'ml2') + cfg.CONF.set_override('mechanism_drivers', + ['logger', 'fake_agent'], + 'ml2') super(TestBagpipeServiceDriverCallbacks, self).setUp(self._plugin_name)