From: Charles Lane Date: Fri, 20 Oct 2000 08:26:04 +0000 (-0400) Subject: Perl 5.6.0/5.7.0 enable DProf test for VMS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ef060a86ec01add98aaa6268b36dd5f691dc2bf2;p=p5sagit%2Fp5-mst-13.2.git Perl 5.6.0/5.7.0 enable DProf test for VMS Message-Id: <001020074851.3751a@DUPHY4.Physics.Drexel.Edu> p4raw-id: //depot/perl@7377 --- diff --git a/configure.com b/configure.com index be0992a..f4b607a 100644 --- a/configure.com +++ b/configure.com @@ -2733,7 +2733,8 @@ $ ELSE d_mymalloc="undef" $ ENDIF $! $ usedl="define" -$ startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !\n$ exit++ + ++$status != 0 and $exit = $status = undef;""" +$ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n" +$ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($ARGV[$#ARGV] eq '"+"'){pop @ARGV;}""" $! $ IF ((Use_Threads) .AND. (vms_ver .LES. "6.2")) $ THEN diff --git a/t/lib/dprof.t b/t/lib/dprof.t index 10c9b0f..6fa24b9 100755 --- a/t/lib/dprof.t +++ b/t/lib/dprof.t @@ -11,7 +11,8 @@ BEGIN { } END { - unlink 'tmon.out', 'err'; + while(-e 'tmon.out' && unlink 'tmon.out') {} + while(-e 'err' && unlink 'err') {} } use Benchmark qw( timediff timestr ); @@ -22,7 +23,7 @@ getopts('vI:p:'); # -I Add to @INC # -p Name of perl binary -@tests = @ARGV ? @ARGV : sort ; # glob-sort, for OS/2 +@tests = @ARGV ? @ARGV : sort (, ); # glob-sort, for OS/2 $path_sep = $Config{path_sep} || ':'; $perl5lib = $opt_I || join( $path_sep, @INC ); @@ -46,7 +47,7 @@ sub profile { my $opt_d = '-d:DProf'; my $t_start = new Benchmark; - open( R, "$perl $opt_d $test |" ) || warn "$0: Can't run. $!\n"; + open( R, "$perl \"$opt_d\" $test |" ) || warn "$0: Can't run. $!\n"; @results = ; close R; my $t_total = timediff( new Benchmark, $t_start ); @@ -56,14 +57,14 @@ sub profile { print @results } - print timestr( $t_total, 'nop' ), "\n"; + print '# ',timestr( $t_total, 'nop' ), "\n"; } sub verify { my $test = shift; - system $perl, '-I../lib', '-I./lib/dprof', $test, + system $perl, '"-I../lib"', '"-I./lib/dprof"', $test, $opt_v?'-v':'', '-p', $perl; } @@ -72,6 +73,7 @@ $| = 1; print "1..18\n"; while( @tests ){ $test = shift @tests; + $test =~ s/\.$// if $^O eq 'VMS'; if( $test =~ /_t$/i ){ print "# $test" . '.' x (20 - length $test); profile $test; diff --git a/t/lib/dprof/V.pm b/t/lib/dprof/V.pm index 7e34da5..cbdeca4 100644 --- a/t/lib/dprof/V.pm +++ b/t/lib/dprof/V.pm @@ -13,6 +13,7 @@ $num = 0; $results = $expected = ''; $perl = $opt_p || $^X; $dpp = $opt_d || '../utils/dprofpp'; +$dpp .= '.com' if $^O eq 'VMS'; print "\nperl: $perl\n" if $opt_v; if( ! -f $perl ){ die "Where's Perl?" } @@ -21,7 +22,7 @@ if( ! -f $dpp ){ die "Where's dprofpp?" } sub dprofpp { my $switches = shift; - open( D, "$perl -I../lib $dpp $switches 2> err |" ) || warn "$0: Can't run. $!\n"; + open( D, "$perl \"-I../lib\" $dpp \"$switches\" 2> err |" ) || warn "$0: Can't run. $!\n"; @results = ; close D; diff --git a/vms/test.com b/vms/test.com index afc1e57..522904d 100644 --- a/vms/test.com +++ b/vms/test.com @@ -112,7 +112,7 @@ use Config; @libexcl=('db-btree.t','db-hash.t','db-recno.t', 'gdbm.t','io_dup.t', 'io_pipe.t', 'io_poll.t', 'io_sel.t', 'io_sock.t', 'io_unix.t', - 'ndbm.t','odbm.t','open2.t','open3.t', 'ph.t', 'posix.t', 'dprof.t'); + 'ndbm.t','odbm.t','open2.t','open3.t', 'ph.t', 'posix.t'); # Note: POSIX is not part of basic build, but can be built # separately if you're using DECC