On Mon, Apr 12, 2010 at 10:40:25AM +0200, Christian Theune wrote: > On 04/12/2010 10:38 AM, Adam GROSZER wrote: > >Hello Christian, > > > >Monday, April 12, 2010, 9:28:00 AM, you wrote: > > > >CT> One of my feature wishes (and pet peeves) for the zope.testing runner > >CT> was to monitor file creation and missing deletion and maybe sandboxing. > > > >CT> Christian > > > >Tinkering about this, what about doing > >os.environ['tmp'] = os.environ['tmp'] + '/' + somerandom > >run the tests > >check for anything left in os.environ['tmp'] > > Could be. I've also found tests writing to arbitrary other locations > or using the working directory.
I ended up doing this for the 3.4 KGS buildbot: vi /var/lib/buildbot/slaves/zope-kgs/buildbot.tac added import os os.environ['TMPDIR'] = tmpdir = '/tmp/buildbot.zope-kgs' if not os.path.exists(tmpdir): os.mkdir(tmpdir) to top vi /etc/cron.daily/clean-up-buildbot-tmp created file: find /tmp/buildbot.* -mindepth 1 -type f -mtime +1 -exec rm -f {} + find /tmp/buildbot.* -mindepth 1 -type d -empty -exec rmdir {} + chmod +x /etc/cron.daily/clean-up-buildbot-tmp Marius Gedminas -- http://pov.lt/ -- Zope 3 consulting and development
signature.asc
Description: Digital signature
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )