On Fri, Feb 06, 2004 at 11:03:42AM -0600, Scott Bolte wrote: > Building on the mini_harness.plx example from > Test::Harness::Straps, I added checks for declarations like > the following: > > DEPENDS_ON "file" # implicit test file dependency > "test_file" DEPENDS_ON "module_file" > "test_file" DEPENDS_ON "data_file" > > I'd expect a new Test::Harness::depends_on(@) function is
It wouldn't be Test::Harness, it would be a seperate Test::Depends or something. > the best way to generate the declarations. For now, however, > I just add the following line to the end of my test files: > > map {print qq(DEPENDS_ON "$INC{$_}"\n) } keys(%INC); > > In a script with a perpetual loop, I check the modification > times of the test files and the modules each uses. Then, > whenever something changes, I rerun the affected tests. > Also inside that loop is the generation of a simple dashboard. > > With this code, less than 200 lines all told, I have > continuous, automatic testing going on as I write new tests > and new code. I've found it a very powerful feedback system. > > As a newcomer to this list, I'm not sure what needs to > happen to expanded Test::Harness. I can provide reference code, > but I expect a discussion needs to happen first. Sounds like you've already got it. Doesn't have to go into T::H. Modularize what you've got and put it on CPAN. > P.S. Btw, I also will be requesting that the stderr output > from tests be captured as well. Love to, but can't do it and still have T::H be cross-platform compatible. :( What you can do is have your tests print your diagnostics as lines beginning with a # to STDOUT. I believe T::H::Straps currently picks these up as type "other" but it may change to "comment" later. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/ You and your "facts" and your "physics". Pah, I say. http://www.goats.com/archive/981221.html