1 package MakeMaker::Test::Setup::BFD;
5 @EXPORT = qw(setup_recurs teardown_recurs);
13 'Big-Dummy/lib/Big/Dummy.pm' => <<'END',
20 Big::Dummy - Try "our" hot dog's
27 'Big-Dummy/Makefile.PL' => <<'END',
28 use ExtUtils::MakeMaker;
30 # This will interfere with the PREREQ_PRINT tests.
31 printf "Current package is: %s\n", __PACKAGE__ unless "@ARGV" =~ /PREREQ/;
35 VERSION_FROM => 'lib/Big/Dummy.pm',
36 PREREQ_PM => { strict => 0 },
37 ABSTRACT_FROM => 'lib/Big/Dummy.pm',
38 AUTHOR => 'Michael G Schwern <schwern@pobox.com>',
42 'Big-Dummy/t/compile.t' => <<'END',
45 print eval "use Big::Dummy; 1;" ? "ok 1\n" : "not ok 1\n";
46 print "ok 2 - TEST_VERBOSE\n";
49 'Big-Dummy/Liar/t/sanity.t' => <<'END',
52 print eval "use Big::Dummy; 1;" ? "ok 1\n" : "not ok 1\n";
53 print eval "use Big::Liar; 1;" ? "ok 2\n" : "not ok 2\n";
54 print "ok 3 - TEST_VERBOSE\n";
57 'Big-Dummy/Liar/lib/Big/Liar.pm' => <<'END',
65 'Big-Dummy/Liar/Makefile.PL' => <<'END',
66 use ExtUtils::MakeMaker;
68 my $mm = WriteMakefile(
70 VERSION_FROM => 'lib/Big/Liar.pm',
71 _KEEP_AFTER_FLUSH => 1
74 print "Big::Liar's vars\n";
75 foreach my $key (qw(INST_LIB INST_ARCHLIB)) {
76 print "$key = $mm->{$key}\n";
83 sub _setup_bfd_test_root {
85 # On older systems we might exceed the 8-level directory depth limit
86 # imposed by RMS. We get around this with a rooted logical, but we
87 # can't create logical names with attributes in Perl, so we do it
88 # in a DCL subprocess and put it in the job table so the parent sees it.
89 open( BFDTMP, '>bfdtesttmp.com' ) ||
90 die "Error creating command file; $!";
91 print BFDTMP <<'COMMAND';
92 $ BFD_TEST_ROOT = F$PARSE("SYS$DISK:[-]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]"
93 $ DEFINE/JOB/NOLOG/TRANSLATION=CONCEALED BFD_TEST_ROOT 'BFD_TEST_ROOT'
97 system '@bfdtesttmp.com';
98 1 while unlink 'bfdtesttmp.com';
103 _setup_bfd_test_root();
105 while(my($file, $text) = each %Files) {
106 # Convert to a relative, native file path.
107 $file = File::Spec->catfile(File::Spec->curdir, split m{\/}, $file);
109 my $dir = dirname($file);
111 open(FILE, ">$file") || die "Can't create $file: $!";
119 sub teardown_recurs {
120 foreach my $file (keys %Files) {
121 my $dir = dirname($file);
123 rmtree($dir) || return;