run tests in python 3 (#40572)
This commit is contained in:
parent
406bea83ca
commit
51bd0086ae
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get venv site-packages path
|
||||||
|
DSTDIR=`python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
|
||||||
|
|
||||||
|
# Get not venv site-packages path
|
||||||
|
# Remove first path (assuming that is the venv path)
|
||||||
|
NONPATH=`echo $PATH | sed 's/^[^:]*://'`
|
||||||
|
SRCDIR=`PATH=$NONPATH python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -f $DSTDIR/lasso.*
|
||||||
|
rm -f $DSTDIR/_lasso.*
|
||||||
|
|
||||||
|
# Link
|
||||||
|
ln -sv /usr/lib/python3/dist-packages/lasso.py $DSTDIR/
|
||||||
|
for SOFILE in /usr/lib/python3/dist-packages/_lasso.cpython-*.so
|
||||||
|
do
|
||||||
|
ln -sv $SOFILE $DSTDIR/
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
1
setup.py
1
setup.py
|
@ -102,7 +102,6 @@ setup(name='docbow',
|
||||||
'six<1.11.0',
|
'six<1.11.0',
|
||||||
'typing', # For M2Crypto.util
|
'typing', # For M2Crypto.util
|
||||||
'django-debug-toolbar<0.9.0',
|
'django-debug-toolbar<0.9.0',
|
||||||
'BeautifulSoup<3.3.0',
|
|
||||||
'gunicorn',
|
'gunicorn',
|
||||||
'django_journal>=2.0.0',
|
'django_journal>=2.0.0',
|
||||||
'django-picklefield',
|
'django-picklefield',
|
||||||
|
|
8
tox.ini
8
tox.ini
|
@ -1,9 +1,8 @@
|
||||||
[tox]
|
[tox]
|
||||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/docbow/{env:BRANCH_NAME:}
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/docbow/{env:BRANCH_NAME:}
|
||||||
envlist = py2-django111-{pw,pfwb}-coverage,py2-django111-mellon-coverage,py2-django11120, py2-django111-pfwbmellon-coverage
|
envlist = {py2,py3}-django111-{pw,pfwb}-coverage,{py2,py3}-django111-mellon-coverage,{py2,py3}-django11120, {py2,py3}-django111-pfwbmellon-coverage
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python2
|
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
deps =
|
deps =
|
||||||
M2Crypto
|
M2Crypto
|
||||||
|
@ -23,6 +22,8 @@ deps =
|
||||||
pytz
|
pytz
|
||||||
django111-mellon: django-mellon
|
django111-mellon: django-mellon
|
||||||
pfwbmellon: django-mellon
|
pfwbmellon: django-mellon
|
||||||
|
py2: BeautifulSoup<3.3.0
|
||||||
|
py3: beautifulsoup4
|
||||||
setenv =
|
setenv =
|
||||||
SECRET_KEY=changeme
|
SECRET_KEY=changeme
|
||||||
pw: CUSTOMIZATION=pw
|
pw: CUSTOMIZATION=pw
|
||||||
|
@ -35,7 +36,8 @@ setenv =
|
||||||
coverage: COVERAGE=--cov-append --cov-report xml --cov-report html --cov=docbow_project/
|
coverage: COVERAGE=--cov-append --cov-report xml --cov-report html --cov=docbow_project/
|
||||||
BRANCH_NAME={env:BRANCH_NAME:}
|
BRANCH_NAME={env:BRANCH_NAME:}
|
||||||
commands =
|
commands =
|
||||||
./getlasso.sh
|
py2: ./getlasso.sh
|
||||||
|
py3: ./getlasso3.sh
|
||||||
pw: py.test {posargs: {env:COVERAGE:} --junitxml=junit-{envname}.xml tests/main/ tests/pw/}
|
pw: py.test {posargs: {env:COVERAGE:} --junitxml=junit-{envname}.xml tests/main/ tests/pw/}
|
||||||
pfwb: py.test {posargs: {env:COVERAGE:} --junitxml=junit-{envname}.xml tests/main/ tests/pfwb/}
|
pfwb: py.test {posargs: {env:COVERAGE:} --junitxml=junit-{envname}.xml tests/main/ tests/pfwb/}
|
||||||
mellon: py.test {posargs: {env:COVERAGE:} --junitxml=junit-{envname}.xml tests/sso/}
|
mellon: py.test {posargs: {env:COVERAGE:} --junitxml=junit-{envname}.xml tests/sso/}
|
||||||
|
|
Loading…
Reference in New Issue