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 -0000 1.37
+++ lib/Apache/TestMM.pm 15 Sep 2004 18:45:27 -0000
@@ -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