Jim Martinez wrote:
Hi all,
I'm developing web apps using Apache-Test and would like a subdirectory in
my t directory, say t/smoke/, that holds test that take a while to run.
I'll run a nightly smoke test that'll run all tests, but I'll run only
tests outside of t/smoke/ during daily work.
What is a good way to do this? Can you point me to some reference
material? Perhaps there is something similar in the mod perl source code.
In the mod perl 2 source code, snippet shown below, there seems to be a
way to do this using libscan to skip .svn dirs, but that's for old
versions of ExtUtils::MakeMaker (if I understand the code):
if (TOP_LEVEL && $ExtUtils::MakeMaker::VERSION < 6.06) {
# now that we're using subversion, make sure that
# .svn directories are skipped during the build process
# for old versions of MakeMaker
*MY::libscan = sub {
my $self = shift;
my $path = shift;
return '' if $path =~ /\B\.svn\b/;
return $path;
};
# avoid warning: used only once: possible typo at ...
*MY::libscan = *MY::libscan;
}
The man page for Apache::TestMM has some similar info, but I'm not sure
what to do with my test in MY::test.
Sorry if this seems like too much of a tangent for an A-T list question,
it's more of a Makefile question.
Jim, please take a look at:
http://perl.apache.org/docs/general/testing/testing.html#Skipping_Numerous_Tests
I've never used this feature, but I assume you could create t/smoke/all.t
which will have:
print "1..0" unless $ENV{RUN_ALL_MY_TESTS};
and when you will want to run those tests, you would run the test suite as:
RUN_ALL_MY_TESTS=1 make test
(there is nothing magical about RUN_ALL_MY_TESTS, it was just an example).
Let us know whether it has worked. May be we could then add it to the doc.
(a patch would be very welcome).
--
_____________________________________________________________
Stas Bekman mailto:[EMAIL PROTECTED] http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/