Added tox as a test-runner.
It will build different virtualenvs for each target. getlasso.sh is somewhat hacky, but until lasso is installable through pip this is the workaround. License: MIT refs #5244
This commit is contained in:
parent
242815a15e
commit
e2213b9bda
|
@ -13,4 +13,5 @@ log.log
|
||||||
authentic2/locale/fr/LC_MESSAGES/django.mo
|
authentic2/locale/fr/LC_MESSAGES/django.mo
|
||||||
local_settings.*
|
local_settings.*
|
||||||
*.egg-info
|
*.egg-info
|
||||||
*.mo
|
*.mo
|
||||||
|
.tox
|
||||||
|
|
|
@ -44,6 +44,8 @@ include diagnose.py
|
||||||
include ez_setup.py
|
include ez_setup.py
|
||||||
include authentic2/auth2_auth/auth2_ssl/authentic_ssl.vhost
|
include authentic2/auth2_auth/auth2_ssl/authentic_ssl.vhost
|
||||||
include requirements.txt
|
include requirements.txt
|
||||||
|
include test_settings
|
||||||
|
include getlasso.sh
|
||||||
include authentic2/vendor/dpam/LICENSE
|
include authentic2/vendor/dpam/LICENSE
|
||||||
include authentic2/nonce/README.rst
|
include authentic2/nonce/README.rst
|
||||||
include doc/conf.py doc/Makefile doc/README.rst.bak
|
include doc/conf.py doc/Makefile doc/README.rst.bak
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get venv site-packages path
|
||||||
|
DSTDIR=`python -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 python -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 $SRCDIR/lasso.py $DSTDIR
|
||||||
|
ln -sv $SRCDIR/_lasso.* $DSTDIR
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Django<1.6
|
Django>1.5,<1.7
|
||||||
south>=0.8.4
|
south>=0.8.4
|
||||||
requests
|
requests
|
||||||
django-model-utils
|
django-model-utils
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -113,7 +113,7 @@ setup(name="authentic2",
|
||||||
scripts = ('authentic2-ctl',),
|
scripts = ('authentic2-ctl',),
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=['django < 1.6',
|
install_requires=['django >= 1.5, < 1.7',
|
||||||
'south>=0.8.4',
|
'south>=0.8.4',
|
||||||
'requests',
|
'requests',
|
||||||
'django-model-utils',
|
'django-model-utils',
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
DEBUG = False
|
||||||
|
|
||||||
|
if DEBUG:
|
||||||
|
DEBUG_TOOLBAR = True
|
||||||
|
TEMPLATE_DEBUG = True
|
||||||
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
|
'INTERCEPT_REDIRECTS': False,
|
||||||
|
}
|
||||||
|
INTERNAL_IPS = ('127.0.0.1',)
|
||||||
|
|
||||||
|
SECRET_KEY = 'coin'
|
||||||
|
|
||||||
|
from authentic2.settings import INSTALLED_APPS, \
|
||||||
|
MIDDLEWARE_CLASSES
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
'NAME': os.path.join(os.path.dirname(__file__), 'authentic2.sqlite'),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
if DEBUG:
|
||||||
|
INSTALLED_APPS += ('debug_toolbar',)
|
||||||
|
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
|
||||||
|
|
||||||
|
|
||||||
|
LANGUAGE_CODE = 'en'
|
||||||
|
|
||||||
|
IDP_SAML2 = True
|
||||||
|
#IDP_OPENID = True
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Tox (http://tox.testrun.org/) is a tool for running tests
|
||||||
|
# in multiple virtualenvs. This configuration file will run the
|
||||||
|
# test suite on all supported python versions. To use it, "pip install tox"
|
||||||
|
# and then run "tox" from this directory.
|
||||||
|
|
||||||
|
[tox]
|
||||||
|
envlist = django15, django16
|
||||||
|
|
||||||
|
[testenv:django15]
|
||||||
|
commands =
|
||||||
|
./getlasso.sh
|
||||||
|
ln -sf test_settings local_settings.py
|
||||||
|
./authentic2-ctl test auth contenttypes sessions messages admin_tools theming menu dashboard authentic2
|
||||||
|
deps = django>1.5,<1.6
|
||||||
|
|
||||||
|
[testenv:django16]
|
||||||
|
commands =
|
||||||
|
./getlasso.sh
|
||||||
|
ln -sf test_settings local_settings.py
|
||||||
|
./authentic2-ctl test django.contrib.auth django.contrib.contenttypes django.contrib.sessions django.contrib.messages admin_tools authentic2
|
||||||
|
deps = django>1.6,<1.7
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue