From: Peter Rabbitson Date: Thu, 30 Jan 2014 05:04:05 +0000 (+0100) Subject: Add Firebird over ODBC TravisCI testing X-Git-Tag: v0.08270~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=da59679ae19e7fe30635d5b035ed5fcb22c33c99;p=dbsrgits%2FDBIx-Class.git Add Firebird over ODBC TravisCI testing --- diff --git a/maint/travis-ci_scripts/10_before_install.bash b/maint/travis-ci_scripts/10_before_install.bash index ce9128a..f861b0e 100755 --- a/maint/travis-ci_scripts/10_before_install.bash +++ b/maint/travis-ci_scripts/10_before_install.bash @@ -37,7 +37,7 @@ if [[ "$CLEANTEST" != "true" ]]; then run_or_err "Priming up the APT cache with $(echo $(ls -d $CACHE_DIR/apt_cache/*.deb))" "sudo cp $CACHE_DIR/apt_cache/*.deb /var/cache/apt/archives" - apt_install memcached firebird2.5-super firebird2.5-dev expect oracle-xe + apt_install memcached firebird2.5-super firebird2.5-dev unixodbc-dev expect oracle-xe ### config memcached run_or_err "Starting memcached" "sudo /etc/init.d/memcached start" @@ -87,6 +87,25 @@ if [[ "$CLEANTEST" != "true" ]]; then if run_or_err "Creating Firebird TestDB" \ "echo \"CREATE DATABASE '/var/lib/firebird/2.5/data/dbic_test.fdb';\" | sudo isql-fb -u sysdba -p 123" then + + run_or_err "Fetching and building Firebird ODBC driver" ' + cd "$(mktemp -d)" + wget -qO- http://sourceforge.net/projects/firebird/files/firebird-ODBC-driver/2.0.2-Release/OdbcFb-Source-2.0.2.153.gz/download | tar -zx + cd Builds/Gcc.lin + perl -p -i -e "s|/usr/lib64|/usr/lib/x86_64-linux-gnu|g" ../makefile.environ + make -f makefile.linux + sudo make -f makefile.linux install + ' + + sudo bash -c 'cat >> /etc/odbcinst.ini' <<< " +[Firebird] +Description = InterBase/Firebird ODBC Driver +Driver = /usr/lib/x86_64-linux-gnu/libOdbcFb.so +Setup = /usr/lib/x86_64-linux-gnu/libOdbcFb.so +Threading = 1 +FileUsage = 1 +" + export DBICTEST_FIREBIRD_DSN=dbi:Firebird:dbname=/var/lib/firebird/2.5/data/dbic_test.fdb export DBICTEST_FIREBIRD_USER=SYSDBA export DBICTEST_FIREBIRD_PASS=123 @@ -95,6 +114,10 @@ if [[ "$CLEANTEST" != "true" ]]; then export DBICTEST_FIREBIRD_INTERBASE_USER=SYSDBA export DBICTEST_FIREBIRD_INTERBASE_PASS=123 + export DBICTEST_FIREBIRD_ODBC_DSN="dbi:ODBC:Driver=Firebird;Dbname=/var/lib/firebird/2.5/data/dbic_test.fdb" + export DBICTEST_FIREBIRD_ODBC_USER=SYSDBA + export DBICTEST_FIREBIRD_ODBC_PASS=123 + break fi diff --git a/maint/travis-ci_scripts/30_before_script.bash b/maint/travis-ci_scripts/30_before_script.bash index e6918e8..a91067a 100755 --- a/maint/travis-ci_scripts/30_before_script.bash +++ b/maint/travis-ci_scripts/30_before_script.bash @@ -119,7 +119,7 @@ else parallel_installdeps_notest YAML LWP Class::Trigger JSON::XS DateTime::Format::Builder Class::Accessor::Grouped Package::Variant parallel_installdeps_notest 'SQL::Abstract~<1.99' Moose Module::Install JSON SQL::Translator File::Which - if [[ -n "DBICTEST_FIREBIRD_DSN" ]] ; then + if [[ -n "DBICTEST_FIREBIRD_INTERBASE_DSN" ]] ; then # the official version is very much outdated and does not compile on 5.14+ # use this rather updated source tree (needs to go to PAUSE): # https://github.com/pilcrow/perl-dbd-interbase