X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=maint%2Ftravis-ci_scripts%2F10_before_install.bash;h=9f0e3e504312a8d261986b3bef919d1dc5c113b5;hb=137dca082e1ee8a1a2649b5ca0e0707efbc21c9f;hp=ca93ef545fef694ffb5e5acd68246884b0518d38;hpb=aa0e82a2a01ef3c1bc0f7bff2b267d7a8756d37d;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/maint/travis-ci_scripts/10_before_install.bash b/maint/travis-ci_scripts/10_before_install.bash index ca93ef5..9f0e3e5 100755 --- a/maint/travis-ci_scripts/10_before_install.bash +++ b/maint/travis-ci_scripts/10_before_install.bash @@ -2,7 +2,7 @@ # Stop pre-started RDBMS and sync for some settle time run_or_err "Stopping MySQL" "sudo /etc/init.d/mysql stop" -run_or_err "Stopping PostgreSQL" "sudo /etc/init.d/postgresql stop" +run_or_err "Stopping PostgreSQL" "sudo /etc/init.d/postgresql stop || /bin/true" /bin/sync # Sanity check VM before continuing @@ -40,7 +40,9 @@ if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then return ; fi # # We also divide the result by a factor, otherwise the travis VM gets # overloaded (the amount of available swap is just TOOOO damn small) -export NUMTHREADS="$(( ( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ) / 3 ))" +if [[ -z "$NUMTHREADS" ]] ; then + export NUMTHREADS="$(( ( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ) / 3 ))" +fi export CACHE_DIR="/tmp/poormanscache" @@ -58,6 +60,10 @@ else sudo bash -c 'echo -e "firebird2.5-super\tshared/firebird/enabled\tboolean\ttrue" | debconf-set-selections' sudo bash -c 'echo -e "firebird2.5-super\tshared/firebird/sysdba_password/new_password\tpassword\t123" | debconf-set-selections' + # these APT sources do not mean anything to us anyway + sudo rm -rf /etc/apt/sources.list.d/* + + run_or_err "Updating APT sources" "sudo apt-get update" apt_install $common_packages libmysqlclient-dev memcached firebird2.5-super firebird2.5-dev unixodbc-dev expect run_or_err "Cloning poor man's cache from github" "git clone --depth=1 --single-branch --branch=oracle/10.2.0 https://github.com/poortravis/poormanscache.git $CACHE_DIR && $CACHE_DIR/reassemble" @@ -115,6 +121,24 @@ else "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 @@ -123,6 +147,10 @@ else 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