Skip to content
Snippets Groups Projects
Commit 0ad8c875 authored by Kieron Taylor's avatar Kieron Taylor :angry:
Browse files

Merge branch 'feature/perlversioninvariance': Make core API compatible with Perl 5.26

parents fbb97b3c 500063d6
No related branches found
No related tags found
No related merge requests found
language: perl
os:
- linux
perl:
- '5.14'
- '5.12'
- '5.10'
- '5.26'
env:
matrix:
......@@ -24,7 +27,7 @@ before_install:
- git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-test.git
- git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-variation.git
- git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-compara.git
- git clone -b bioperl-release-1-6-1 --depth 1 https://github.com/bioperl/bioperl-live.git
- git clone -b release-1-6-924 --depth 1 https://github.com/bioperl/bioperl-live.git
install:
- cpanm -v --installdeps --notest .
......@@ -43,16 +46,14 @@ jobs:
matrix:
exclude:
- perl: '5.10'
env: COVERALLS=false DB=mysql
- perl: '5.12'
env: COVERALLS=false DB=sqlite
- perl: '5.12'
env: COVERALLS=true DB=mysql
- perl: '5.14'
env: COVERALLS=false DB=sqlite
env: COVERALLS=false DB=mysql
- perl: '5.14'
env: COVERALLS=true DB=mysql
- perl: '5.26'
env: COVERALLS=false DB=sqlite
- perl: '5.26'
env: COVERALLS=false DB=mysql
notifications:
email:
......
......@@ -8,6 +8,7 @@ test_requires 'Test::Warnings';
test_requires 'Test::Differences';
test_requires 'Test::Exception';
test_requires 'Test::MockObject';
test_requires 'Test::Deep';
test_requires 'Test::More';
test_requires 'Devel::Peek';
test_requires 'Devel::Cycle';
......
......@@ -287,7 +287,7 @@ sub make_image {
foreach my $i (@$existing_images) {
if ( $i->{description} eq $tag ) {
$self->log->warn( "Image " . $i->{image_id} . " already exists for " . $tag );
return undef;
return;
}
}
my $create_image = $self->ec2->register_image(
......@@ -573,7 +573,7 @@ sub build_queue {
my ( $db_species, $db_release, $db_type );
if ( ( $db_species, $db_type, $db_release ) = $db_name =~ /^([a-z]+_[a-z]+)_([a-z]+)_(\d+)_\w+$/ ) {
next unless $db_species =~ /$species_filter/;
next unless $db_type ~~ @$wanted_dbs;
next unless grep {$_ eq $db_type} @$wanted_dbs;
push @{ $db_hash->{$db_species} }, [ $db_size, $db_path, $db_type, $db_release, $db_name ];
}
elsif ( $db_name =~ /ensembl_compara_(\d+)/ && 'compara' ~~ @$wanted_dbs ) {
......
......@@ -974,6 +974,15 @@ $multi->restore;
SKIP: {
skip 'No registry support for SQLite yet', 1 if $db->dbc->driver() eq 'SQLite';
# Time to get dirty: ENSCORESW-2595
# With specific compiled Perls, run under specific circumstances, disconnect_if_idle() gives rise
# to a seg fault. This is out of the scope of Perl, and not obviously the fault disconnect_if_idle()
# For the purposes of unit tests only, we can disable that behaviour by short-circuiting disconnect_if_idle()
# Unfortunately the problem manifests through TravisCI and the Perl they deploy, so we are forced to
# implement a workaround for the sake of testing harmony.
no warnings 'redefine';
local *Bio::EnsEMBL::DBSQL::DBConnection::disconnect_if_idle = sub { return 1};
#test the get_species_and_object_type method from the Registry
my $registry = 'Bio::EnsEMBL::Registry';
......
......@@ -17,6 +17,7 @@ use strict;
use warnings;
use Test::More;
use Test::Warnings;
use Test::Deep;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::SubSlicedFeature;
......@@ -56,8 +57,13 @@ foreach (@$exon_list) {
note($_->start);
note($_->end);
}
ok(scalar(@$exon_list) == 4, "Correct Exons for subsliced Gene");
is($exon_list->[0]->stable_id,'ENSE00001048819', "Correct Exon returned for subsliced Gene");
cmp_bag([map { $_->stable_id} @$exon_list] ,['ENSE00000661210',
'ENSE00001048819',
'ENSE00000859928',
'ENSE00000859927'],'Correct Exon IDs returned');
$fake_gene = Bio::EnsEMBL::SubSlicedFeature->new(-feature => $gene, -start => 1, -end => 2);
$transcript_list = $fake_gene->get_all_Transcripts;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment