Commit a4746ef4 authored by Leo Gordon's avatar Leo Gordon
Browse files

Asking Travis to run a Mysql test as well

parent 0d012fcc
......@@ -5,7 +5,7 @@ perl:
- "5.14"
env:
- COVERALLS=true DB=sqlite
- COVERALLS=true
before_install:
- sudo apt-get -y update
......
......@@ -16,6 +16,9 @@
export PERL5LIB=$PWD/bioperl-live-bioperl-release-1-2-3:$PWD/modules
# for the t/10.pipeconfig/longmult.t test
export EHIVE_MYSQL_PIPELINE_URL=mysql://travis@127.0.0.1/ehive_test_pipeline_db
echo "Running test suite"
if [ "$COVERALLS" = 'true' ]; then
PERL5OPT='-MDevel::Cover=+ignore,bioperl,+ignore,ensembl-test' perl $PWD/scripts/all_tests.pl -verbose t $SKIP_TESTS
......
......@@ -29,15 +29,21 @@ use Bio::EnsEMBL::Hive::Utils::Test qw(init_pipeline runWorker);
my $dir = tempdir CLEANUP => 1;
chdir $dir;
my @pipeline_urls = (
'sqlite:///ehive_test_pipeline_db',
$ENV{'EHIVE_MYSQL_PIPELINE_URL'} ? ( $ENV{'EHIVE_MYSQL_PIPELINE_URL'} ) : (),
);
foreach my $long_mult_version (qw(LongMult_conf LongMultSt_conf LongMultWf_conf)) {
my $pipeline_url = "sqlite:///${long_mult_version}";
my $hive_dba = init_pipeline('Bio::EnsEMBL::Hive::PipeConfig::'.$long_mult_version, [-pipeline_url => $pipeline_url, -hive_force_init => 1]);
runWorker($hive_dba, { can_respecialize => 1 });
my $results = $hive_dba->dbc->db_handle->selectall_arrayref('SELECT * FROM final_result');
ok(scalar(@$results), 'There are some results');
ok($_->[0]*$_->[1] eq $_->[2], sprintf("%s*%s=%s", $_->[0], $_->[1], $_->[0]*$_->[1])) for @$results;
system( @{ dbc_to_cmd($hive_dba->dbc, undef, undef, undef, 'DROP DATABASE') } );
foreach my $pipeline_url (@pipeline_urls) {
my $hive_dba = init_pipeline('Bio::EnsEMBL::Hive::PipeConfig::'.$long_mult_version, [-pipeline_url => $pipeline_url, -hive_force_init => 1]);
runWorker($hive_dba, { can_respecialize => 1 });
my $results = $hive_dba->dbc->db_handle->selectall_arrayref('SELECT * FROM final_result');
ok(scalar(@$results), 'There are some results');
ok($_->[0]*$_->[1] eq $_->[2], sprintf("%s*%s=%s", $_->[0], $_->[1], $_->[0]*$_->[1])) for @$results;
system( @{ dbc_to_cmd($hive_dba->dbc, undef, undef, undef, 'DROP DATABASE') } );
}
}
done_testing();
Markdown is supported
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