[Zope-Coders] Testing from an INSTANCE_HOME
Shane Hathaway
shane@zope.com
Wed, 28 May 2003 09:49:14 -0400
Toby Dickenson wrote:
>>I've seen discussion on this recently so thought I'd chime in.
>>It's has been impossible to run product tests from an INSTANCE_HOME
>>setup for some time now due to testrunner.py importing the Testing
>>package.
It sets INSTANCE_HOME so that Zope will use Testing/custom_zodb.py.
> Since that change, Ive been running product tests with:
It has been that way for a long time. In fact, the test results were
quite inconsistent until Testing took over custom_zodb.py by setting
INSTANCE_HOME.
> env STUPID_LOG_FILE=/dev/stderr
> PRODUCTS_PATH="%(PRODUCTS_PATH)s:/home/tdickenson/path/to/my/products"
> python2.1 /path/to/zope/utilities/testrunner.py -d .
>
> (minus line breaks)
>
> I would be interested to know if there is a better way.
The Testing package needs some way to tell Zope to use a particular
database configuration rather than what the user configured (overriding
custom_zodb or ZConfig.) If we can think of a way to vary the database
configuration independently of INSTANCE_HOME, I'm all for it.
Shane