[svn:DBD-Pg] r11556 - in DBD-Pg/trunk: . t t/lib/App/Info/RDBMS

[email protected]
Newsgroups perl.dbd.pg.changes
Message-ID <[email protected]>
Author: turnstep
Date: Mon Jul 21 08:15:03 2008
New Revision: 11556

Modified:
   DBD-Pg/trunk/SIGNATURE
   DBD-Pg/trunk/t/dbdpg_test_setup.pl
   DBD-Pg/trunk/t/lib/App/Info/RDBMS/PostgreSQL.pm

Log:
Add support for DBDPG_TESTINITDB for developer testing ease.


Modified: DBD-Pg/trunk/SIGNATURE
==============================================================================
--- DBD-Pg/trunk/SIGNATURE	(original)
+++ DBD-Pg/trunk/SIGNATURE	Mon Jul 21 08:15:03 2008
@@ -14,23 +14,23 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: RIPEMD160
 
-SHA1 3df5dd8bb3a3881f50cb1c2025be8c77580cda1c .perlcriticrc
-SHA1 90f29be07c6cddf050a71929d36e1bcb7ec7de4d Changes
+SHA1 07aa81fccf169c5370c6d7202d7e5be435be8e85 .perlcriticrc
+SHA1 a6298a1bd6b8bbfa291cf38e54ec6b6eeb7ae3f2 Changes
 SHA1 4d91c71e5dbb19ece1505ab75c36d00a744bb076 MANIFEST
 SHA1 22055b195f5cf15d7909e8a08468e617f46154e7 MANIFEST.SKIP
-SHA1 71c0dc48f286f59906e459c30795d9f969acbedc META.yml
-SHA1 3c4812956beee4886d1e39b21be13f8de1ec1a9f Makefile.PL
+SHA1 11b9a74fc71a8b6e3378f824b814ee51b3ac6ad8 META.yml
+SHA1 91018d1ee00bf33a680149fd6c6972306498c7ae Makefile.PL
 SHA1 c51356c52c139265e20a2ad33bc8d3ee04f6ff48 Pg.h
-SHA1 d9a6ac4dbecb254cf6f6e04e7b0e27c30a98d576 Pg.pm
+SHA1 1324cd0718fc7636897147abb8e6735b6c2ee369 Pg.pm
 SHA1 06d991c871e5f2b3b900990fc71e6207c94ad8cf Pg.xs
-SHA1 d45b30e0ba420d3173c67a2698625c01bd1caf93 README
+SHA1 978905524cfb47e880746ad24432ae8fafbe7e2d README
 SHA1 283327a19b823faa386bcc85d5104baca40aaa35 README.dev
 SHA1 968d5fad61bce160b31a9cb1a21dd240b9df930f README.win32
 SHA1 0d189a3149a324fa78227f280d50eadc1377671f TODO
-SHA1 4e2d86feb6a44f27e0ee61281c48167e29ad24a5 dbdimp.c
+SHA1 f4ce5a089a57f2a117dafd1b830ae6c70d350e1c dbdimp.c
 SHA1 9a5244ebe27af6f18c5dc8713fe8aecaa334134e dbdimp.h
 SHA1 6c33bcf138e577722283bef02fceb8cbce4d100d dbivport.h
-SHA1 2211bf77a00d0d92f1fa3c762957c8abfce79f84 lib/Bundle/DBD/Pg.pm
+SHA1 4af0fd01eff2e49bcea84c1af6ff7d290a687ffd lib/Bundle/DBD/Pg.pm
 SHA1 76a2c65c065a93775ceadf933a5d38bb25c8afa4 quote.c
 SHA1 0a1fdd0406c5c367a9aba366d1d35cfa8d5272ae quote.h
 SHA1 93aa7e8cae0a361d1e6163dea0281ebff41f3c5f t/00-signature.t
@@ -49,10 +49,10 @@
 SHA1 85b5df8ef0c78b1d2d0018d874c62af7ef01a28f t/20savepoints.t
 SHA1 9041f782c66a9248e777e7f9dc1c545cea0996e9 t/99_perlcritic.t
 SHA1 9f94e06ec6b6a27512f1f4c638635e4095ae6be7 t/99_pod.t
-SHA1 75bff4c125dc7f69c9da165a8f3b86b50bf31db3 t/99_spellcheck.t
+SHA1 1f5d34e3be31d578c0e9518a6d3273c87f5b20bb t/99_spellcheck.t
 SHA1 540fb0b335d5af08fcc322f18c4166671b50a89b t/99_yaml.t
-SHA1 09cbe5b43b6692d0779e0503790414b5fe758970 t/99cleanup.t
-SHA1 dcbbbbedd302ee77497b730ced93f1df42cde9c5 t/dbdpg_test_setup.pl
+SHA1 60031c2db489d77291078ab6a418723e1a35f137 t/99cleanup.t
+SHA1 2ef65e6204a8494b0dbccf1e3c92273ce2d9e8d3 t/dbdpg_test_setup.pl
 SHA1 bc4a58bdd5e853139f9e1fc6129f83e50a07a2c6 t/lib/App/Info.pm
 SHA1 58befda00c12b1721875262505112203bf230450 t/lib/App/Info/Handler.pm
 SHA1 b5bf85b12a5fc207c44113a9c028fb7fbd68531f t/lib/App/Info/Handler/Prompt.pm
@@ -65,7 +65,7 @@
 SHA1 f07cd5ecaeb854c81ceb9206364979cf607e6546 win32.mak
 -----BEGIN PGP SIGNATURE-----
 
-iEYEAREDAAYFAkh6EToACgkQvJuQZxSWSshW/wCgtD6GcZqkXwZnR8MY+2m/XLLV
-r2QAnilc4Wt4sgPLvzUix323NZSk0qLE
-=WbPk
+iEYEAREDAAYFAkiEn3YACgkQvJuQZxSWSsifmACeMLfpKeY1hS2IH1qtIbCbpVMP
+RJUAnjG/tivs7wUxv2y91bXOVLxqIkQR
+=CA7R
 -----END PGP SIGNATURE-----

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	Mon Jul 21 08:15:03 2008
@@ -69,6 +69,11 @@
 		return $helpconnect, "Previous failure ($error)", undef;
 	}
 
+	## We may want to force an initdb call
+	if (!$helpconnect and $ENV{DBDPG_TESTINITDB}) {
+		goto INITDB;
+	}
+
 	## Got a working DSN? Give it an attempt
 	if ($testdsn and $testuser) {
 
@@ -167,7 +172,7 @@
 
 	} ## end got testdsn and testuser
 
-	## No previous info (or failed attempt), so try to conenct and possible create out own cluster
+	## No previous info (or failed attempt), so try to connect and possible create our own cluster
 
 	$testdsn ||= $ENV{DBI_DSN};
 	$testuser ||= $ENV{DBI_USER};
@@ -685,6 +690,7 @@
 	}
 
 	## Remove the test directory entirely
+	return if $ENV{DBDPG_TESTINITDB};
 	return if ! eval { require File::Path; 1; };
 	warn "Removing test database directory\n";
 	File::Path::rmtree($testdir);

Modified: DBD-Pg/trunk/t/lib/App/Info/RDBMS/PostgreSQL.pm
==============================================================================
--- DBD-Pg/trunk/t/lib/App/Info/RDBMS/PostgreSQL.pm	(original)
+++ DBD-Pg/trunk/t/lib/App/Info/RDBMS/PostgreSQL.pm	Mon Jul 21 08:15:03 2008
@@ -137,7 +137,7 @@
     my @paths = $self->search_bin_dirs;
     my @exes = $self->search_exe_names;
 
-    if (my $cfg = $u->first_cat_exe(\@exes, @paths)) {
+    if (my $cfg = $u->first_cat_exe(\@exes, @paths) and !$ENV{DBDPG_TESTINITDB}) {
         # We found it. Confirm.
         $self->{pg_config} = $self->confirm( key      => 'pg_config',
                                              prompt   => "Path to pg_config?",
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.