Don't set environment variables in tox.ini

Because of the bug [1] in tox 2.2.1 tox there's a need
to hard-code all environment variables except
the ones which are not set by Fuel CI.

This patch will be reverted as soon as [1] is fixed.

1. https://bitbucket.org/hpk42/tox/issues/285/tox-220-breaks-some-toxini-config-files

Closes-bug: #1517427
Change-Id: I32903c1fd5545ca56410789add7d9c2a8bbacba7
This commit is contained in:
Roman Prykhodchenko 2015-11-19 12:50:54 +01:00
parent e685d68c1c
commit 3e7738fd3f
3 changed files with 22 additions and 15 deletions

View File

@ -17,7 +17,7 @@
set -eu set -eu
NAILGUN_CONFIG=$ARTIFACTS/test.yaml NAILGUN_CONFIG=$ARTIFACTS/test.yaml
NAILGUN_ROOT=$FUEL_WEB_ROOT/nailgun
# Sends SIGING to the running instance of Nailgun, if it exists # Sends SIGING to the running instance of Nailgun, if it exists
kill_server() { kill_server() {

View File

@ -17,6 +17,7 @@
set -eu set -eu
NAILGUN_CONFIG=$ARTIFACTS/test.yaml NAILGUN_CONFIG=$ARTIFACTS/test.yaml
NAILGUN_ROOT=$FUEL_WEB_ROOT/nailgun
err() { err() {
printf "%s\n" "$1" >&2 printf "%s\n" "$1" >&2

34
tox.ini
View File

@ -9,24 +9,30 @@ install_command = pip install --allow-external -U {opts} {packages}
whitelist_externals = bash whitelist_externals = bash
oslo_debug_helper oslo_debug_helper
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
ARTIFACTS={toxinidir}/{env:ARTIFACTS:test_run} ARTIFACTS={toxinidir}/test_run
FUELCLIENT_JUNIT={env:FUELCLIENT_JUNIT:fuelclient}-{envname}.xml FUELCLIENT_JUNIT=fuelclient-{envname}.xml
FUELCLIENT_CUSTOM_SETTINGS={toxinidir}/{env:ARTIFACTS:test_run}/fuel_client_config.yaml FUELCLIENT_CUSTOM_SETTINGS={toxinidir}/test_run/fuel_client_config.yaml
# Functional env settings # Functional env settings
FUEL_WEB_CLONE={env:FUEL_WEB_CLONE:yes} FUEL_WEB_CLONE=yes
FUEL_WEB_REPO={env:FUEL_WEB_REPO:https://github.com/stackforge/fuel-web.git} FUEL_WEB_REPO=https://github.com/stackforge/fuel-web.git
FUEL_WEB_ROOT={env:FUEL_WEB_ROOT:/tmp/fuel_web} FETCH_REPO=
FETCH_REPO={env:FETCH_REPO:} FETCH_REFSPEC=
FETCH_REFSPEC={env:FETCH_REFSPEC:} FUEL_COMMIT=master
FUEL_COMMIT={env:FUEL_COMMIT:master} NAILGUN_ROOT=/tmp/fuel_web/nailgun
NAILGUN_ROOT={env:FUEL_WEB_ROOT:/tmp/fuel_web}/nailgun
# Nailgun server parameters # Nailgun server parameters
NAILGUN_PORT={env:NAILGUN_PORT:8003} NAILGUN_PORT=8003
NAILGUN_CHECK_PATH={env:NAILGUN_CHECK_PATH:/api/version} NAILGUN_CHECK_PATH=/api/version
NAILGUN_START_MAX_WAIT_TIME={env:NAILGUN_START_MAX_WAIT_TIME:20} NAILGUN_START_MAX_WAIT_TIME=20
TEST_NAILGUN_DB={env:TEST_NAILGUN_DB:nailgun}
# NOTE(romcheg): this is a temporary change to work around
# a bug in tox 2.2.1
# Don't forget to set up all these variables,
# manually if you're trying to run tests on
# your local environment.
passenv = FUEL_WEB_ROOT TEST_NAILGUN_DB
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = commands =