diff options
-rwxr-xr-x | test/windows/odb/all | 2 | ||||
-rw-r--r-- | test/windows/odb/pgsql-driver.bat | 53 | ||||
-rw-r--r-- | test/windows/odb/pgsql.options | 6 | ||||
-rwxr-xr-x | test/windows/odb/setenv.bat | 7 | ||||
-rwxr-xr-x | test/windows/odb/unpack | 7 |
5 files changed, 70 insertions, 5 deletions
diff --git a/test/windows/odb/all b/test/windows/odb/all index f81218d..e727929 100755 --- a/test/windows/odb/all +++ b/test/windows/odb/all @@ -27,7 +27,7 @@ if [ "$2" = "" ]; then exit 1 else if [ "$2" = "all" ]; then - databases="sqlite mysql" + databases="pgsql sqlite mysql" else databases=$2 fi diff --git a/test/windows/odb/pgsql-driver.bat b/test/windows/odb/pgsql-driver.bat new file mode 100644 index 0000000..1b4b6ee --- /dev/null +++ b/test/windows/odb/pgsql-driver.bat @@ -0,0 +1,53 @@ +@echo off +rem file : pgsql-driver.bat +rem author : Constantin Michael <constantin@codesynthesis.com> +rem copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +rem +rem pgsql-driver.bat sql-file +rem +rem Run the pgsql client on the SQL file specified. Adjust the +rem option below to match your PostgreSQL setup. +rem + +setlocal + +set "options=%PGSQL_OPTIONS%" + +rem This user must be able to login without specifying a password. +rem +set "options=%options% --username=odb_test" + +set "options=%options% --dbname=odb_test" +set "options=%options% --host=192.168.0.X" +rem set "options=%options% --port=" + +set "options=%options% --quiet" +set "PGOPTIONS=--client-min-messages=warning" + +set "pgsql=%PGSQL_CLIENT%" + +if "_%pgsql%_" == "__" set "pgsql=psql" + +if "_%1_" == "__" ( + echo no sql file specified + goto usage +) + +%pgsql% %options% < %1 + +if errorlevel 1 goto error +goto end + +:usage +echo. +echo usage: pgsql-driver.bat sql-file +echo. + +:error +endlocal +exit /b 1 + +:end +endlocal diff --git a/test/windows/odb/pgsql.options b/test/windows/odb/pgsql.options new file mode 100644 index 0000000..eabacc8 --- /dev/null +++ b/test/windows/odb/pgsql.options @@ -0,0 +1,6 @@ +# +# +--username odb_test +--database odb_test +--host '192.168.0.X' +# --port diff --git a/test/windows/odb/setenv.bat b/test/windows/odb/setenv.bat index 904468b..8c8c7dc 100755 --- a/test/windows/odb/setenv.bat +++ b/test/windows/odb/setenv.bat @@ -4,12 +4,15 @@ set ODB=c:\projects\odb set MYSQL=c:\projects\mysql set MYSQL64=c:\projects\mysql64 set SQLITE=c:\projects\sqlite +set PGSQL=c:\projects\pgsql +set PGSQL64=c:\projects\pgsql64 set QTCORE=c:\projects\qtcore +set QTCORE64=c:\projects\qtcore64 set "DIFF=c:\cygwin\bin\diff.exe -ubB" rem set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.com" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" -set PATH=%ODB%\odb-tests\libcommon\bin;%ODB%\libodb\bin;%ODB%\libodb-sqlite\bin;%ODB%\libodb-mysql\bin;%ODB%\libodb-tracer\bin;%ODB%\libodb-boost\bin;%ODB%\libodb-qt\bin;%MYSQL%\bin;%SQLITE%\bin;%QTCORE%\lib;%PATH% -set PATH=%ODB%\odb-tests\libcommon\bin64;%ODB%\libodb\bin64;%ODB%\libodb-sqlite\bin64;%ODB%\libodb-mysql\bin64;%ODB%\libodb-tracer\bin64;%ODB%\libodb-boost\bin64;%ODB%\libodb-qt\bin64;%MYSQL64%\bin;%SQLITE%\bin64;%QTCORE%\lib64;%PATH% +set PATH=%ODB%\odb-tests\libcommon\bin;%ODB%\libodb\bin;%ODB%\libodb-sqlite\bin;%ODB%\libodb-mysql\bin;%ODB%\libodb-pgsql\bin;%ODB%\libodb-tracer\bin;%ODB%\libodb-boost\bin;%ODB%\libodb-qt\bin;%MYSQL%\bin;%SQLITE%\bin;%PGSQL%\bin;%QTCORE%\lib;%PATH% +set PATH=%ODB%\odb-tests\libcommon\bin64;%ODB%\libodb\bin64;%ODB%\libodb-sqlite\bin64;%ODB%\libodb-mysql\bin64;%ODB%\libodb-pgsql\bin;%ODB%\libodb-tracer\bin64;%ODB%\libodb-boost\bin64;%ODB%\libodb-qt\bin64;%MYSQL64%\bin;%SQLITE%\bin64;%PGSQL64%\bin;%QTCORE64%\lib;%PATH% if "_%1_" == "__" goto end diff --git a/test/windows/odb/unpack b/test/windows/odb/unpack index bf98d5c..5676be2 100755 --- a/test/windows/odb/unpack +++ b/test/windows/odb/unpack @@ -12,7 +12,7 @@ function error () echo "$*" 1>&2 } -databases="sqlite mysql" +databases="pgsql sqlite mysql" mingw=n while [ $# -gt 0 ]; do @@ -34,7 +34,7 @@ else base=/cygdrive/t/pack fi -rm -rf libodb libodb-sqlite libodb-mysql libodb-tracer libodb-boost \ +rm -rf libodb libodb-pgsql libodb-sqlite libodb-mysql libodb-tracer libodb-boost \ libodb-qt odb odb-tests-* odb-examples-* v=`echo $base/libodb-?.*.zip | sed -e "s%$base/libodb-\(.*\).zip%\1%"` @@ -47,6 +47,9 @@ mv libodb-$v libodb unzip -q $base/libodb-tracer-$v.zip mv libodb-tracer-$v libodb-tracer +unzip -q $base/libodb-pgsql-$v.zip +mv libodb-pgsql-$v libodb-pgsql + unzip -q $base/libodb-sqlite-$v.zip mv libodb-sqlite-$v libodb-sqlite |