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

Tres Seaver tseaver at palladion.com
Fri Oct 17 12:38:48 EDT 2008


-----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.com
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-----



More information about the Zope-Dev mailing list