if [[ "$venv" == dsvm-functional* ]] || [[ "$venv" == dsvm-fullstack* ]]
then
- generate_test_logs "/tmp/${venv}-logs"
+ generate_test_logs $log_dir
fi
}
then
owner=stack
sudo_env=
+ log_dir="/tmp/${venv}-logs"
elif [ "$venv" == "api" ]
then
owner=tempest
cd $NEUTRON_DIR
sudo chown -R $owner:stack $NEUTRON_DIR
+# NOTE(armax): this is a gate hook and we should run in a constrained env
+# to avoid breakage from uncontrolled upper constraints
+venv=$venv-constraints
+
# Run tests
echo "Running neutron $venv test suite"
set +e
# Default to environment variables to permit the gate_hook to override
# when sourcing.
VENV=${VENV:-dsvm-functional}
+# If executed in the gate, run in a constrained env
+if [[ "$IS_GATE" == "True" ]]
+then
+ VENV=$VENV-constraints
+fi
DEVSTACK_PATH=${DEVSTACK_PATH:-$1}
PROJECT_NAME=${PROJECT_NAME:-neutron}
REPO_BASE=${GATE_DEST:-$(cd $(dirname "$0")/../.. && pwd)}
# If you are running the tests locally you should set the env variable
# TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
+[testenv:api-constraints]
+basepython = {[testenv:api]basepython}
+install_command = {[testenv:common-constraints]install_command}
+passenv = {[testenv:api]passenv}
+setenv = {[testenv:api]setenv}
+
[testenv:common]
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
setenv = OS_TEST_TIMEOUT=180
{[testenv]deps}
-r{toxinidir}/neutron/tests/functional/requirements.txt
+[testenv:functional-constraints]
+basepython = {[testenv:functional]basepython}
+install_command = {[testenv:common-constraints]install_command}
+setenv = {[testenv:functional]setenv}
+deps =
+ {[testenv:functional]deps}
+
[testenv:functional-py34]
basepython = python3.4
setenv = {[testenv:functional]setenv}
deps =
{[testenv:functional]deps}
+[testenv:dsvm-functional-constraints]
+basepython = {[testenv:dsvm-functional]basepython}
+install_command = {[testenv:common-constraints]install_command}
+setenv = {[testenv:dsvm-functional]setenv}
+sitepackages={[testenv:dsvm-functional]sitepackages}
+deps =
+ {[testenv:functional-constraints]deps}
+
[testenv:dsvm-functional-py34]
basepython = python3.4
setenv = {[testenv:dsvm-functional]setenv}
deps =
{[testenv:functional]deps}
+[testenv:dsvm-fullstack-constraints]
+install_command = {[testenv:common-constraints]install_command}
+setenv =
+ {[testenv:dsvm-fullstack]setenv}
+sitepackages={[testenv:dsvm-fullstack]sitepackages}
+deps =
+ {[testenv:functional-constraints]deps}
+
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html