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';
33 foreach (keys %datahandle) {
43 push @tests, <base/*.t>;
44 push @tests, <comp/*.t>;
45 push @tests, <cmd/*.t>;
46 push @tests, <run/*.t>;
47 push @tests, <io/*.t>;
48 push @tests, <op/*.t>;
49 push @tests, <lib/*.t>;
51 my $updir = File::Spec->updir;
52 my $mani = File::Spec->catfile(File::Spec->updir, "MANIFEST");
53 if (open(MANI, $mani)) {
54 while (<MANI>) { # similar code in t/TEST
55 if (m!^(ext/\S+/([^/]+\.t|test\.pl)|lib/\S+?(\.t|test\.pl))\s!) {
56 push @tests, File::Spec->catfile($updir, $1);
60 warn "$0: cannot open $mani: $!\n";
62 push @tests, <pod/*.t>;
66 Test::Harness::runtests @tests;
67 exit(0) unless -e "../testcompile";
76 my $dhwrapper = <<'EOT';
77 open DATA,"<".__FILE__;
78 until (($_=<DATA>) =~ /^__END__/) {};
81 @tests = grep (!$infinite{$_}, @tests);
84 if ($datahandle{$_} && !( -f "$new.t") ) {
87 open(F,"<$_") or die "Can't open $_: $!";
88 open(T,">$new") or die "Can't open $new: $!";
89 print T $dhwrapper, <F>;
96 print "The tests ", join(' ', keys(%infinite)),
97 " generate infinite loops! Skipping!\n";
99 $ENV{'HARNESS_COMPILE_TEST'} = 1;
100 $ENV{'PERLCC_TIMEOUT'} = 120 unless $ENV{'PERLCC_TIMEOUT'};
102 Test::Harness::runtests @tests;
103 foreach (keys %datahandle) {