On Feb 5, 2007, at 5:41 AM, Adam Kennedy wrote:

One thing that strikes me as a problem is transitory resources used by tests. I know I have a number of modules that will create (deleting if they already exist) various files during their run (cleaning up at the end).

Each test is still independent (they randomize just fine) but if you ran two at the same time they could wallop each other's data.

Short of running each test in some sort of transactional file system (do such things exist? Are they common?) or cloning the build directory before each test, the only solution I can imagine is some sort of thing in the (Makefile|Build).PL that explicitly states that the tests are allowed to run in parallel, which can then be passed on to the testing process...

A solution might be to use File::Temp::tempdir(CLEANUP => 1) in that case. You can build the whole tree of files per-test and wipe clean upon exit. It seems to me that writing temp files to the build dir should be discouraged.

Chris

--
Chris Dolan, Equilibrious LLC, http://equilibrious.net/
Public key: http://chrisdolan.net/public.key
vCard: http://chrisdolan.net/ChrisDolan.vcf



Reply via email to