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) {
44 if ($^O eq 'MSWin32') {
45 @tests = map(glob($_),@ARGV);
52 push @tests, <base/*.t>;
53 push @tests, <comp/*.t>;
54 push @tests, <cmd/*.t>;
55 push @tests, <run/*.t>;
56 push @tests, <io/*.t>;
57 push @tests, <op/*.t>;
58 push @tests, <uni/*.t>;
59 push @tests, <lib/*.t>;
60 push @tests, <win32/*.t> if $^O eq 'MSWin32';
62 my $updir = File::Spec->updir;
63 my $mani = File::Spec->catfile(File::Spec->updir, "MANIFEST");
64 if (open(MANI, $mani)) {
65 while (<MANI>) { # similar code in t/TEST
66 if (m!^(ext/\S+/?([^/]+\.t|test\.pl)|lib/\S+?(\.t|test\.pl))\s!) {
67 push @tests, File::Spec->catfile($updir, $1);
71 warn "$0: cannot open $mani: $!\n";
73 push @tests, <pod/*.t>;
77 Test::Harness::runtests @tests;
78 exit(0) unless -e "../testcompile";
87 my $dhwrapper = <<'EOT';
88 open DATA,"<".__FILE__;
89 until (($_=<DATA>) =~ /^__END__/) {};
92 @tests = grep (!$infinite{$_}, @tests);
95 if ($datahandle{$_} && !( -f "$new.t") ) {
98 open(F,"<$_") or die "Can't open $_: $!";
99 open(T,">$new") or die "Can't open $new: $!";
100 print T $dhwrapper, <F>;
107 print "The tests ", join(' ', keys(%infinite)),
108 " generate infinite loops! Skipping!\n";
110 $ENV{'HARNESS_COMPILE_TEST'} = 1;
111 $ENV{'PERLCC_TIMEOUT'} = 120 unless $ENV{'PERLCC_TIMEOUT'};
113 Test::Harness::runtests @tests;
114 foreach (keys %datahandle) {