summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2009-04-28 14:42:33 +0000
committerGreg Sabino Mullane2009-04-28 14:42:33 +0000
commit7151ef25a91339f61b0d3e1dfec7d9a0d5589e03 (patch)
tree43d72c7024bfea0bad8446a012e6229d1e20db69
parent88883e3fe18efb41c6d4e394eab51ba1b86086d7 (diff)
Minor testing tweaks.
-rw-r--r--t/02_timesync.t7
-rw-r--r--t/CP_Testing.pm10
2 files changed, 14 insertions, 3 deletions
diff --git a/t/02_timesync.t b/t/02_timesync.t
index 7e7515e00..9cd9887bd 100644
--- a/t/02_timesync.t
+++ b/t/02_timesync.t
@@ -1,5 +1,10 @@
+#!perl
+
+## Test the "version" action
+
+use strict;
+use warnings;
use Data::Dumper;
-use DBI;
use Test::More tests => 20;
use lib 't','.';
use CP_Testing;
diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm
index c76df0f08..f0280871e 100644
--- a/t/CP_Testing.pm
+++ b/t/CP_Testing.pm
@@ -67,7 +67,10 @@ sub test_database_handle {
mkdir $dbdir;
- my $initdb = $ENV{PGINITDB} || 'initdb';
+ my $initdb
+ = $ENV{PGINITDB} ? $ENV{PGINITDB}
+ : $ENV{PGBINDIR} ? "$ENV{PGBINDIR}/initdb"
+ : 'initdb';
$com = qq{LC_ALL=en LANG=C $initdb --locale=C -E UTF8 -D $dbdir/data 2>&1};
eval {
@@ -119,7 +122,10 @@ sub test_database_handle {
unlink $logfile;
- my $pg_ctl = $ENV{PG_CTL} || 'pg_ctl';
+ my $pg_ctl
+ = $ENV{PG_CTL} ? $ENV{PG_CTL}
+ : $ENV{PGBINDIR} ? "$ENV{PGBINDIR}/pg_ctl"
+ : 'pg_ctl';
$com = qq{LC_ALL=en LANG=C $pg_ctl -o '-k socket' -l $logfile -D "$dbdir/data" start};
eval {