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. (shamelessly stolen from I82d52bf0ad885bd36d2f0782a7c86ac61df532f2) Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com> This change also wraps up another fix (simultaneous voting test job breakage) related to a recent change in the neutron repository of the import statements for ml2 config. Change-Id: I6bfaca7de99c6ef6834375d4e5b3218a50a60491 Closes-Bug: 1716746
This commit is contained in:
Thomas Morin
committed by
Thomas Morin
parent
52a454eb62
commit
8f576a2ccb
4 changed files with 25 additions and 11 deletions
9
.gitignore
vendored
9
.gitignore
vendored
@@ -60,3 +60,12 @@ releasenotes/build
.*.swp
.*sw?
.idea/*
# dont ignore:
!/.coveragerc
!/.gitignore
!/.gitreview
!/.mailmap
!/.pylintrc
!/.stestr.conf
!/.testr.conf
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@@ -0,0 +1,3 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./networking_bgpvpn/tests/unit}
top_dir=./
@@ -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
}
@@ -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)
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.