# This is written in a peculiar style, since we're trying to avoid
# most of the constructs we'll be testing for. (This comment is
-# probably obsolete on the avoidance side, though still currrent
+# probably obsolete on the avoidance side, though still current
# on the peculiarity side.)
# t/TEST and t/harness need to share code. The logical way to do this would be
'../ext/File-Glob/t' => '-I.. -MTestInit', # FIXME - tests assume t/
);
-# "not absolute" is the the default, as it saves some fakery within TestInit
-# which can peturb tests, and takes CPU. Working with the upstream author of
+# "not absolute" is the default, as it saves some fakery within TestInit
+# which can perturb tests, and takes CPU. Working with the upstream author of
# any of these, to figure out how to remove them from this list, considered
# "a good thing".
my %abs = (
- '../cpan/Archive-Extract' => 1,
'../cpan/Archive-Tar' => 1,
'../cpan/AutoLoader' => 1,
'../cpan/CPAN' => 1,
'../cpan/IPC-Cmd' => 1,
'../cpan/IPC-SysV' => 1,
'../cpan/Locale-Codes' => 1,
- '../cpan/Log-Message' => 1,
'../cpan/Module-Build' => 1,
'../cpan/Module-Load' => 1,
'../cpan/Module-Load-Conditional' => 1,
- '../cpan/Object-Accessor' => 1,
'../cpan/Package-Constants' => 1,
'../cpan/Parse-CPAN-Meta' => 1,
'../cpan/Pod-Simple' => 1,
- '../cpan/Term-UI' => 1,
'../cpan/Test-Simple' => 1,
'../cpan/podlators' => 1,
'../dist/Cwd' => 1,
# delete env vars that may influence the results
# but allow override via *_TEST env var if wanted
# (e.g. PERL5OPT_TEST=-d:NYTProf)
-for my $envname (qw(PERL5LIB PERLLIB PERL5OPT)) {
+my @bad_env_vars = qw(
+ PERL5LIB PERLLIB PERL5OPT
+ PERL_YAML_BACKEND PERL_JSON_BACKEND
+);
+
+for my $envname (@bad_env_vars) {
my $override = $ENV{"${envname}_TEST"};
if (defined $override) {
warn "$0: $envname=$override\n";
die "You need to run \"make test\" first to set things up.\n"
unless -e 'perl' or -e 'perl.exe' or -e 'perl.pm';
-if ($ENV{PERL_3LOG}) { # Tru64 third(1) tool, see perlhack
- unless (-x 'perl.third') {
- unless (-x '../perl.third') {
- die "You need to run \"make perl.third first.\n";
- }
- else {
- print "Symlinking ../perl.third as perl.third...\n";
- die "Failed to symlink: $!\n"
- unless symlink("../perl.third", "perl.third");
- die "Symlinked but no executable perl.third: $!\n"
- unless -x 'perl.third';
- }
- }
-}
-
# check leakage for embedders
$ENV{PERL_DESTRUCT_LEVEL} = 2 unless exists $ENV{PERL_DESTRUCT_LEVEL};
# check existence of all symbols
# then comp, to validate that require works
# then run, to validate that -M works
# then we know we can -MTestInit for everything else, making life simpler
- foreach my $dir (qw(base comp run cmd io re op uni mro)) {
+ foreach my $dir (qw(base comp run cmd io re opbasic op uni mro)) {
_find_tests($dir);
}
- _find_tests("lib") unless $::core;
+ unless ($::core) {
+ _find_tests('porting');
+ _find_tests("lib");
+ }
# Config.pm may be broken for make minitest. And this is only a refinement
# for skipping tests on non-default builds, so it is allowed to fail.
# What we want to to is make a list of extensions which we did not build.
push @ARGV, _tests_from_manifest($extensions, $known_extensions);
unless ($::core) {
_find_tests('x2p');
- _find_tests('porting');
_find_tests('japh') if $::torture;
_find_tests('t/benchmark') if $::benchmark or $ENV{PERL_BENCHMARK};
+ _find_tests('bigmem') if $ENV{PERL_TEST_MEMORY};
}
}
# in BEGIN/END blocks (giving better visibility of self vs
# children of each testprog), but that would require some
# IPC to send results back here, or a completely different
- # collection scheme (Storable isnt tuned for incremental use)
+ # collection scheme (Storable isn't tuned for incremental use)
@starttimes = times;
}
if ($test =~ /^$/) {
next if /^\s*$/; # skip blank lines
if (/^1..$/ && ($^O eq 'VMS')) {
# VMS pipe bug inserts blank lines.
- my $l2 = <RESULTS>;
+ my $l2 = <$results>;
if ($l2 =~ /^\s*$/) {
- $l2 = <RESULTS>;
+ $l2 = <$results>;
}
$_ = '1..' . $l2;
}
if ($type eq 'deparse') {
unlink "./$test.dp";
}
- if ($ENV{PERL_3LOG}) {
- my $tpp = $test;
- $tpp =~ s:^\.\./::;
- $tpp =~ s:/:_:g;
- $tpp =~ s:\.t$:.3log:;
- rename("perl.3log", $tpp) ||
- die "rename: perl3.log to $tpp: $!\n";
- }
if (not defined $failure and $next != $max) {
$failure="FAILED--expected $max tests, saw $next";
}
if (defined $failure) {
print "${te}$failure\n";
$::bad_files = $::bad_files + 1;
- if ($test =~ /^base/) {
- die "Failed a basic test ($test) -- cannot continue.\n";
+ if ($test =~ /^base/ && ! defined &DynaLoader::boot_DynaLoader) {
+ # Die if running under minitest (no DynaLoader). Otherwise
+ # keep going, as we know that Perl basically works, or we
+ # would not have been able to actually compile it all the way.
+ die "Failed a basic test ($test) under minitest -- cannot continue.\n";
}
$failed_tests{$test} = 1;
}