Python 2.7 environment, mimicking the one used by RDO
Prompted by a recent issue: https://review.rdoproject.org/r/#/c/32074/ New py27 environment approximates the steps taken during the rdo packaging. Signed-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: I9a74516f2b55f0ddf1f04637f0301c281903bb88
This commit is contained in:
parent
7dda181671
commit
b8ef2c0254
23
tox.ini
23
tox.ini
|
@ -39,6 +39,29 @@ deps =
|
|||
-r {toxinidir}/doc/requirements.txt
|
||||
whitelist_externals = bash
|
||||
|
||||
[testenv:py27]
|
||||
envtmpdir={envdir}/tmp
|
||||
skip_install = true
|
||||
commands_pre =
|
||||
cp -r {toxinidir}/validations_common {envtmpdir}/validations_common
|
||||
touch {envtmpdir}/validations_common/library/__init__.py
|
||||
find {envtmpdir}/validations_common/tests/ -type f -exec sed -i -e 's/from unittest import mock/import mock/g' \{\} ;
|
||||
find {envtmpdir}/validations_common/tests/ -type f -exec sed -i -e 's/from unittest.mock/from mock/g' \{\} ;
|
||||
find {envtmpdir} -type f -name 'setup.cfg' -exec sed -i -e 's/python-requires = >=3.6/python-requires = >=2.7/g' \{\} ;
|
||||
commands =
|
||||
python2.7 -m unittest discover -s {envtmpdir}/validations_common/tests
|
||||
deps =
|
||||
-c {env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/train/upper-constraints.txt}
|
||||
-r {toxinidir}/requirements.txt
|
||||
-r {toxinidir}/test-requirements.txt
|
||||
ansible>=2
|
||||
whitelist_externals =
|
||||
bash
|
||||
cp
|
||||
find
|
||||
sed
|
||||
touch
|
||||
|
||||
[testenv:bindep]
|
||||
# Do not install any requirements. We want this to be fast and work even if
|
||||
# system dependencies are missing, since it's used to tell you what system
|
||||
|
|
Loading…
Reference in New Issue