X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FMakeMaker%2FTest%2FSetup%2FBFD.pm;h=c540708529f81b163651e071fb3a1d4cfa57e862;hb=7292dc67d9d3871d00ae8272949316f40122092b;hp=2509a2cfb0a63d41f9e1534ece3eda1db870f8fe;hpb=aeef272316a199aeddb8b9a9713adffbef5806b1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/MakeMaker/Test/Setup/BFD.pm b/t/lib/MakeMaker/Test/Setup/BFD.pm index 2509a2c..c540708 100644 --- a/t/lib/MakeMaker/Test/Setup/BFD.pm +++ b/t/lib/MakeMaker/Test/Setup/BFD.pm @@ -7,7 +7,9 @@ require Exporter; use strict; use File::Path; use File::Basename; +use MakeMaker::Test::Utils; +my $Is_VMS = $^O eq 'VMS'; my %Files = ( 'Big-Dummy/lib/Big/Dummy.pm' => <<'END', @@ -33,12 +35,25 @@ printf "Current package is: %s\n", __PACKAGE__ unless "@ARGV" =~ /PREREQ/; WriteMakefile( NAME => 'Big::Dummy', VERSION_FROM => 'lib/Big/Dummy.pm', + EXE_FILES => [qw(bin/program)], PREREQ_PM => { strict => 0 }, ABSTRACT_FROM => 'lib/Big/Dummy.pm', AUTHOR => 'Michael G Schwern ', ); END + 'Big-Dummy/bin/program' => <<'END', +#!/usr/bin/perl -w + +=head1 NAME + +program - this is a program + +=cut + +1; +END + 'Big-Dummy/t/compile.t' => <<'END', print "1..2\n"; @@ -80,27 +95,9 @@ END ); -sub _setup_bfd_test_root { - if( $^O eq 'VMS' ) { - # On older systems we might exceed the 8-level directory depth limit - # imposed by RMS. We get around this with a rooted logical, but we - # can't create logical names with attributes in Perl, so we do it - # in a DCL subprocess and put it in the job table so the parent sees it. - open( BFDTMP, '>bfdtesttmp.com' ) || - die "Error creating command file; $!"; - print BFDTMP <<'COMMAND'; -$ BFD_TEST_ROOT = F$PARSE("SYS$DISK:[-]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]" -$ DEFINE/JOB/NOLOG/TRANSLATION=CONCEALED BFD_TEST_ROOT 'BFD_TEST_ROOT' -COMMAND - close BFDTMP; - - system '@bfdtesttmp.com'; - 1 while unlink 'bfdtesttmp.com'; - } -} - sub setup_recurs { - _setup_bfd_test_root(); + setup_mm_test_root(); + chdir 'MM_TEST_ROOT:[t]' if $Is_VMS; while(my($file, $text) = each %Files) { # Convert to a relative, native file path.