CLEAN.pl 1.21 KB
Newer Older
Magali Ruffier's avatar
Magali Ruffier committed
1
# Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
premanand17's avatar
premanand17 committed
2
# Copyright [2016-2018] EMBL-European Bioinformatics Institute
3 4 5 6 7 8 9 10 11 12 13 14 15
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#      http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Abel Ureta-Vidal's avatar
Abel Ureta-Vidal committed
16 17
use strict;
use warnings;
Andreas Kusalananda Kähäri's avatar
Andreas Kusalananda Kähäri committed
18

Abel Ureta-Vidal's avatar
Abel Ureta-Vidal committed
19
use File::Basename;
20 21
use File::Spec;
use Test::More;
Andreas Kusalananda Kähäri's avatar
Andreas Kusalananda Kähäri committed
22

Abel Ureta-Vidal's avatar
Abel Ureta-Vidal committed
23 24
use Bio::EnsEMBL::Test::MultiTestDB;

25
diag 'Starting database and files cleaning up...';
Andreas Kusalananda Kähäri's avatar
Andreas Kusalananda Kähäri committed
26 27

my $curr_file = __FILE__;
28
my $db_conf = Bio::EnsEMBL::Test::MultiTestDB->get_db_conf(dirname(__FILE__));
Abel Ureta-Vidal's avatar
Abel Ureta-Vidal committed
29

Andreas Kusalananda Kähäri's avatar
Andreas Kusalananda Kähäri committed
30
foreach my $species ( keys %{ $db_conf->{'databases'} } ) {
31
  my $multi = Bio::EnsEMBL::Test::MultiTestDB->new($species);
Abel Ureta-Vidal's avatar
Abel Ureta-Vidal committed
32 33
}

Andy Yates's avatar
Andy Yates committed
34
note "Deleting $curr_file";
35 36
my $result = unlink $curr_file;
ok($result, 'Unlink of '.$curr_file.' worked');
Abel Ureta-Vidal's avatar
Abel Ureta-Vidal committed
37

premanand17's avatar
premanand17 committed
38
done_testing();