Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
45500513
Commit
45500513
authored
Mar 26, 2015
by
Matthieu Muffato
Browse files
Do not need the BEGIN{} block that sets EHIVE_ROOT_DIR
parent
2c788dfd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
12 deletions
+10
-12
modules/Bio/EnsEMBL/Hive/Utils/Test.pm
modules/Bio/EnsEMBL/Hive/Utils/Test.pm
+0
-5
t/01.utils/config.t
t/01.utils/config.t
+4
-1
t/01.utils/system_cmd.t
t/01.utils/system_cmd.t
+0
-2
t/05.runnabledb/fastafactory.t
t/05.runnabledb/fastafactory.t
+4
-4
t/10.pipeconfig/longmult.t
t/10.pipeconfig/longmult.t
+2
-0
No files found.
modules/Bio/EnsEMBL/Hive/Utils/Test.pm
View file @
45500513
...
...
@@ -25,7 +25,6 @@ no warnings qw( redefine );
use
Exporter
;
use
Carp
qw{croak}
;
use
Cwd
qw{getcwd}
;
use
Test::
More
;
use
Test::
Exception
;
...
...
@@ -38,10 +37,6 @@ use Bio::EnsEMBL::Hive::Scripts::InitPipeline;
use
Bio::EnsEMBL::Hive::Scripts::
StandaloneJob
;
use
Bio::EnsEMBL::Hive::Scripts::
RunWorker
;
BEGIN
{
$ENV
{'
EHIVE_ROOT_DIR
'}
||=
getcwd
();
}
our
@ISA
=
qw(Exporter)
;
our
@EXPORT
=
();
...
...
t/01.utils/config.t
View file @
45500513
...
...
@@ -16,7 +16,8 @@
use
strict
;
use
warnings
;
use
Cwd
;
use
File::
Basename
;
use
Test::
More
;
use
Data::
Dumper
;
...
...
@@ -26,6 +27,8 @@ BEGIN {
}
#########################
# Need EHIVE_ROOT_DIR to access the default config file
$ENV
{'
EHIVE_ROOT_DIR
'}
||=
File::Basename::
dirname
(
File::Basename::
dirname
(
File::Basename::
dirname
(
Cwd::
realpath
(
$
0
)
)
)
);
my
@config_files
=
Bio::EnsEMBL::Hive::Utils::
Config
->
default_config_files
();
# diag "@config_files";
...
...
t/01.utils/system_cmd.t
View file @
45500513
...
...
@@ -52,6 +52,4 @@ subtest 'The command line is given as an arrayref and contains redirections / pi
is_deeply
([
join_command_args
(["
ls
",
"
|
",
"
cat
",
"
>
",
"
file space
"])],
[
1
,
"
ls | cat > 'file space'
"],
"
Array with a pipe and a redirection
");
};
chdir
$ENV
{'
EHIVE_ROOT_DIR
'};
done_testing
();
t/05.runnabledb/fastafactory.t
View file @
45500513
...
...
@@ -16,14 +16,16 @@
use
strict
;
use
warnings
;
use
Cwd
;
use
File::
Basename
;
use
Test::
More
;
use
Data::
Dumper
;
use
File::
Temp
qw{tempdir}
;
use
Bio::EnsEMBL::Hive::Utils::
Test
qw(standaloneJob)
;
my
$inputfile
=
$ENV
{
EHIVE_ROOT_DIR
}
.
'
/t
/input_fasta.fa
';
# Where the Fasta file should be
my
$inputfile
=
File::Basename::
dirname
(
File::Basename::
dirname
(
Cwd::
realpath
(
$
0
)
)
)
.
'
/input_fasta.fa
';
my
$dir
=
tempdir
CLEANUP
=>
1
;
chdir
$dir
;
...
...
@@ -120,6 +122,4 @@ foreach my $file(@all_files) {
is
((
stat
(
$file
))[
7
],
$exp_size
,
"
file '
$file
' has expected file size (
$exp_size
)
");
}
chdir
$ENV
{'
EHIVE_ROOT_DIR
'};
done_testing
();
t/10.pipeconfig/longmult.t
View file @
45500513
...
...
@@ -25,6 +25,8 @@ use File::Temp qw{tempdir};
use
Bio::EnsEMBL::Hive::
Utils
qw(dbc_to_cmd)
;
use
Bio::EnsEMBL::Hive::Utils::
Test
qw(init_pipeline runWorker)
;
# eHive needs this to initialize the pipeline (and run db_cmd.pl)
$ENV
{'
EHIVE_ROOT_DIR
'}
=
File::Basename::
dirname
(
File::Basename::
dirname
(
File::Basename::
dirname
(
Cwd::
realpath
(
$
0
)
)
)
);
my
$dir
=
tempdir
CLEANUP
=>
1
;
chdir
$dir
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment