Changeset 8318
- Timestamp:
- 21/12/11 11:17:43 (5 months ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 modified
-
Makefile (modified) (1 diff)
-
PERL_SCRIPTS/test/Makefile (modified) (1 diff)
-
PERL_SCRIPTS/test/check_arb.pl (added)
-
PERL_SCRIPTS/test/check_bioperl.pl (added)
-
PERL_SCRIPTS/test/check_lint.pl (added)
-
PERL_SCRIPTS/test/testScripts.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r8297 r8318 1576 1576 "cross_lflags=$(cross_lflags)" \ 1577 1577 all && \ 1578 $(MAKE) -C PERL_SCRIPTS/test test && \ 1578 1579 echo "$(SEP) Make PERL2ARB [done]" ; \ 1579 1580 ) > PERL2ARB.log 2>&1 && (cat PERL2ARB.log;rm PERL2ARB.log)) || (cat PERL2ARB.log;rm PERL2ARB.log;false) 1580 1581 1582 testperlscripts: perl1583 @$(MAKE) -C PERL_SCRIPTS/test test1584 1581 1585 1582 perl_clean: -
trunk/PERL_SCRIPTS/test/Makefile
r6113 r8318 19 19 @echo $(SEP) Testing scripts in PERL_SCRIPTS 20 20 @perl -c testScripts.pl 21 @perl testScripts.pl || echo "You either lack S::LintSubs and/or Bio::TreeIO or the perl scripts are buggy. We continue anyway.."21 @perl testScripts.pl 22 22 @touch $@ 23 23 -
trunk/PERL_SCRIPTS/test/testScripts.pl
r5888 r8318 99 99 } 100 100 101 my %failed_test = (); # scripts in this directory (key=failed script,value=1) 102 my $failed_bioperl = 0; # script in BIOPERL directory 103 my $failed_normal = 0; # other scripts 104 105 sub announce_failure($) { 106 my ($script) = @_; 107 if ($script =~ /\/PERL_SCRIPTS\/test\//) { 108 $failed_test{$'} = 1; 109 } 110 elsif ($script =~ /\/PERL_SCRIPTS\/BIOPERL\//) { $failed_bioperl++; } 111 else { $failed_normal++; } 112 } 113 101 114 sub main() { 102 115 $arbhome = $ENV{ARBHOME}; … … 116 129 # foreach (@scripts) { print "- '$_'\n"; } 117 130 118 my $failed = 0; 119 foreach (@modules) { if (test_script($_,1)==0) { $failed++; } } 120 foreach (@scripts) { if (test_script($_,0)==0) { $failed++; } } 131 foreach (@modules) { if (test_script($_,1)==0) { announce_failure($_); } } 132 foreach (@scripts) { if (test_script($_,0)==0) { announce_failure($_); } } 121 133 122 if ($failed>0) { 123 die "$failed perl scripts failed to compile\n"; 134 $| = 1; 135 136 if (defined $failed_test{'check_lint.pl'}) { 137 print "Assuming Lint/LintSubs is not installed (cannot test whether perl modules compile)\n"; 138 } 139 else { 140 my $failed = $failed_normal+$failed_bioperl; 141 142 if (defined $failed_test{'check_arb.pl'}) { 143 die "Fatal error: Failed to load ARB perl module\n"; 144 } 145 if (defined $failed_test{'check_bioperl.pl'}) { 146 print "Assuming BIOPERL is not installed\n"; 147 if ($failed_bioperl==0) { 148 die "but all BIOPERL scripts compiled - sth is completely wrong here\n"; 149 } 150 print "accepting $failed_bioperl failing scripts that use BIOPERL\n"; 151 $failed -= $failed_bioperl; 152 } 153 else { 154 print "Assuming BIOPERL is installed\n"; 155 } 156 157 if ($failed>0) { 158 die "$failed scripts failed to compile\n"; 159 } 124 160 } 125 161 }
