In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/4692e667eb5fcc19306bd345ec7d08f52a1157c6?hp=0bb357657ea8e4ba328a0dc4e4546a86b8bc1038>
- Log ----------------------------------------------------------------- commit 4692e667eb5fcc19306bd345ec7d08f52a1157c6 Author: Nicholas Clark <[email protected]> Date: Tue Mar 8 09:33:21 2011 +0000 Nothing uses $ENV{PERL_CORE_MINITEST} any more, so don't set it in t/TEST M t/TEST commit 25b9bd9868cc1edb89e7ef62cd55eb0d7160791a Author: Nicholas Clark <[email protected]> Date: Tue Mar 8 09:02:31 2011 +0000 Move the special-case logic for $qr_embed_thr to regexp_qr_embed_thr.t t/re/regexp_qr_embed_thr.t is the only place that sets $::qr_embed_thr, so move the special-case startup logic related to it from t/re/regexp.t to t/re/regexp_qr_embed_thr.t. Use the skip_all_*() functions from test.pl M t/re/regexp.t M t/re/regexp_qr_embed_thr.t commit 9c123506c6947d583f22936cc4ff3fe34494ad23 Author: Nicholas Clark <[email protected]> Date: Tue Mar 8 08:59:54 2011 +0000 Refactor inccode.t to use is_miniperl() instead of $ENV{PERL_CORE_MINITEST} M t/op/inccode.t ----------------------------------------------------------------------- Summary of changes: t/TEST | 2 -- t/op/inccode.t | 19 +++++++++---------- t/re/regexp.t | 12 ------------ t/re/regexp_qr_embed_thr.t | 20 +++++++++++--------- 4 files changed, 20 insertions(+), 33 deletions(-) diff --git a/t/TEST b/t/TEST index afe7f49..3df0d7d 100755 --- a/t/TEST +++ b/t/TEST @@ -132,8 +132,6 @@ our $show_elapsed_time = $ENV{HARNESS_TIMER} || 0; @ARGV = @argv; } -$ENV{PERL_CORE_MINITEST} = 1 unless defined &DynaLoader::boot_DynaLoader; - chdir 't' if -f 't/TEST'; if (-f 'TEST' && -f 'harness' && -d '../lib') { @INC = '../lib'; diff --git a/t/op/inccode.t b/t/op/inccode.t index 58377a3..938a4e0 100644 --- a/t/op/inccode.t +++ b/t/op/inccode.t @@ -2,18 +2,18 @@ # Tests for the coderef-in-@INC feature -use Config; - -my $can_fork = 0; -my $minitest = $ENV{PERL_CORE_MINITEST}; -my $has_perlio = $Config{useperlio}; - BEGIN { chdir 't' if -d 't'; @INC = qw(. ../lib); + require './test.pl'; } -if (!$minitest) { +use Config; + +my $can_fork = 0; +my $has_perlio = $Config{useperlio}; + +unless (is_miniperl()) { if ($Config{d_fork} && eval 'require POSIX; 1') { $can_fork = 1; } @@ -21,8 +21,7 @@ if (!$minitest) { use strict; -require "test.pl"; -plan(tests => 49 + !$minitest * (3 + 14 * $can_fork)); +plan(tests => 49 + !is_miniperl() * (3 + 14 * $can_fork)); sub get_temp_fh { my $f = tempfile(); @@ -227,7 +226,7 @@ eval 'use foo'; ok( 1, 'returning PVBM ref doesn\'t segfault use' ); shift @INC; -exit if $minitest; +exit if is_miniperl(); SKIP: { skip( "No PerlIO available", 3 ) unless $has_perlio; diff --git a/t/re/regexp.t b/t/re/regexp.t index 5cb5186..9c430ad 100644 --- a/t/re/regexp.t +++ b/t/re/regexp.t @@ -57,18 +57,6 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; - if ($qr_embed_thr) { - require Config; - if (!$Config::Config{useithreads}) { - print "1..0 # Skip: no ithreads\n"; - exit 0; - } - if ($ENV{PERL_CORE_MINITEST}) { - print "1..0 # Skip: no dynamic loading on miniperl, no threads\n"; - exit 0; - } - require threads; - } } use strict; diff --git a/t/re/regexp_qr_embed_thr.t b/t/re/regexp_qr_embed_thr.t index db89c1a..9c90c03 100644 --- a/t/re/regexp_qr_embed_thr.t +++ b/t/re/regexp_qr_embed_thr.t @@ -1,11 +1,13 @@ #!./perl -$qr = 1; -$qr_embed_thr = 1; -for $file ('./re/regexp.t', './t/re/regexp.t', ':re:regexp.t') { - if (-r $file) { - do $file or die $@; - exit; - } -} -die "Cannot find ./re/regexp.t or ./t/re/regexp.t\n"; +chdir 't' if -d 't'; +require './test.pl'; + +skip_all_without_config(useithreads); +skip_all_if_miniperl("no dynamic loading on miniperl, no threads"); +require threads; + +$::qr = 1; +$::qr_embed_thr = 1; + +require './re/regexp.t'; -- Perl5 Master Repository
