Subject: | Tests are skipped when trying to connect to DB |
FYI. For some reason, the tests are skipped, saying it can't connect to
the DB, but the DB is working.
-----------------------------------------
...
Running make test
PGINITDB="" PERL_DL_NONLAZY=1 /usr/bin/perl.exe "-
MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')"
t/*.t
t/00_signature.t .... skipped: Set the environment variable
TEST_SIGNATURE to enable this test
t/00basic.t ......... ok
t/01connect.t ....... #
# DBI Version 1.613
# DBD::Pg Version 2.19.2
# Perl Version 5.10.1
# OS cygwin
# PostgreSQL (compiled) ?
# PostgreSQL (target) ?
# PostgreSQL (reported) ?
# Default port ?
# DBI_DSN ?
# DBI_USER <not set>
# Test schema dbd_pg_testschema
# LANG C
# Adjusted: initdb
# Error was: Failed to run initdb (executable probably not available)
ENV was: Final call was: initdb
t/01connect.t ....... skipped: Connection to database failed, cannot
continue testing
t/01constants.t ..... ok
t/02attribs.t ....... skipped: Connection to database failed, cannot
continue testing
t/03dbmethod.t ...... skipped: Connection to database failed, cannot
continue testing
t/03smethod.t ....... skipped: Connection to database failed, cannot
continue testing
t/04misc.t .......... skipped: Connection to database failed, cannot
continue testing
t/06bytea.t ......... skipped: Connection to database failed, cannot
continue testing
t/07copy.t .......... skipped: Connection to database failed, cannot
continue testing
t/08async.t ......... skipped: Connection to database failed, cannot
continue testing
t/09arrays.t ........ skipped: Connection to database failed, cannot
continue testing
t/12placeholders.t .. skipped: Connection to database failed, cannot
continue testing
t/20savepoints.t .... skipped: Connection to database failed, cannot
continue testing
t/99cleanup.t ....... 1/1 Removing test database directory
t/99cleanup.t ....... ok
All tests successful.
Files=15, Tests=140, 11 wallclock secs ( 0.25 usr 0.24 sys + 4.58 cusr
3.26 csys = 8.33 CPU)
Result: PASS
TURNSTEP/DBD-Pg-2.19.2.tar.gz
make test -- OK
cpan[2]> q
Lockfile removed.
Chloe@dumbopc /usr/sbin
$ psql stocks
Welcome to psql 8.2.11, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
stocks=# \q
Chloe@dumbopc /usr/sbin
$ initdb
The files belonging to this database system will be owned by user
"Chloe".
This user must also own the server process.
The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
initdb: directory "/usr/share/postgresql/data" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/usr/share/postgresql/data" or run initdb
with an argument other than "/usr/share/postgresql/data".
Chloe@dumbopc /tmp
$ cat tmp.pl
use DBI;
$dbh = DBI->connect("dbi:Pg:dbname=stocks", '', '', {AutoCommit => 0});
print $dbh
Chloe@dumbopc /tmp
$ perl tmp.pl
DBI::db=HASH(0x2026c558)
Chloe@dumbopc /tmp
$