tests: allow to specify venvs via $TOXENV

Previously, run_tests.sh was hardcoded to run fuel-web tests on py26.
Allow to pass the correct env list via $TOXENV environment variable.
Default to "py26" for backwards compatibility.

Needed to run py27 jobs on CI.

Change-Id: I3cfe5622bd0338f9a9a41ec6b6f6ac2d3c522009
This commit is contained in:
Roman Podoliaka 2015-09-21 19:47:15 +03:00 committed by Igor Kalnitsky
parent b64e50effd
commit d57dd02c88
1 changed files with 9 additions and 4 deletions

View File

@ -91,6 +91,7 @@ PEP8="pep8"
CASPERJS="./node_modules/.bin/casperjs"
GULP="./node_modules/.bin/gulp"
LINTUI="${GULP} lint"
TOXENV=${TOXENV:-py26}
# test options
testrargs=
@ -258,8 +259,9 @@ function run_nailgun_tests {
pushd $ROOT/nailgun >> /dev/null
# # run tests
TOXENV=$TOXENV \
NAILGUN_CONFIG=$config \
tox -epy26 -- $options $TESTS || result=1
tox -- $options $TESTS || result=1
popd >> /dev/null
return $result
}
@ -365,7 +367,8 @@ function run_upgrade_system_tests {
else
# run all tests
pushd $ROOT/fuel_upgrade_system/fuel_upgrade >> /dev/null
tox -epy26 -- -vv $testropts $UPGRADE_TESTS --xunit-file $FUELUPGRADE_XUNIT || result=1
TOXENV=$TOXENV \
tox -- -vv $testropts $UPGRADE_TESTS --xunit-file $FUELUPGRADE_XUNIT || result=1
popd >> /dev/null
fi
@ -385,7 +388,8 @@ function run_shotgun_tests {
pushd $ROOT/shotgun >> /dev/null
# run tests
tox -epy26 || result=1
TOXENV=$TOXENV \
tox || result=1
popd >> /dev/null
@ -409,7 +413,8 @@ function run_extensions_tests {
local result=0
pushd "${NAILGUN_PATH}" >> /dev/null
tox -epy26 -- -vv "${EXTENSIONS_PATH}" --junit-xml $EXTENSIONS_XUNIT || result=1
TOXENV=$TOXENV \
tox -- -vv "${EXTENSIONS_PATH}" --junit-xml $EXTENSIONS_XUNIT || result=1
popd >> /dev/null
return $result