Commit fe22e390 authored by Matthieu Muffato's avatar Matthieu Muffato

bugfix: chdir does not return the current path

This must be an urban legend I have been spreading
parent 39df2cfa
......@@ -21,6 +21,7 @@ use warnings;
use Test::More tests => 8;
use Cwd 'getcwd';
use Capture::Tiny ':all';
use File::Temp qw{tempdir};
......@@ -30,7 +31,8 @@ BEGIN {
#########################
my $dir = tempdir CLEANUP => 1;
my $original = chdir $dir;
my $original = getcwd;
chdir $dir;
my $rs_stdout = Bio::EnsEMBL::Hive::Utils::RedirectStack->new(\*STDOUT);
my $stdout = capture_stdout {
......
......@@ -31,7 +31,8 @@ $ENV{'EHIVE_ROOT_DIR'} ||= File::Basename::dirname( File::Basename::dirname( Fil
use Bio::EnsEMBL::Hive::DBSQL::DBAdaptor;
my $dir = tempdir CLEANUP => 1;
my $orig = chdir $dir;
my $orig = Cwd::getcwd;
chdir $dir;
my $sqlite_url = "sqlite:///test_db";
# -no_sql_schema_version_check is needed because the database does not have the eHive schema
......
......@@ -32,7 +32,8 @@ use Bio::EnsEMBL::Hive::Utils::Test qw(init_pipeline runWorker);
$ENV{'EHIVE_ROOT_DIR'} ||= File::Basename::dirname( File::Basename::dirname( File::Basename::dirname( Cwd::realpath($0) ) ) );
my $dir = tempdir CLEANUP => 1;
my $original = chdir $dir;
my $original = Cwd::getcwd;
chdir $dir;
my $ehive_test_pipeline_urls = $ENV{'EHIVE_TEST_PIPELINE_URLS'} || 'sqlite:///ehive_test_pipeline_db';
# LongMultWf_conf has to be excluded because runWorker is not able to resync the pipeline in can_respecialize mode, leading to the first worker not completing the pipeline
......
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