sanger-pathogens / Bio-Tradis

A set of tools to analyse the output from TraDIS analyses
https://sanger-pathogens.github.io/Bio-Tradis/
Other
22 stars 29 forks source link

test failures with samtools v1.10 #116

Open mr-c opened 4 years ago

mr-c commented 4 years ago

Hello,

Due to a version parsing bug, in Debian we can no longer build the bio-tradis package as we have upgraded to samtools v1.10. When bypassing the version check in lib/Bio/Tradis/Samtools.pm, the tests no longer pass:

# Looks like you failed 3 tests of 15.
t/Bio/Tradis/AddTagsToSeq.t ................ 
ok 1 - use Bio::Tradis::AddTagsToSeq;
ok 2 - creating object
ok 3 - correctly select the bam output switch
ok 4 - testing output
ok 5 - checking file existence
not ok 6 - checking file contents
ok 7 - creating object
ok 8 - checking file existence
not ok 9 - checking file contents
ok 10 - number of reads as expected
ok 11 - creating object with cram file
ok 12 - correctly select the cram output switch
ok 13 - testing output
ok 14 - checking file existence
not ok 15 - checking file contents
1..15
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/15 subtests 

and

Attribute (_stats_handle) does not pass the type constraint because: Validation failed for 'FileHandle' with value GLOB(0x561d84357a68) at reader Bio::Tradis::CommandLine::TradisAnalysis::_stats_handle (defined at lib/Bio/Tradis/CommandLine/TradisAnalysis.pm line 43) line 15
    Bio::Tradis::CommandLine::TradisAnalysis::_stats_handle('Bio::Tradis::CommandLine::TradisAnalysis=HASH(0x561d84357300)') called at lib/Bio/Tradis/CommandLine/TradisAnalysis.pm line 146
    Bio::Tradis::CommandLine::TradisAnalysis::run('Bio::Tradis::CommandLine::TradisAnalysis=HASH(0x561d84357300)') called at t/Bio/Tradis/CommandLine/TradisAnalysis.t line 33
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 2.
t/Bio/Tradis/CommandLine/TradisAnalysis.t .. 
ok 1 - use Bio::Tradis::CommandLine::TradisAnalysis;
ok 2 - creating object
Dubious, test returned 255 (wstat 65280, 0xff00)
All 2 subtests passed 

Can we ignore these failures, or do they require a proper fix from you all?

Thanks, as always.

sbastkowski commented 4 years ago

Hi, thanks a lot for pointing this out. Our test seem to be comparing file content and this has slightly changed with the new samtools version. We will adapt the test to be more flexible. Thanks.