>> Sat Jan 19 22:56:51 EST 2008 Mark Stosberg <[EMAIL PROTECTED]> >> * Major Perl test suite clean-up. >> The primary purpose of this patch was make sure all the tests are >> executed in >> randomly named directories, which allows us to run Perl tests in >> parallel, >> without the directory names collided. >> >> This isn't enabled by default for "make test", but it is there to play >> with. >> In the test directory, you can now do: >> >> ./bin/prove -j9 *.pl >> >> to run 9 tests in parallel. There is also "--fork" >> option which should be a win on multi-CPU computers. >> See "perldoc ./bin/prove" for details. >> >> As part of this, a lot of boiler-plate code at the top and bottom of >> the >> scripts could be eliminated, and I made few other minor style clean-ups >> while I had the files open. >> >> There should be no functional changes to the tests. > > I'm not sure I like this idea, as it seems likely to lead to greater > difficulty in understanding and debugging failing test results. We can > already run up to six tests in parallel just by running make -j6 test.
Unless I misunderstand how this would work, it is quite likely both tests would have tried to create a repo named "temp1" in the same directory at the same time, and there would be a conflict. > Also, why make the directory names random? It's the standard tempfile/tempdir way to name temporary files and directories. > Couldn't we just generate a > unique directory name from the test name itself? So then init_tmp_repo() in > test foo.pl would generate a repository named temp1-foo. I have now sent a patch for something like this, that, so that the directory name is like "add.pl-tmpdir-XXXX", where the XXXX become random characters. I discovered I need to go back and update the Perl tests again to add a final "chdir" to them, so that the auto-deletion of the directories can work properly. There is a way to disable the deleting of the directories if you want to debug them, which I'll also try to document. Also, I'm not necessarily advocating turning parallel tests by default, but I'm interesting in supporting it as an option. Here's another useful new testing technique to try: ./bin/prove --directives *.pl That will show you just tests marked "TODO" or "SKIP". Because it has been hard to report on these in the past, the remaining TODO tests have been largely forgetten. The "bugs/" directory serves the same purpose now. With an improved harness for the shell tests, the same script and techniques could work on them, too. Mark -- http://mark.stosberg.com/ _______________________________________________ darcs-devel mailing list darcs-devel@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-devel