Author: turnstep
Date: Tue Jun 10 10:37:38 2008
New Revision: 11399
Modified:
DBD-Pg/trunk/Changes
DBD-Pg/trunk/META.yml
DBD-Pg/trunk/t/01connect.t
DBD-Pg/trunk/t/dbdpg_test_setup.pl
Log:
Use a local socket dir instead of the system default, to help permission
problems.
Thanks to Frank Wiegand for helping to uncover this.
Modified: DBD-Pg/trunk/Changes
==============================================================================
--- DBD-Pg/trunk/Changes (original)
+++ DBD-Pg/trunk/Changes Tue Jun 10 10:37:38 2008
@@ -1,5 +1,11 @@
('GSM' is Greg Sabino Mullane, [EMAIL PROTECTED])
+2.8.1
+
+ - Force testing to use a custom socket dir, to avoid
+ permission problems. Thanks to Frank Wiegand for
+ help in uncovering this. [GSM]
+
2.8.0 Released June 1, 2008 (subversion r11366)
- Added in payload strings for LISTEN/NOTIFY in 8.4
Modified: DBD-Pg/trunk/META.yml
==============================================================================
--- DBD-Pg/trunk/META.yml (original)
+++ DBD-Pg/trunk/META.yml Tue Jun 10 10:37:38 2008
@@ -14,6 +14,7 @@
perl : 5.006001
version : 0
recommends:
+ Cwd : 0
Encode : 0
File::Temp : 0
File::Comments::Plugin::C : 0
Modified: DBD-Pg/trunk/t/01connect.t
==============================================================================
--- DBD-Pg/trunk/t/01connect.t (original)
+++ DBD-Pg/trunk/t/01connect.t Tue Jun 10 10:37:38 2008
@@ -98,6 +98,10 @@
my $pv = sprintf('%vd', $^V);
my $schema = 'dbd_pg_testschema';
my $dsn = exists $ENV{DBI_DSN} ? $ENV{DBI_DSN} : '?';
+
+ ## Don't show current dir to the world via CPAN::Reporter results
+ $dsn =~ s{host=/.*(dbdpg_test_database/data/socket)}{host=<pwd>/$1};
+
my $ver = defined $DBD::Pg::VERSION ? $DBD::Pg::VERSION : '?';
my $user = exists $ENV{DBI_USER} ? $ENV{DBI_USER} : '<not set>';
my $offset = 27;
Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl (original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl Tue Jun 10 10:37:38 2008
@@ -5,6 +5,7 @@
use warnings;
use Data::Dumper;
use DBI;
+use Cwd;
select(($|=1,select(STDERR),$|=1)[1]);
my @schemas =
@@ -346,7 +347,14 @@
}
else {
$info = '';
- my $COM = qq{$pg_ctl -l
$test_database_dir/data/dbdpg_test.logfile -D $test_database_dir/data start};
+ my $option = '';
+ if ($^O !~ /Win32/) {
+ if (! -e "$test_database_dir/data/socket") {
+ mkdir "$test_database_dir/data/socket";
+ }
+ $option = "-o '-k socket'";
+ }
+ my $COM = qq{$pg_ctl $option -l
$test_database_dir/dbdpg_test.logfile -D $test_database_dir/data start};
if ($su) {
$COM = qq{su -m $su -c "$COM"};
}
@@ -365,6 +373,11 @@
if ($^O =~ /Win32/) {
$testdsn .= ';host=localhost';
}
+ else {
+ my $dir = getcwd;
+ my $socketdir = "$dir/$test_database_dir/data/socket";
+ $testdsn .= ";host=$socketdir";
+ }
my $loop = 1;
STARTUP: {
eval {