X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=t%2Flib%2FDebbugsTest.pm;fp=t%2Flib%2FDebbugsTest.pm;h=3689f7f40ebc942a7a03a8ae4ad404955efa1b61;hb=1012ca820421c8b27e8fc9ae916b059d011c171a;hp=463b710b326cee164a2685beba5e24ac486642d4;hpb=87fbca05798a10efa96f6ea0f2297b8c7531174e;p=debbugs.git diff --git a/t/lib/DebbugsTest.pm b/t/lib/DebbugsTest.pm index 463b710..3689f7f 100644 --- a/t/lib/DebbugsTest.pm +++ b/t/lib/DebbugsTest.pm @@ -418,8 +418,9 @@ returns is destroyed (or goes out of scope) the database will be removed. sub create_postgresql_database { my $pgsql = Test::PostgreSQL->new(use_socket => 1) or return undef; + my $base_dir = File::Spec->rel2abs(dirname(__FILE__).'/../..'); my $installsql = - File::Spec->rel2abs(dirname(__FILE__).'/../..'). + $base_dir . '/bin/debbugs-installsql'; # create the debversion extension my $dbh = DBI->connect($pgsql->dsn); @@ -427,11 +428,10 @@ sub create_postgresql_database { CREATE EXTENSION IF NOT EXISTS debversion; END # create the schema for the bug tracking system - my $dep_dir = File::Temp::tempdir(CLEANUP=>1); system($installsql, '--dsn',$pgsql->dsn, '--install', - '--deployment-dir',$dep_dir); + '--deployment-dir',$base_dir.'/sql'); initialize_postgresql_database($pgsql,@_); return $pgsql;