Fix for HP 3rd Party CI failure

This patchset fixes the problem in HP L2GW CI due to
parallel execution of api test cases.
Patchset also ensures that all the tests run in sequential order.

Change-Id: I2d9313132393c0ad55acdf84d15c8d7ae9188833
Closes-bug: 1517758
stable/ocata
Ashish Gupta 7 years ago committed by vikas
parent d1917bb734
commit 0db90b1393
  1. 4
      devstack/plugin.sh
  2. 14
      tools/pretty_tox_serial.sh
  3. 6
      tox.ini

@ -17,7 +17,7 @@ function install_l2gw {
}
function configure_agent_conf {
cp $L2GW_DIR/etc/l2gateway_agent.ini $L2GW_CONF_FILE
sudo cp $L2GW_DIR/etc/l2gateway_agent.ini $L2GW_CONF_FILE
iniset $L2GW_CONF_FILE ovsdb ovsdb_hosts $OVSDB_HOSTS
}
@ -30,7 +30,7 @@ function run_l2gw_alembic_migration {
}
function configure_l2gw_plugin {
cp $L2GW_DIR/etc/l2gw_plugin.ini $L2GW_PLUGIN_CONF_FILE
sudo cp $L2GW_DIR/etc/l2gw_plugin.ini $L2GW_PLUGIN_CONF_FILE
_neutron_service_plugin_class_add $L2GW_PLUGIN
}

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -o pipefail
TESTRARGS=$@
if [ ! -d .testrepository ]; then
testr init
fi
testr run --subunit $TESTRARGS | subunit-trace -f -n
retval=$?
testr slowest
exit $retval

@ -10,7 +10,9 @@ install_command = {toxinidir}/tools/tox_install.sh {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = sh
commands = python setup.py testr --slowest --testr-args='{posargs}'
commands =
find . -type f -name "*.pyc" -delete
bash tools/pretty_tox_serial.sh '{posargs}'
[testenv:pep8]
commands =
@ -36,6 +38,8 @@ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
[testenv:api]
# This must be set manually in your environment until
# a new release of tox fixes the issues with setenv
setenv = OS_TEST_PATH=./networking_l2gw/tests/api
TEMPEST_CONFIG_DIR={env:TEMPEST_CONFIG_DIR:/opt/stack/tempest/etc}
OS_TEST_API_WITH_REST=1

Loading…
Cancel
Save