3 # We suppose that perl _mostly_ works at this moment, so may use
4 # sophisticated testing.
8 @INC = '../lib'; # pick up only this build's lib
9 $ENV{PERL5LIB} = '../lib'; # so children will see it too
14 $Test::Harness::switches = ""; # Too much noise otherwise
15 $Test::Harness::verbose = shift if @ARGV && $ARGV[0] eq '-v';
17 # Let tests know they're running in the perl core. Useful for modules
18 # which live dual lives on CPAN.
37 foreach (keys %datahandle) {
47 push @tests, <base/*.t>;
48 push @tests, <comp/*.t>;
49 push @tests, <cmd/*.t>;
50 push @tests, <run/*.t>;
51 push @tests, <io/*.t>;
52 push @tests, <op/*.t>;
53 push @tests, <lib/*.t>;
55 my $updir = File::Spec->updir;
56 my $mani = File::Spec->catfile(File::Spec->updir, "MANIFEST");
57 if (open(MANI, $mani)) {
58 while (<MANI>) { # similar code in t/TEST
59 if (m!^(ext/\S+/([^/]+\.t|test\.pl)|lib/\S+?(\.t|test\.pl))\s!) {
60 push @tests, File::Spec->catfile($updir, $1);
64 warn "$0: cannot open $mani: $!\n";
66 push @tests, <pod/*.t>;
70 Test::Harness::runtests @tests;
71 exit(0) unless -e "../testcompile";
80 my $dhwrapper = <<'EOT';
81 open DATA,"<".__FILE__;
82 until (($_=<DATA>) =~ /^__END__/) {};
85 @tests = grep (!$infinite{$_}, @tests);
88 if ($datahandle{$_} && !( -f "$new.t") ) {
91 open(F,"<$_") or die "Can't open $_: $!";
92 open(T,">$new") or die "Can't open $new: $!";
93 print T $dhwrapper, <F>;
100 print "The tests ", join(' ', keys(%infinite)),
101 " generate infinite loops! Skipping!\n";
103 $ENV{'HARNESS_COMPILE_TEST'} = 1;
104 $ENV{'PERLCC_TIMEOUT'} = 120 unless $ENV{'PERLCC_TIMEOUT'};
106 Test::Harness::runtests @tests;
107 foreach (keys %datahandle) {