Skip to content
Browse files

merge HEAD changes to put EMBOSS require in BEGIN

svn path=/bioperl-run/branches/bioperl-run-branch-1-5-1/; revision=13670
  • Loading branch information...
1 parent 3ee0b64 commit c115b5701615325764fa5e3141a5e52b6bd36d6a @hyphaltip hyphaltip committed Oct 13, 2005
Showing with 17 additions and 8 deletions.
  1. +17 −8 t/EMBOSS.t
View
25 t/EMBOSS.t
@@ -7,8 +7,9 @@
# `make test'. After `make install' it should work as `perl test.t'
use strict;
+use vars qw($error $NTESTS);
BEGIN {
- use vars qw($NTESTS);
+ $error = 0;
# to handle systems with no installed Test module
# we include the t dir (where a copy of Test.pm is located)
# as a fallback
@@ -18,25 +19,31 @@ BEGIN {
}
use Test;
$NTESTS = 30;
- plan tests => $NTESTS }
+ plan tests => $NTESTS;
+ eval {
+ require XML::Twig;
+ require Bio::EMBOSS::Factory;
+ };
+ if( $@ ) {
+ $error = 1;
+ }
+ }
-use Bio::Factory::EMBOSS;
use Bio::Root::IO;
use Bio::SeqIO;
use Bio::AlignIO;
my $compseqoutfile = 'dna1.4.compseq';
my $wateroutfile = 'cysprot.water';
my $consoutfile = 'cysprot.cons';
END {
-
foreach ( $Test::ntest..$NTESTS ) {
skip("EMBOSS not installed locally or XML::Twig not installed",1);
}
unlink($compseqoutfile);
unlink($wateroutfile);
unlink($consoutfile);
}
-
+exit(0) if $error;
my $verbose = $ENV{'BIOPERLDEBUG'} || -1;
ok(1);
@@ -47,13 +54,15 @@ ok(1);
## total number of tests that will be run.
my $factory = new Bio::Factory::EMBOSS(-verbose => $verbose);
-my $version = $factory->version;
ok($factory);
-
my $compseqapp = $factory->program('compseq');
+exit if( $compseqapp->executable ) ;
+
+my $version = $factory->version;
+
if( ! $compseqapp ) {
# no EMBOSS installed
- exit();
+ exit(0);
}
ok($compseqapp);

0 comments on commit c115b57

Please sign in to comment.
Something went wrong with that request. Please try again.