summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-02-21 13:31:57 +0000
committerNicholas Clark <nick@ccl4.org>2011-02-21 13:31:57 +0000
commit115e9681b8231e4672c4d1f4ad598dba6f23a54c (patch)
tree1cd2a4ceede804e698b83dc469c19a76584c002a
parent44bcdf2982dc8e16a1775b26b660a1716a7bf3be (diff)
downloadperl-115e9681b8231e4672c4d1f4ad598dba6f23a54c.tar.gz
In t/TEST, automatically detect if running under miniperl
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
-rw-r--r--Cross/Makefile-cross-SH4
-rw-r--r--Cross/Makefile.SH.patch2
-rwxr-xr-xMakefile.SH4
-rwxr-xr-xt/TEST3
-rw-r--r--vms/test.com2
5 files changed, 8 insertions, 7 deletions
diff --git a/Cross/Makefile-cross-SH b/Cross/Makefile-cross-SH
index 65d496a583..756538d514 100644
--- a/Cross/Makefile-cross-SH
+++ b/Cross/Makefile-cross-SH
@@ -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
diff --git a/Cross/Makefile.SH.patch b/Cross/Makefile.SH.patch
index f21a1e43e3..953659c41f 100644
--- a/Cross/Makefile.SH.patch
+++ b/Cross/Makefile.SH.patch
@@ -185,5 +185,5 @@
-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
diff --git a/Makefile.SH b/Makefile.SH
index 35c83cbed4..ce142440f9 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -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 51b6df489c..afe7f494f5 100755
--- 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';
diff --git a/vms/test.com b/vms/test.com
index 63573f29cc..709608e964 100644
--- a/vms/test.com
+++ b/vms/test.com
@@ -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