This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In t/TEST, automatically detect if running under miniperl
authorNicholas Clark <nick@ccl4.org>
Mon, 21 Feb 2011 13:31:57 +0000 (13:31 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 21 Feb 2011 13:31:57 +0000 (13:31 +0000)
Set $ENV{PERL_CORE_MINITEST} based on defined &DynaLoader::boot_DynaLoader,
instead of relying on a -minitest parameter. &DynaLoader::boot_DynaLoader is
undefined in miniperl, defined in perl, for both -Dusedl and -Uusedl

Cross/Makefile-cross-SH
Cross/Makefile.SH.patch
Makefile.SH
t/TEST
vms/test.com

index 65d496a..756538d 100644 (file)
@@ -1130,7 +1130,7 @@ test.torture torturetest: test_prep
 
 minitest.utf16: minitest.prep
        - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
-               && $(LDLIBPTH) ./perl TEST -minitest -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+               && $(LDLIBPTH) ./perl TEST -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
 
 test.utf16 check.utf16: test_prep
        PERL=./perl $(MAKE) TEST_ARGS=-utf16 _test
@@ -1191,7 +1191,7 @@ minitest.prep:
 # is crashing.
 minitest: miniperl$(EXE_EXT) minitest.prep
        - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
-               && $(LDLIBPTH) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+               && $(LDLIBPTH) ./perl TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
 
 # Test via harness
 
index f21a1e4..953659c 100644 (file)
 -minitest: miniperl$(EXE_EXT) lib/re.pm minitest.prep
 +minitest: lib/re.pm minitest.prep
        - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
-               && $(LDLIBPTH) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+               && $(LDLIBPTH) ./perl TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
  
index 35c83cb..ce14244 100755 (executable)
@@ -1407,7 +1407,7 @@ test.torture torturetest: test_prep
 
 minitest.utf16: minitest.prep
        - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) \
-               && $(RUN_PERL) TEST -minitest -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+               && $(RUN_PERL) TEST -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
 
 test.utf16 check.utf16: test_prep
        TEST_ARGS=-utf16 $(RUN_TESTS) choose
@@ -1466,7 +1466,7 @@ minitest.prep:
 # is crashing.
 minitest: $(MINIPERL_EXE) minitest.prep
        - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) \
-               && $(RUN_PERL) TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t op/*.t uni/*.t </dev/tty
+               && $(RUN_PERL) TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t op/*.t uni/*.t </dev/tty
 
 # Test via harness
 
diff --git a/t/TEST b/t/TEST
index 51b6df4..afe7f49 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -124,7 +124,6 @@ our $show_elapsed_time = $ENV{HARNESS_TIMER} || 0;
        $::with_utf8 = 1 if $1 eq 'utf8';
        $::with_utf16 = 1 if $1 eq 'utf16';
        $::taintwarn = 1 if $1 eq 'taintwarn';
-       $ENV{PERL_CORE_MINITEST} = 1 if $1 eq 'minitest';
        if ($1 =~ /^deparse(,.+)?$/) {
            $::deparse = 1;
            $::deparse_opts = $1;
@@ -133,6 +132,8 @@ 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';
index 63573f2..709608e 100644 (file)
@@ -83,7 +83,7 @@ $   Define 'dbg'Perlshr 'PerlShr_filespec'
 $   If F$Mode() .nes. "INTERACTIVE" Then Define/Nolog PERL_SKIP_TTY_TEST 1
 $   If PERL_TEST_DRIVER .eqs. "minitest"
 $   Then
-$       MCR Sys$Disk:[]Perl'exe' TEST. "-minitest" "base/*.t" "comp/*.t" "cmd/*.t" "run/*.t" "io/*.t" "op/*.t" "uni/*.t"
+$       MCR Sys$Disk:[]Perl'exe' TEST. "base/*.t" "comp/*.t" "cmd/*.t" "run/*.t" "io/*.t" "op/*.t" "uni/*.t"
 $   Else
 $       MCR Sys$Disk:[]Perl'exe' "-I[-.lib]" 'PERL_TEST_DRIVER' "''p3'" "''p4'" "''p5'" "''p6'" "''p7'"
 $   EndIf