add a directory of tests to run with large available memory
authorTony Cook <tony@develop-help.com>
Fri, 23 Mar 2012 12:11:03 +0000 (13:11 +0100)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 22 May 2012 00:51:52 +0000 (17:51 -0700)
Intended for testing 64-bit behavious

pod/perlhack.pod
t/TEST
t/harness

index 63df5d5..64329ed 100644 (file)
@@ -948,6 +948,13 @@ Setting this variable skips the vrexx.t tests for OS2::REXX.
 
 This sets a variable in op/numconvert.t.
 
+=item * PERL_TEST_MEMORY
+
+Setting this variable includes the tests in F<t/bigmem/>.  This should
+be set to the number of gigabytes of memory available for testing,
+eg. C<PERL_TEST_MEMORY=4> indicates that tests that require 4GiB of
+available memory can be run safely.
+
 =back
 
 See also the documentation for the Test and Test::Harness modules, for
diff --git a/t/TEST b/t/TEST
index f635da7..82e8378 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -468,6 +468,7 @@ unless (@ARGV) {
        _find_tests('x2p');
        _find_tests('japh') if $::torture;
        _find_tests('t/benchmark') if $::benchmark or $ENV{PERL_BENCHMARK};
+       _find_tests('bigmem') if $ENV{PERL_TEST_MEMORY};
     }
 }
 
index 7748c26..1a1efdb 100644 (file)
--- a/t/harness
+++ b/t/harness
@@ -135,6 +135,7 @@ if (@ARGV) {
        push @next, 'japh' if $torture;
        push @next, 'win32' if $^O eq 'MSWin32';
        push @next, 'benchmark' if $ENV{PERL_BENCHMARK};
+       push @next, 'bigmem' if $ENV{PERL_TEST_MEMORY};
        # Hopefully TAP::Parser::Scheduler will support this syntax soon.
        # my $next = { par => '{' . join (',', @next) . '}/*.t' };
        my $next = { par => [