Subject: | Fails to install if no running Oracle instance is available |
Afaik DBD::Oracle is the only DBD that does not pass tests when it is
unable to connect to an Oracle database server. This doesn't help test
coverage
(http://www.cpantesters.org/distro/D/DBD-Oracle.html#DBD-Oracle-1.27)
nor does it constitute a pleasant deployment experience :) Please
consider adding skip statements to tests, making the requirement for a
live Oracle server optional
Cheers!
Follows an example of such a failing test after a successful build:
rabbit@Thesaurus:~$ cpanm --reinstall -v DBD::Oracle
You have make /usr/bin/make
You have LWP 5.837
You have /bin/tar: tar (GNU tar) 1.25
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching DBD::Oracle on cpanmetadb ...
Fetching
http://search.cpan.org/CPAN/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.27.tar.gz
... OK
Unpacking DBD-Oracle-1.27.tar.gz
DBD-Oracle-1.27/
DBD-Oracle-1.27/README.java.txt
DBD-Oracle-1.27/t/
DBD-Oracle-1.27/t/55nested.t
DBD-Oracle-1.27/t/23wide_db.t
DBD-Oracle-1.27/t/10general.t
DBD-Oracle-1.27/t/80ora_charset.t
DBD-Oracle-1.27/t/31lob_extended.t
DBD-Oracle-1.27/t/58object.t
DBD-Oracle-1.27/t/26exe_array.t
DBD-Oracle-1.27/t/22nchar_utf8.t
DBD-Oracle-1.27/t/40ph_type.t
DBD-Oracle-1.27/t/21nchar.t
DBD-Oracle-1.27/t/22nchar_al32utf8.t
DBD-Oracle-1.27/t/14threads.t
DBD-Oracle-1.27/t/56embbeded.t
DBD-Oracle-1.27/t/51scroll.t
DBD-Oracle-1.27/t/15nls.t
DBD-Oracle-1.27/t/60reauth.t
DBD-Oracle-1.27/t/25plsql.t
DBD-Oracle-1.27/t/34pres_lobs.t
DBD-Oracle-1.27/t/23wide_db_8bit.t
DBD-Oracle-1.27/t/28array_bind.t
DBD-Oracle-1.27/t/24implicit_utf8.t
DBD-Oracle-1.27/t/nchar_test_lib.pl
DBD-Oracle-1.27/t/50cursor.t
DBD-Oracle-1.27/t/32xmltype.t
DBD-Oracle-1.27/t/23wide_db_al32utf8.t
DBD-Oracle-1.27/t/20select.t
DBD-Oracle-1.27/t/12impdata.t
DBD-Oracle-1.27/t/70meta.t
DBD-Oracle-1.27/t/31lob.t
DBD-Oracle-1.27/t/30long.t
DBD-Oracle-1.27/t/01base.t
DBD-Oracle-1.27/Oracle.ex/
DBD-Oracle-1.27/Oracle.ex/README
DBD-Oracle-1.27/Oracle.ex/sql
DBD-Oracle-1.27/Oracle.ex/bind.pl
DBD-Oracle-1.27/Oracle.ex/commit.pl
DBD-Oracle-1.27/Oracle.ex/tabinfo.pl
DBD-Oracle-1.27/Oracle.ex/ex.pl
DBD-Oracle-1.27/Oracle.ex/curref.pl
DBD-Oracle-1.27/Oracle.ex/japh
DBD-Oracle-1.27/Oracle.ex/proc.pl
DBD-Oracle-1.27/Oracle.ex/mktable.pl
DBD-Oracle-1.27/Oracle.ex/oradump.pl
DBD-Oracle-1.27/Changes
DBD-Oracle-1.27/Oracle.h
DBD-Oracle-1.27/MANIFEST
DBD-Oracle-1.27/typemap
DBD-Oracle-1.27/README-files/
DBD-Oracle-1.27/README-files/hpux/
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-588-11.11-gcc64
DBD-Oracle-1.27/README-files/hpux/Conf-Mike
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-588-10.20-gcc
DBD-Oracle-1.27/README-files/hpux/Conf-Lincoln-1.06
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-588-11.11-gcc32
DBD-Oracle-1.27/README-files/hpux/Makefile-Lincoln
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-585-11.00-cc
DBD-Oracle-1.27/README-files/hpux/Conf-Roger
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-588-11.00-gcc64
DBD-Oracle-1.27/README-files/hpux/Conf-Lincoln-1.07
DBD-Oracle-1.27/README-files/hpux/libjava.eml
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-580-10.20-cc
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-588-11.00-gcc32
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-587-11.23-cc
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-585-11.11-cc
DBD-Oracle-1.27/README-files/hpux/Conf-Merijn-588-11.23-gcc64
DBD-Oracle-1.27/README.hpux.txt
DBD-Oracle-1.27/lib/
DBD-Oracle-1.27/lib/DBD/
DBD-Oracle-1.27/lib/DBD/Oracle/
DBD-Oracle-1.27/lib/DBD/Oracle/GetInfo.pm
DBD-Oracle-1.27/lib/DBD/Oracle/Object.pm
DBD-Oracle-1.27/dbdimp.c
DBD-Oracle-1.27/README.login.txt
DBD-Oracle-1.27/README.linux.txt
DBD-Oracle-1.27/README.vms.txt
DBD-Oracle-1.27/README.win32.txt
DBD-Oracle-1.27/hints/
DBD-Oracle-1.27/hints/macos_syms.pl
DBD-Oracle-1.27/hints/svr4.pl
DBD-Oracle-1.27/hints/macos_bundle.syms
DBD-Oracle-1.27/hints/dgux.pl
DBD-Oracle-1.27/hints/macos_lib.syms
DBD-Oracle-1.27/oraperl.ph
DBD-Oracle-1.27/README.longs.txt
DBD-Oracle-1.27/README.macosx.txt
DBD-Oracle-1.27/README.win64.txt
DBD-Oracle-1.27/test.pl
DBD-Oracle-1.27/oci.def
DBD-Oracle-1.27/Todo
DBD-Oracle-1.27/Oraperl.pm
DBD-Oracle-1.27/README.help.txt
DBD-Oracle-1.27/README.explain.txt
DBD-Oracle-1.27/README
DBD-Oracle-1.27/ora_explain.PL
DBD-Oracle-1.27/README.sec.txt
DBD-Oracle-1.27/oci8.c
DBD-Oracle-1.27/README.wingcc.txt
DBD-Oracle-1.27/dbdimp.h
DBD-Oracle-1.27/ocitrace.h
DBD-Oracle-1.27/Oracle.xs
DBD-Oracle-1.27/README.sun.txt
DBD-Oracle-1.27/Oracle.pm
DBD-Oracle-1.27/dbivport.h
DBD-Oracle-1.27/README.clients.txt
DBD-Oracle-1.27/mkta.pl
DBD-Oracle-1.27/README.aix.txt
DBD-Oracle-1.27/Makefile.PL
DBD-Oracle-1.27/README.64bit.txt
DBD-Oracle-1.27/META.yml
Entering DBD-Oracle-1.27
Configuring DBD-Oracle-1.27 ... Running Makefile.PL
Using DBI 1.615 (for perl 5.012002 on i686-linux) installed in
/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/site_perl/5.12.2/i686-linux/auto/DBI/
Configuring DBD::Oracle for perl 5.012002 on linux (i686-linux)
Remember to actually *READ* the README file! Especially if you have any
problems.
Installing on a linux, Ver#2.6
Using Oracle in /usr/lib/oracle/xe/app/oracle/product/10.2.0/client
DEFINE _SQLPLUS_RELEASE = "1002000100" (CHAR)
Oracle version 10.2.0.1 (10.2)
Found
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/demo/demo_xe.mk
Using
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/demo/demo_xe.mk
Looks like Oracle XE
(/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/demo/demo_xe.mk)
Reading
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/demo/demo_xe.mk
Your LD_LIBRARY_PATH env var is set to ''
WARNING: Your LD_LIBRARY_PATH env var doesn't include
'/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib' but probably
needs to.
client_version=10.2
DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"10.2.0.1\"
-DORA_OCI_102
Checking for functioning wait.ph
System: perl5.012002 linux thesaurus 2.6.35-trunk-686 #1 smp tue aug 17
14:30:48 utc 2010 i686 gnulinux
Compiler: cc -O2 -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Linker: /usr/bin/ld
Sysliblist:
Oracle makefiles would have used these definitions but we override them:
CC: /usr/bin/gcc
LDFLAGS: -g
[-g]
Linking with -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib/
-lclntsh -lpthread
WARNING: If you have problems you may need to rebuild perl with
threading enabled.
Checking if your kit is complete...
Looks good
LD_RUN_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib
Using DBD::Oracle 1.27.
Using DBD::Oracle 1.27.
Using DBI 1.615 (for perl 5.012002 on i686-linux) installed in
/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/site_perl/5.12.2/i686-linux/auto/DBI/
Writing Makefile for DBD::Oracle
*** If you have problems...
read all the log printed above, and the README and README.help.txt
files.
(Of course, you have read README by now anyway, haven't you?)
OK
Finding PREREQ from Makefile ...
Checking if you have DBI 1.51 ... Yes (1.615)
Building and testing DBD-Oracle-1.27 for DBD::Oracle ... cp Oracle.pm
blib/lib/DBD/Oracle.pm
cp oraperl.ph blib/lib/oraperl.ph
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp Oraperl.pm blib/lib/Oraperl.pm
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
/home/rabbit/perl5/perlbrew/perls/5.12.2/bin/perl5.12.2 -p -e
"s/~DRIVER~/Oracle/g"
/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/site_perl/5.12.2/i686-linux/auto/DBI/Driver.xst
Show quoted text
> Oracle.xsi
/home/rabbit/perl5/perlbrew/perls/5.12.2/bin/perl5.12.2
/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/5.12.2/ExtUtils/xsubpp
-typemap
/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/5.12.2/ExtUtils/typemap
-typemap typemap Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c
cc -c
-I/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/site_perl/5.12.2/i686-linux/auto/DBI
-I/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/
-DLINUX -D_GNU_SOURCE -D_REENTRANT -g -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.27\" -DXS_VERSION=\"1.27\"
-fPIC
"-I/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/5.12.2/i686-linux/CORE"
-Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"10.2.0.1\"
-DORA_OCI_102 Oracle.c
cc -c
-I/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/site_perl/5.12.2/i686-linux/auto/DBI
-I/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/
-DLINUX -D_GNU_SOURCE -D_REENTRANT -g -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.27\" -DXS_VERSION=\"1.27\"
-fPIC
"-I/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/5.12.2/i686-linux/CORE"
-Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"10.2.0.1\"
-DORA_OCI_102 dbdimp.c
cc -c
-I/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/site_perl/5.12.2/i686-linux/auto/DBI
-I/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/
-DLINUX -D_GNU_SOURCE -D_REENTRANT -g -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.27\" -DXS_VERSION=\"1.27\"
-fPIC
"-I/home/rabbit/perl5/perlbrew/perls/5.12.2/lib/5.12.2/i686-linux/CORE"
-Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"10.2.0.1\"
-DORA_OCI_102 oci8.c
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib" cc
-shared -O2 -L/usr/local/lib -fstack-protector Oracle.o dbdimp.o oci8.o
-o blib/arch/auto/DBD/Oracle/Oracle.so \
-L/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib/ -lclntsh
-lpthread \
chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so
cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs
chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs
/home/rabbit/perl5/perlbrew/perls/5.12.2/bin/perl5.12.2 "-Iblib/arch"
"-Iblib/lib" ora_explain.PL ora_explain
Extracted ora_explain from ora_explain.PL with variable substitutions.
cp ora_explain blib/script/ora_explain
/home/rabbit/perl5/perlbrew/perls/5.12.2/bin/perl5.12.2 -MExtUtils::MY
-e 'MY->fixin(shift)' -- blib/script/ora_explain
Manifying blib/man1/ora_explain.1
Manifying blib/man3/DBD::Oracle.3
Manifying blib/man3/DBD::Oraperl.3
PERL_DL_NONLAZY=1
/home/rabbit/perl5/perlbrew/perls/5.12.2/bin/perl5.12.2
"-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib',
'blib/arch')" t/*.t
t/01base.t .............. # Test loading DBI, DBD::Oracle and version
t/01base.t .............. ok
t/10general.t ........... DBI connect('','scott/tiger',...) failed:
ORA-24327: need explicit attach before authenticating a user (DBD ERROR:
OCISessionBegin) at t/10general.t line 22
Bailout called. Further testing stopped: Unable to connect to Oracle
(ORA-24327: need explicit attach before authenticating a user (DBD
ERROR: OCISessionBegin))
FAILED--Further testing stopped: Unable to connect to Oracle (ORA-24327:
need explicit attach before authenticating a user (DBD ERROR:
OCISessionBegin))
make: *** [test_dynamic] Error 255
FAIL
! Installing DBD::Oracle failed. See /home/rabbit/.cpanm/build.log for
details.