[Bioperl-l] make test!!

Brian Osborne brian_osborne at cognia.com
Sun Oct 24 11:48:17 EDT 2004


Nathan,

>2) So _get_ini_files() doesn't get called.

You're right, that makes no sense, let's change that. _get_ini_files should
be called regardless of whether there's a HOME or not.

BIO

-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Nathan Haigh
Sent: Sunday, October 24, 2004 4:42 AM
To: 'Brian Osborne'; bioperl-l at bioperl.org
Subject: RE: [Bioperl-l] make test!!

Ok, here goes (with your test file, and without my patch)!

So what you are saying I that $ENV{HOME} should be set by the user? But
shouldn't this default to something in order for the test to
work? If this isn't set in windows the test fails as follows:

1) In Registry.pm $home doesn't get set on window because by default there
is not $ENV{"HOME"} (unless set by the user!) and
getpwuid isn't implemented in ActiveState Perl for windows.
2) So _get_ini_files() doesn't get called.
3) try to retrieve ini file from web (successful)
4) try to store the ini file in $home.bioinformatics (not successful)
        a) the path $home/.bioinformatics is not a valid windows path ($home
is not set so this becomes just /.bioinformatics)
        b) for some reason ActiveState perl doesn't see anything wrong with
it when trying to create the dir, but when it tries to
open it, perl dies with a 'permission denied' error. But no sign of the dir
on my filesystem!

I suppose it depends how you want to catch this. There are 3 options as far
as I see If the env variable HOME should be set
beforehand:
1) The test could just skip these tests if $ENV{HOME} isn't set
2) The test script set a temp dir for $ENV{HOME} if it isn't already set -
to enable the test to complete in full, then cleanup
after itself.
3) The registry.pm file should assume a default if $ENV{HOME} isn't set and
can't be got at with getpwuid. (this is what my patch
does, and works, but then it leaves the dir in c: which the user might not
want cluttering up - especially if they doen't use the
module and it was just created during the test)

I would prefer either option 2, so that all tests can still be run, or 3)
which assume a default $ENV{HOME} unless the user has
specified something specific. Or some combination of 2 and 3; so that the
test can create a tmp dir for the ini file and clean up
the dir at the end to save clutter if the user never uses this module (and
so doesn't have $ENV{HOME} set).

Hope this clears things up a bit!
Nathan

> -----Original Message-----
> From: Brian Osborne [mailto:brian_osborne at cognia.com]
> Sent: 22 October 2004 22:17
> To: bioperl-l at bioperl.org; nathanhaigh at ukonline.co.uk
> Subject: FW: [Bioperl-l] make test!!
>
> Nathan,
>
> Registry.t shouldn't fail if there's no $HOME set since it uses
> $OBDA_SEARCH_PATH, it sets OBDA_SEARCH_PATH for its own use, and it also
> supplies its own *ini file. To prove this to myself I just unset HOME on
my
> machine and Registry.t still works (and $OBDA_SEARCH_PATH was unset as
well,
> I never use it).
>
> So, I understand your point but the absence of $HOME shouldn't be the
> problem. Registry.pm is part of the OBDA system so the user is responsible
> for either seeing that $HOME is set or setting $OBDA_SEARCH_PATH, either
> will work (and in UNIX you could put the *ini file in
/etc/bioinformatics).
> Questions: did this change you made in your local Registry.pm fix
> Registry.t? What are the errors using the Registry.t I sent you last
night?
>
> So you have both modules and the Berkeley DB library? There's goes my
latest
> hypothesis!
>
> The problem here is that I'm just guessing when it comes to ActiveState,
and
> you can see that my guesses aren't always on target. What would be great
is
> if someone using ActiveState would sit down with the Perl debugger and
step
> through the code line by line so we'd know _exactly_ where the failures
are.
> Can someone help us here? If you're not familiar with the debugger this
> would be a good opportunity to learn about it, it's a fantastic tool (and

> absolutely required if you want to improve your coding skills). I'm not
just
> talking about Registry but about the other errors that Nathan is showing
us.
>
> Brian O.
>
>
> -----Original Message-----
> From: bioperl-l-bounces at portal.open-bio.org
> [mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Nathan Haigh
> Sent: Friday, October 22, 2004 3:30 AM
> To: 'Brian Osborne'; 'Bioperl'
> Subject: RE: [Bioperl-l] make test!!
>
> I have the following versions installed:
> DB_File 1.810
> BerkeleyDB 0.25
> And I'm pretty sure I have the library (I remember using a BTree quite a
> while back).
>
> Having just had a look at Bio::DB::Registry, _load_registry refers to the
> ENV variable HOME. Windows doesn't have such a variable by
> default, so the user must either set it themselves, and failing this,
> Bio::DB::Registry should assume a default e.g. C:/
>
> Therefore I've changed this sub to read:
> sub _load_registry {
>    my ($self) = @_;
>    my $home;
>
>    if (defined $ENV{"HOME"}) { $home = $ENV{"HOME"} }   # use this if it's
> set
>    elsif ($^O eq 'MSWin32') { $home = 'C:/' }           # def windows home
> if $ENV{HOME} isn't set
>    else { $home = (getpwuid($>))[7] }
>
>    my @ini_files = _get_ini_files($home);
>
>    unless (@ini_files) {
>
> etc etc
>
>
> I don't know if you still need to test for failure of getpwuid, since you
> should never get to this stage on windows - I can't think
> of a reason why the c: drive is inaccessible!
>
> Nathan
>
> > -----Original Message-----
> > From: Brian Osborne [mailto:brian_osborne at cognia.com]
> > Sent: 22 October 2004 01:22
> > To: nathanhaigh at ukonline.co.uk; 'Bioperl'
> > Subject: RE: [Bioperl-l] make test!!
> >
> > Nathan,
> >
> > OK, thank you. Some of the messages you're seeing from Registry.t are
> > warnings, not errors, but at any rate there are still errors. So am I
> > correct in assuming that you have the modules DB_File and BerkeleyDB
> > installed, as well as the Berkeley DB library?
> >
> > I can't do more with Index.t, as I said I was just guessing there. My
> first
> > instinct is still to suspect something is wrong with Fcntl, Storable, or
> > DB_File, these are used by DB/FileCache and the problem with Index.t
lies
> > with DB/InMemoryCache or DB/FileCache, most likely the latter. Someone
> using
> > ActiveState Perl is going to have to address this one.
> >
> > Brian O.
> >
> > -----Original Message-----
> > From: Nathan Haigh [mailto:nathanhaigh at ukonline.co.uk]
> > Sent: Thursday, October 21, 2004 7:59 AM
> > To: 'Brian Osborne'; 'Bioperl'
> > Subject: RE: [Bioperl-l] make test!!
> >
> > Ok, I've done some more testing (with the latest CVS 9am GMT) and here
is
> > what I've found! I've run "namke test" with and without
> > BIOPERLDEBUG, and running individual tests using " perl -I. -w
> > t/test_name.t".
> >
> > Attached are 3 files with details of errors:
> > Errors.txt              - summary and details of failed tests, and other
> > tests with peculiar warnings etc
> > Errors_debug.txt        - same as errors.txt but with BIOPERLDEBUG set
> > Perl_test.txt           - individual tests run with BIOPERLDEBUG set,
> using
> > "perl -I. -w t/test_name.t"
> >
> > My System:
> > WinXP Pro
> > ActiveState Perl 5.8.0
> > Nmake 6.00.8168.0
> >
> > My Summary:
> > ESEfinder.t     - causes perl to crash on test 2 during "nmake test",
but
> ok
> > in other tests!
> > Biblio_biofetch.t       - throws warning and exception when using
> > BIOPERLDEBUG, but doesn't appear in summary!
> > Index.t         - fails get_Seq_by_id ('AI129902') on lines 118 and 124
> > ProtPsm.t       - needs "plan tests" in test file changing to 5. When
> > running the individual test can't locate
> > Bio::Matrix::PSM::ProtMatrix
> > Registry.t      - several error including "No seqdatabase.ini file
found",
> "
> > No database with name testflat in Registry"
> > Primaryqual.t   - Test returned status 255. and 'Can't locate object
> method
> > "header"' in individual test
> > seqread_fail.t  - gives an exception, is this supposed to happen?
> >
> > Hope this help to iron out bugs when running BioPerl on Windows!
> > Nathan
> >
> >
> > > -----Original Message-----
> > > From: Brian Osborne [mailto:brian_osborne at cognia.com]
> > > Sent: 20 October 2004 19:04
> > > To: nathanhaigh at ukonline.co.uk; 'Bioperl'
> > > Subject: RE: [Bioperl-l] make test!!
> > >
> > > Nathan,
> > >
> > > I noticed most of the Registry tests failing. I know what part of the
> > > problem is (getpwuid() not implemented in Windows/Activestate Perl)
and
> I
> > > think I've fixed at least that part. Can you install the most recent
> > > Bio/DB/Registry.pm from bioperl-live and run t/Registry.t again?
> > >
> > > >perl -w -I. t/Registry.t
> > >
> > >
> > > Brian O.
> > >
> > > -----Original Message-----
> > > From: bioperl-l-bounces at portal.open-bio.org
> > > [mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Nathan
Haigh
> > > Sent: Wednesday, October 20, 2004 10:20 AM
> > > To: 'Bioperl'
> > > Subject: RE: [Bioperl-l] make test!!
> > >
> > > Apologise for all the pervious messages! I just wanted to get this
onto
> > the
> > > mailing list:
> > >
> > > I have managed to do a "nmake test" (WinXP) on bioperl-live.
> > >
> > > System: WinXP Pro
> > > ActiveState Perl 5.8.0 build 804
> > > Nmake v6.00.8168.0
> > >
> > > A note beforehand:
> > > The error message I had previously got, and heard others have also
> > received
> > > on other OS's. That contain a "line too long" error when
> > > trying "make test", is due to the limitations of the particular OS.
> > Versions
> > > of ExtUtils::MakeMaker >= 6.06 (current version: 6.21)
> > > have got round this problem by splitting long command lines from
> Makefiles
> > > into a series of smaller commands.
> > >
> > > Test Summary:
> > > Failed Test      Stat Wstat Total Fail  Failed  List of Failed
> >
>
> --------------------------------------------------------------------------
> > --
> > > ---
> > > t\Index.t          22  5632    41   21  51.22%  21-41
> > > t\Registry.t       22  5632    11    9  81.82%  3-11
> > > t\seqread_fail.t  255 65280    13    0   0.00%  ??
> > > 115 subtests skipped.
> > > Failed 3/192 test scripts, 98.44% okay. 30/8816 subtests failed,
99.66%
> > > okay.
> > > NMAKE : fatal error U1077:
'I:\Programming\Perl\Perl5.8.0\bin\perl.exe'
> :
> > > return code '0xff'
> > > Stop.
> > >
> > > Particulars:
> > > t\Index......................NOK 21Can't call method "length" on an
> > > undefined value at t\Index.t line 124, <GEN6> line
> > >  54.
> > > t\Index......................dubious
> > >         Test returned status 22 (wstat 5632, 0x1600)
> > > DIED. FAILED tests 21-41
> > >         Failed 21/41 tests, 48.78% okay
> > > t\Registry...................ok 2/11The getpwuid function is
> unimplemented
> > > at K:\Downloads\FlashGet\Software\Bioinform
> > > atics\BioPerl\1\bioperl-live\blib\lib/Bio/DB/Registry.pm line 116.
> > > t\Registry...................dubious
> > >         Test returned status 22 (wstat 5632, 0x1600)
> > > t\seqread_fail...............ok 1/13
> > > ------------- EXCEPTION: Bio::Root::Exception -------------
> > > MSG: BioFetch Error 4: ID [XXX111] not found in database
> > > [embl][http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-e+[embl-id:
> > > XXX111]|[embl-acc:XXX111]+-ascii+-vn+2+-noSession].
> > > STACK: Error::throw
> > > STACK: Bio::Root::Root::throw
> > >
> >
>
K:\Downloads\FlashGet\Software\Bioinformatics\BioPerl\1\bioperl-live\blib\li
> > > b/Bio/Root/R
> > > oot.pm:328
> > > STACK: Bio::DB::BioFetch::postprocess_data
> > >
> >
>
K:\Downloads\FlashGet\Software\Bioinformatics\BioPerl\1\bioperl-live\blib\l
> > > ib/Bio/DB/BioFetch.pm:406
> > > STACK: Bio::DB::WebDBSeqI::get_seq_stream
> > >
> >
>
K:\Downloads\FlashGet\Software\Bioinformatics\BioPerl\1\bioperl-live\blib\li
> > > b/Bio/DB/WebDBSeqI.pm:525
> > > STACK: Bio::DB::WebDBSeqI::get_Stream_by_id
> > >
> K:\Downloads\FlashGet\Software\Bioinformatics\BioPerl\1\bioperl-live\blib\
> > > lib/Bio/DB/WebDBSeqI.pm:287
> > > STACK: Bio::DB::WebDBSeqI::get_Seq_by_id
> > >
> >
>
K:\Downloads\FlashGet\Software\Bioinformatics\BioPerl\1\bioperl-live\blib\li
> > > b
> > > /Bio/DB/WebDBSeqI.pm:153
> > > STACK: main::fetch t\seqread_fail.t:69
> > > STACK: t\seqread_fail.t:81
> > > -----------------------------------------------------------
> > > t\seqread_fail...............dubious
> > >         Test returned status 255 (wstat 65280, 0xff00)
> > >         after all the subtests completed successfully
> > >
> > >
> > > Nathan
> > >
> > > > -----Original Message-----
> > > > From: bioperl-l-bounces at portal.open-bio.org
> > > [mailto:bioperl-l-bounces at portal.open-bio.org] On Behalf Of Aaron J.
> > Mackey
> > > > Sent: 14 October 2004 21:27
> > > > To: Bioperl
> > > > Subject: [Bioperl-l] make test!!
> > > > Importance: High
> > > >
> > > >
> > > > I've had only a very few people send me feedback about the current
> > > > state of bioperl-live "make test" on your favorite
> > > > old/crotchety/obscure platforms.  I'm writing the Change log and
> > > > thinking about branching, but I'm an experimentalist, I need data!
> > > >
> > > > Get a bioperl-live HEAD checkout, do a "cvs update -PAd" to make
sure
> > > > you have everything, "make distclean" if you've built from the cvs
> > > > checkout before, and start from scratch with the usual litany: perl
> > > > Makefile.PL; make; [setenv BIOPERLDEBUG 1;] make test; email Aaron.
> > > >
> > > > Setting BIOPERLDEBUG is very noisy, but it's the end result I care
> > > > about, not so much all the verbiage (unless there's specific
verbiage
> > > > related to the end result ...)
> > > >
> > > > Thanks,
> > > >
> > > > -Aaron
> > > >
> > > > _______________________________________________
> > > > Bioperl-l mailing list
> > > > Bioperl-l at portal.open-bio.org
> > > > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> > > > ---
> > > > avast! Antivirus: Inbound message clean.
> > > > Virus Database (VPS): 0442-2, 14/10/2004
> > > > Tested on: 14/10/2004 21:59:20
> > > > avast! is copyright (c) 2000-2003 ALWIL Software.
> > > > http://www.avast.com
> > > >
> > > >
> > >
> > > ---
> > > avast! Antivirus: Outbound message clean.
> > > Virus Database (VPS): 0442-3, 15/10/2004
> > > Tested on: 20/10/2004 15:20:04
> > > avast! is copyright (c) 2000-2003 ALWIL Software.
> > > http://www.avast.com
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l at portal.open-bio.org
> > > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> > >
> > >
> > > ---
> > > avast! Antivirus: Inbound message clean.
> > > Virus Database (VPS): 0442-3, 15/10/2004
> > > Tested on: 21/10/2004 07:12:10
> > > avast! is copyright (c) 2000-2003 ALWIL Software.
> > > http://www.avast.com
> > >
> > >
> >
> > ---
> > avast! Antivirus: Outbound message clean.
> > Virus Database (VPS): 0443-1, 20/10/2004
> > Tested on: 21/10/2004 12:58:59
> > avast! is copyright (c) 2000-2003 ALWIL Software.
> > http://www.avast.com
> >
> >
> >
> >
> >
> >
> > ---
> > avast! Antivirus: Inbound message clean.
> > Virus Database (VPS): 0443-2, 21/10/2004
> > Tested on: 22/10/2004 06:20:06
> > avast! is copyright (c) 2000-2003 ALWIL Software.
> > http://www.avast.com
> >
> >
>
> ---
> avast! Antivirus: Outbound message clean.
> Virus Database (VPS): 0443-2, 21/10/2004
> Tested on: 22/10/2004 08:29:49
> avast! is copyright (c) 2000-2003 ALWIL Software.
> http://www.avast.com
>
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
> ---
> avast! Antivirus: Inbound message clean.
> Virus Database (VPS): 0443-3, 22/10/2004
> Tested on: 23/10/2004 21:18:10
> avast! is copyright (c) 2000-2003 ALWIL Software.
> http://www.avast.com
>
>

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0443-3, 22/10/2004
Tested on: 24/10/2004 09:36:56
avast! is copyright (c) 2000-2003 ALWIL Software.
http://www.avast.com





_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list