#!./perl
# This is written in a peculiar style, since we're trying to avoid
# most of the constructs we'll be testing for.
$| = 1;
# Let tests know they're running in the perl core. Useful for modules
# which live dual lives on CPAN.
# remove empty elements due to insertion of empty symbols via "''p1'" syntax
# Cheesy version of Getopt::Std. Maybe we should replace it with that.
@argv = ();
if ($#ARGV >= 0) {
$deparse = 1;
$deparse_opts = $1;
}
}
}
die "You need to run \"make test\" first to set things up.\n"
}
else {
die "Failed to symlink: $!\n"
die "Symlinked but no executable perl.third: $!\n"
}
}
}
# check leakage for embedders
# Roll your own File::Find!
use TestInit;
}
}
sub _quote_args {
# In VMS protect with doublequotes because otherwise
# DCL will lowercase -- unless already doublequoted.
}
return $argstring;
}
}
$t = $1;
{
}
}
}
} else {
}
}
}
# Tests known to cause infinite loops for the perlcc tests.
}
}
}
else {
}
sub _testprogs {
$type = shift @_;
$args = shift;
@tests = @_;
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
print <<EOT if ($type eq 'bytecompile');
------------------------------------------------------------------------------
TESTING BYTECODE COMPILER
------------------------------------------------------------------------------
EOT
$ENV{PERLCC_TIMEOUT} = 120
$bad = 0;
$good = 0;
$files = 0;
$totmax = 0;
}
}
my $maxlen = 0;
s/\.\w+\z/./;
}
# + 3 : we want three dots between the test name and the "ok"
$dotdotdot = $maxlen + 3 ;
my $valgrind = 0;
next;
}
next;
}
# Redefinition happens at compile time
next;
}
# B::Deparse doesn't support source filtering
next;
}
}
print $te;
}
$_ = <SCRIPT>;
if (/#!.*\bperl.*\s-\w*([tT])/) {
}
else {
# not all tests are expected to pass with this option
}
else {
}
}
my $test_executable; # for 'compile' tests
# Look for #line directives which change the filename
$file_opts .= ",-f$3$4"
if /^#\s*line\s+(\d+)\s+((\w+)|"([^"]+)")/;
}
}
my $deparse =
}
} else {
}
$bswitch .= "-k,"
$bswitch .= "-b,"
my $bytecompile =
}
. "--leak-resolution=high --show-reachable=yes "
}
}
else {
my $compile;
# -O9 for good measure, -fcog is broken ATM
# hopefully unused name...
print HACK <<EOT;
#!./perl
open HACK, '.\\perl $pl2c $test_executable |';
# cl.exe prints the name of the .c file on stdout (\%^\$^#)
while(<HACK>) {m/^\\w+\\.[cC]\$/ && next;print}
open HACK, '$test_executable |';
while(<HACK>) {print}
EOT
}
else {
}
}
$ok = 0;
$next = 0;
my $seen_leader = 0;
my $seen_ok = 0;
next if /^\s*$/; # skip blank lines
print $_;
}
$max = $1;
$files += 1;
$next = 1;
$ok = 1;
}
$seen_leader = 1;
}
else {
$next = 1;
$ok = 1;
}
}
$seen_ok = 1;
$ok = 0;
last;
}
else {
}
}
}
}
else {
$ok = 0;
}
}
}
}
my @valgrind;
@valgrind = <V>;
close V;
} else {
}
}
my $leaks = 0;
my $errors = 0;
local $_ = $valgrind[$i];
$errors += $1; # there may be multiple error summaries
$leaks += $1;
}
}
}
}
$valgrind++;
} else {
}
}
} else {
}
}
}
}
$tpp =~ s:^\.\./::;
$tpp =~ s:/:_:g;
}
# test if the compiler compiled something
$ok = 0;
print "Test did not compile\n";
}
print "${te}ok\n";
}
else {
print "${te}skipping test on this platform\n";
$files -= 1;
}
}
else {
$next += 1;
$_ = $test;
}
}
}
print "All tests successful.\n";
# XXX add mention of 'perlbug -ok' ?
}
else {
}
}
else {
}
else {
}
### Since not all tests were successful, you may want to run some of
### them individually and examine any diagnostic messages they produce.
### See the INSTALL document's section on "make test".
### You have a good chance to get more information by running
### ./perl harness
### in the 't' directory since most (>=80%) of the tests succeeded.
warn <<SHRDLU_3;
### You may have to set your dynamic library search path,
### $p, to point to the build directory:
SHRDLU_3
warn <<SHRDLU_4a;
### setenv $p `pwd`:\$$p; cd t; ./perl harness
### $p=`pwd`:\$$p; export $p; cd t; ./perl harness
### export $p=`pwd`:\$$p; cd t; ./perl harness
SHRDLU_4a
} else {
warn <<SHRDLU_4b;
### setenv $p `pwd`; cd t; ./perl harness
### $p=`pwd`; export $p; cd t; ./perl harness
### export $p=`pwd`; cd t; ./perl harness
SHRDLU_4b
}
warn <<SHRDLU_5;
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
SHRDLU_5
}
}
}
}
}