Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

Re: SVN: ZODB/trunk/buildout.cfg Changed the generated test script to use a part-local tmp directory

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


tseaver at palladion

Oct 17, 2008, 9:38 AM

Post #1 of 2 (487 views)
Permalink
Re: SVN: ZODB/trunk/buildout.cfg Changed the generated test script to use a part-local tmp directory

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Fulton wrote:
> Log message for revision 92293:
> Changed the generated test script to use a part-local tmp directory
> that is cleaned up at the start of a test run.
>
> Unfortunately, the ZODB tests leave lots of temporary files behind
> which can cause failures in subsequent test runs and which tend to
> litter /tmp. Eventually, I want to clean that up, but, in the mean
> time, I can limit the damage to the test part directory.
>
>
> Changed:
> U ZODB/trunk/buildout.cfg
>
> -=-
> Modified: ZODB/trunk/buildout.cfg
> ===================================================================
> --- ZODB/trunk/buildout.cfg 2008-10-17 12:46:34 UTC (rev 92292)
> +++ ZODB/trunk/buildout.cfg 2008-10-17 14:02:39 UTC (rev 92293)
> @@ -6,6 +6,11 @@
> [test]
> recipe = zc.recipe.testrunner
> eggs = ZODB3
> +initialization =
> + import os, tempfile, shutil
> + if os.path.exists('tmp'): shutil.rmtree('tmp')
> + os.mkdir('tmp')
> + tempfile.tempdir = os.path.abspath('tmp')
>
> [scripts]
> recipe = zc.recipe.egg

Maybe zc.recipe.testrunner could add support for a 'finalization' or
'cleanup' argument which would do the same think as the 'initialization'
(or maybe only if there were no failures?)


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI+L+Y+gerLs4ltQ4RAgtjAKClCd+fCX0zjCPZD944HDJ/Tp2ZxwCgmVHM
0IMF4ykSw9OKP0ICgwPCNfg=
=+qlo
-----END PGP SIGNATURE-----

_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


jim at zope

Oct 17, 2008, 9:43 AM

Post #2 of 2 (453 views)
Permalink
Re: SVN: ZODB/trunk/buildout.cfg Changed the generated test script to use a part-local tmp directory [In reply to]

On Oct 17, 2008, at 12:38 PM, Tres Seaver wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jim Fulton wrote:
>> Log message for revision 92293:
>> Changed the generated test script to use a part-local tmp directory
>> that is cleaned up at the start of a test run.
>>
>> Unfortunately, the ZODB tests leave lots of temporary files behind
>> which can cause failures in subsequent test runs and which tend to
>> litter /tmp. Eventually, I want to clean that up, but, in the mean
>> time, I can limit the damage to the test part directory.
>>
>>
>> Changed:
>> U ZODB/trunk/buildout.cfg
>>
>> -=-
>> Modified: ZODB/trunk/buildout.cfg
>> ===================================================================
>> --- ZODB/trunk/buildout.cfg 2008-10-17 12:46:34 UTC (rev 92292)
>> +++ ZODB/trunk/buildout.cfg 2008-10-17 14:02:39 UTC (rev 92293)
>> @@ -6,6 +6,11 @@
>> [test]
>> recipe = zc.recipe.testrunner
>> eggs = ZODB3
>> +initialization =
>> + import os, tempfile, shutil
>> + if os.path.exists('tmp'): shutil.rmtree('tmp')
>> + os.mkdir('tmp')
>> + tempfile.tempdir = os.path.abspath('tmp')
>>
>> [scripts]
>> recipe = zc.recipe.egg
>
> Maybe zc.recipe.testrunner could add support for a 'finalization' or
> 'cleanup' argument which would do the same think as the
> 'initialization'
> (or maybe only if there were no failures?)


Yup. That would be good. In the mean time ... :)

It would also be good to have some automated way to check for leaving
temp files behind, much as it now checks for leaving threads behind.

I've got a significant project ahead to fix the ZODB tests to be less
sloppy about the way they manage files, although this initializer hack
buys me some time. :)

Jim

--
Jim Fulton
Zope Corporation


_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.