Fix for HP 3rd Party CI failure

This patchset fixes the problem in HP L2GW CI where timeout
errors were reported.
Patchset also ensures that all the tests run in sequential order.

Change-Id: I977b52ba87112b3d5b7aefee408bd3d14c632fec
Closes-bug: 1517758
stable/ocata
Ashish Gupta 7 years ago
parent 4ec821f4af
commit 4f5b96e84c

@ -2,7 +2,7 @@
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./networking_l2gw/tests/unit} $LISTOPT $IDOPTION
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./networking_l2gw/tests/api} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

@ -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,7 +38,9 @@ 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
TEMPEST_CONFIG_DIR={env:TEMPEST_CONFIG_DIR:/opt/stack/tempest/etc}
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
OS_TEST_TIMEOUT=90

Loading…
Cancel
Save