BEGIN {
chdir( 't' ) if -d 't';
@INC = '../lib';
+ require './test.pl'; # for which_perl() etc
require Config; import Config;
if ($Config{'extensions'} !~ /\bDevel\/DProf\b/){
print "1..0 # Skip: Devel::DProf was not built\n";
$path_sep = $Config{path_sep} || ':';
$perl5lib = $opt_I || join( $path_sep, @INC );
-$perl = $opt_p || $^X;
+$perl = $opt_p || which_perl();
if( $opt_v ){
print "tests: @tests\n";
my $t_start = new Benchmark;
open( R, "$perl \"$opt_d\" $test |" ) || warn "$0: Can't run. $!\n";
@results = <R>;
- close R;
+ close R or warn "Could not close: $!";
my $t_total = timediff( new Benchmark, $t_start );
if( $opt_v ){
print @results
}
- print '# ',timestr( $t_total, 'nop' ), "\n";
+ print '# ' . timestr( $t_total, 'nop' ), "\n";
}
$| = 1;
-print "1..18\n";
+print "1..20\n";
while( @tests ){
$test = shift @tests;
$test =~ s/\.$// if $^O eq 'VMS';