Re: run_tests and test_clean
Geoffrey Young wrote: hi all... in TestMM.pm we have this: test_clean : ... run_tests : test_clean ... test :: pure_all run_tests test_clean in a test suite with *lots* of files, test_clean takes forever. however, I experience has shown me that test_clean is only really required when you make changes to a configuration file or have autogenerated files you want to regenerate, making it a waste common development circumstances where a single test file is run over and over again. I'd like to suggest that test_clean _not_ be a prerequisite for run_tests, but instead shuffle the 'test' target around a bit. with the attached patch, you can save *lots* of cycles by doing something similar to the following: $ make test TEST_FILES=t/foo.t $ make run_tests TEST_FILES=t/foo.t $ make run_tests TEST_FILES=t/foo.t ... in my current situation, the first (with t/TEST -clean) runs in 45 seconds, while the second (and subsequent) iteration runs in 29 seconds. definitely a plus for me :) Are you sure that there will be no side effects? If yes, then +1 Why not just run t/TEST directly instead of using make? I never use make when developing tests. So it was never an issue for me. -- __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: run_tests and test_clean
Are you sure that there will be no side effects? I'm pretty sure. it's not like test_clean won't be called under normal 'make test' circumstances, it's just that now there would be a way around it if the user thinks it is beneficial. If yes, then +1 ok, cool. if things blow up then I'll revert it, but I'm not seeing any problems on my end. Why not just run t/TEST directly instead of using make? I never use make when developing tests. So it was never an issue for me. t/TEST works fine for smallish things, but make is nice for automatically computing and including library directories spread out all over the place. --Geoff
Re: run_tests and test_clean
Geoffrey Young wrote: Are you sure that there will be no side effects? I'm pretty sure. it's not like test_clean won't be called under normal 'make test' circumstances, it's just that now there would be a way around it if the user thinks it is beneficial. Oh, now I remember where it was used. In the httpd-dev test suite: 'make test' was always nuking .so files and ssl stuff, which was a pain in an arse. But I don't know why Doug programmed it this way. It wasn't us who introduced that change. If yes, then +1 ok, cool. if things blow up then I'll revert it, but I'm not seeing any problems on my end. sure Why not just run t/TEST directly instead of using make? I never use make when developing tests. So it was never an issue for me. t/TEST works fine for smallish things, but make is nice for automatically computing and including library directories spread out all over the place. +1 -- __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
run_tests and test_clean
hi all... in TestMM.pm we have this: test_clean : ... run_tests : test_clean ... test :: pure_all run_tests test_clean in a test suite with *lots* of files, test_clean takes forever. however, I experience has shown me that test_clean is only really required when you make changes to a configuration file or have autogenerated files you want to regenerate, making it a waste common development circumstances where a single test file is run over and over again. I'd like to suggest that test_clean _not_ be a prerequisite for run_tests, but instead shuffle the 'test' target around a bit. with the attached patch, you can save *lots* of cycles by doing something similar to the following: $ make test TEST_FILES=t/foo.t $ make run_tests TEST_FILES=t/foo.t $ make run_tests TEST_FILES=t/foo.t ... in my current situation, the first (with t/TEST -clean) runs in 45 seconds, while the second (and subsequent) iteration runs in 29 seconds. definitely a plus for me :) --Geoff Index: lib/Apache/TestMM.pm === RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v retrieving revision 1.37 diff -u -r1.37 TestMM.pm --- lib/Apache/TestMM.pm 5 Sep 2004 00:11:30 - 1.37 +++ lib/Apache/TestMM.pm 15 Sep 2004 18:45:27 - @@ -65,12 +65,12 @@ $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \ t/TEST $(APACHE_TEST_EXTRA_ARGS) -clean -run_tests : test_clean +run_tests : $(PASSENV) \ $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \ t/TEST $(APACHE_TEST_EXTRA_ARGS) -bugreport -verbose=$(TEST_VERBOSE) $(TEST_FILES) -test :: pure_all run_tests test_clean +test :: pure_all test_clean run_tests cmodules: cd c-modules $(MAKE) all