Updated the buildout configuration to just run relstorage tests and

to select which databases to use at build time.
This commit is contained in:
Jim Fulton 2016-06-14 13:43:36 -04:00
parent 01ae65b713
commit 3a49a6b23e
4 changed files with 32 additions and 11 deletions

18
BUILDOUT.rst Normal file
View File

@ -0,0 +1,18 @@
========================================
Building for running tests with buildout
========================================
Run the buildout as usual, but to include database support specify a
db option, with one or more database names sperated by commas. For
example, to build for postgres, mysql and oracle::
bin/buildout db=postgresql,mysql,oracle
Or just postgres:
bin/buildout db=postgresql
Before running tests, you'll need to run database setup scripts in the
``.travis`` subdirectory.
Then run tests with ``bin/test``.

View File

@ -11,6 +11,9 @@
psycopg2cffi respectively. PyPy can be substantially faster than
CPython in some scenarios; see `PR 23`_.
- Updated the buildout configuration to just run relstorage tests and
to select which databases to use at build time.
.. _`PR 23`: https://github.com/zodb/relstorage/pull/23/
1.6.0b3 (2014-12-08)

View File

@ -1,17 +1,17 @@
[buildout]
develop = .
base-parts = test python omelette coverage-test coverage-report
base-parts = test py python omelette coverage-test coverage-report
parts = ${buildout:base-parts}
eggs = relstorage
psycopg2
MySQL-python
ZODB3 [test]
zope.testrunner
mock
db =
[test]
recipe = zc.recipe.testrunner
eggs = ${buildout:eggs}
eggs = relstorage [test, ${buildout:db}]
[py]
recipe = zc.recipe.egg
eggs = ${test:eggs}
[python]
recipe = zc.recipe.egg

View File

@ -45,6 +45,8 @@ def read_file(*path):
result = f.read()
return result
tests_require = ['mock', 'zope.testing', 'ZODB [test]']
setup(
name="RelStorage",
version=VERSION,
@ -80,10 +82,7 @@ setup(
'zope.interface',
'zc.lockfile',
],
tests_require=[
'mock',
'zope.testing',
],
tests_require = tests_require,
extras_require={
'mysql:platform_python_implementation=="CPython"': [
'MySQL-python>=1.2.2',
@ -100,6 +99,7 @@ setup(
'oracle': [
'cx_Oracle>=4.3.1'
],
'test': tests_require,
},
entry_points = {
'console_scripts': [