diff options
author | Adrian M. Enache <enache@rdslink.ro> | 2003-07-19 02:15:37 +0300 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-07-27 15:13:10 +0000 |
commit | 1df3498620ecc1df99a2455e631a135f1710416f (patch) | |
tree | 5eefdb3c46f3a4cd93f5d6352185ac0c5b63a5ac /t/TEST | |
parent | 8f33b42a5befbbd0d1d798a463bfe4ac2ba9bf10 (diff) | |
download | perl-1df3498620ecc1df99a2455e631a135f1710416f.tar.gz |
Re: [perl #22984] perl-5.8.1-RC2: TEST -bytecompile won't work at all
Message-ID: <20030718201537.GA1574@ratsnest.hole>
p4raw-id: //depot/perl@20220
Diffstat (limited to 't/TEST')
-rwxr-xr-x | t/TEST | 35 |
1 files changed, 31 insertions, 4 deletions
@@ -21,7 +21,7 @@ if ($#ARGV >= 0) { $verbose = 1 if $1 eq 'v'; $torture = 1 if $1 eq 'torture'; $with_utf= 1 if $1 eq 'utf8'; - $byte_compile = 1 if $1 eq 'bytecompile'; + $bytecompile = 1 if $1 eq 'bytecompile'; $compile = 1 if $1 eq 'compile'; if ($1 =~ /^deparse(,.+)?$/) { $deparse = 1; @@ -125,9 +125,11 @@ unless (@ARGV) { if ($deparse) { _testprogs('deparse', '', @ARGV); } -elsif( $compile || $byte_compile ) { - _testprogs('compile', '', @ARGV) if $compile; - _testprogs('compile', '-B', @ARGV) if $byte_compile; +elsif( $compile ) { + _testprogs('compile', '', @ARGV); +} +elsif( $bytecompile ) { + _testprogs('bytecompile', '', @ARGV); } else { _testprogs('compile', '', @ARGV) if -e "../testcompile"; @@ -151,6 +153,12 @@ TESTING DEPARSER ------------------------------------------------------------------------------ EOT + print <<'EOT' if ($type eq 'bytecompile'); +------------------------------------------------------------------------------ +TESTING BYTECODE COMPILER +------------------------------------------------------------------------------ +EOT + $ENV{PERLCC_TIMEOUT} = 120 if ($type eq 'compile' && !$ENV{PERLCC_TIMEOUT}); @@ -235,6 +243,25 @@ EOT open(RESULTS, $deparse) or print "can't deparse '$deparse': $!.\n"; } + elsif ($type eq 'bytecompile') { + my $perl = $ENV{PERL} || './perl'; + my $redir = ($^O eq 'VMS' ? '2>&1' : ''); + my $bswitch = "-MO=Bytecode,-H,-s,-TD`pwd`,"; + $bswitch .= "-TF," + if $test =~ m(chdir|pod/|CGI/t/carp|lib/DB); + $bswitch .= "-k," + if $test =~ m(deparse|terse|ext/Storable/t/code); + $bswitch .= "-k," + if $] < 5.009 && $test =~ m(avhv|hashwarn); + $bswitch .= "-b," + if $test =~ m(op/getpid); + my $bytecompile = + "$perl $testswitch $switch -I../lib $bswitch". + "-o$test.plc $test 2>/dev/null &&". + "$perl $testswitch $switch $utf $test.plc $redir|"; + open(RESULTS,$bytecompile) + or print "can't byte-compile '$bytecompile': $!.\n"; + } elsif ($type eq 'perl') { my $perl = $ENV{PERL} || './perl'; my $redir = ($^O eq 'VMS' ? '2>&1' : ''); |