[Bioperl-l] Mac issues

Todd Richmond todd@andrew2.stanford.edu
Thu, 22 Feb 2001 16:29:42 -0800


On 2/22/01 11:19 AM, "Hilmar Lapp" <hilmarl@yahoo.com> wrote:
> It should mention that I don't want to leave Todd's bug
> submissions ignored.
> I see that I need to look at these more carefully and come up with
> particular assignments there, too, otherwise they'll be left
> undone.

Hopefully in a month or so, most of those incompatibilities (not necessarily
bugs) will be a non-issue - either because MacPerl 5.6 will be ready for
distribution, or because we'll be able to use MacOS X and the standard perl
distribution. I'm willing to write up some documentation for installing and
running Bioperl on Mac.

I spent part of yesterday working on a small script to run the test scripts
on a Mac but ran into a small problem. I sent an email to the list, but
evidently our SMTP server has been acting up and not sending out any
messages.

Since we don't have the option of using the standard "make", "make
test", "make install" sequence, I wrote a small script to run them in a
batch fashion after the installation. The following code works but dies
after the first test:

use File::Basename;
my ($app, $path) = fileparse($0);
opendir(DIR, $path) || die "Can't open test script directory";

@tests = grep(/.*\.t$/, readdir(DIR));

foreach $test (@tests) {
   $testfile = $path.$test;
   select STDOUT;
   print "Running ", $test,"\n";
   do $testfile or die; # propagate any errors.
}

The output:

Running AAChange.t
1..24
ok 1
...
ok 24

Running AAReverseMutate.t
# Test::plan(): should not be called more than once
File 'Cellwall:Documents:Downloads:bioperl-live:t:AAReverseMutate.t';
Line 16
# BEGIN failed--compilation aborted.
File 'Cellwall:Documents:Downloads:bioperl-live:t:AAReverseMutate.t';
Line 17
   ...propagated.
File 'Cellwall:Documents:Downloads:bioperl-live:t:mactests.pl'; Line 17

So it appears that Test::plan can only be called once from the invoking
script. Does any one know if there is a way to "reset" Test::plan() (or the
invoking script) so that it thinks it's being called for the first time for
each test script? Or is there another way to run each of the 60+ test
scripts? I could use Applescript to script MacPerl and run each one
separately, but for now I'd like to stick with a pure Perl solution.

Thanks, Todd


-- 
Dr Todd Richmond                 http://cellwall.stanford.edu/todd
Carnegie Institution             email: todd@andrew2.stanford.edu
Department of Plant Biology      fax: 1-650-325-6857
260 Panama Street                phone: 1-650-325-1521 x431
Stanford, CA 94305