summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/windows/README2
-rwxr-xr-xtest/windows/odb/all2
-rwxr-xr-xtest/windows/odb/mingw/build9
-rw-r--r--test/windows/odb/oracle-driver.bat43
-rw-r--r--test/windows/odb/oracle.options9
-rwxr-xr-xtest/windows/odb/setenv.bat7
-rwxr-xr-xtest/windows/odb/unpack7
7 files changed, 71 insertions, 8 deletions
diff --git a/test/windows/README b/test/windows/README
index b2ee0d3..8211bac 100644
--- a/test/windows/README
+++ b/test/windows/README
@@ -21,10 +21,12 @@ Steps:
sqlite
pgsql
pgsql64
+ oracle
boost
qtcore
odb/libodb
odb/libodb-mysql
+ odb/libodb-oracle
odb/libodb-pgsql
odb/libodb-sqlite
odb/libodb-boost
diff --git a/test/windows/odb/all b/test/windows/odb/all
index e727929..8d50a29 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="pgsql sqlite mysql"
+ databases="oracle pgsql sqlite mysql"
else
databases=$2
fi
diff --git a/test/windows/odb/mingw/build b/test/windows/odb/mingw/build
index 35748c9..79aee24 100755
--- a/test/windows/odb/mingw/build
+++ b/test/windows/odb/mingw/build
@@ -24,16 +24,18 @@ ROOT=/c/projects
MYSQL=$ROOT/mysql-mingw32
SQLITE=$ROOT/sqlite-mingw32
PGSQL=$ROOT/pgsql-mingw32
+ORACLE=$ROOT/oracle-mingw32
BOOST=$ROOT/boost-mingw32
QTCORE=$ROOT/qtcore-mingw32
-CPPFLAGS="-I$BOOST -I$QTCORE/include -I$QTCORE/include/QtCore -I$PGSQL/include -I$SQLITE -I$MYSQL/include"
-LDFLAGS="-L$BOOST/stage/lib -L$QTCORE/lib -L$PGSQL/lib -L$SQLITE -L$MYSQL/lib -Wl,--enable-auto-import"
+CPPFLAGS="-I$BOOST -I$QTCORE/include -I$QTCORE/include/QtCore -I$ORACLE/include -I$PGSQL/include -I$SQLITE -I$MYSQL/include"
+LDFLAGS="-L$BOOST/stage/lib -L$QTCORE/lib -L$ORACLE/lib -L$PGSQL/lib -L$SQLITE -L$MYSQL/lib -Wl,--enable-auto-import"
PATH="$QTCORE/bin:$PATH"
mysql_options="--with-mysql-host=192.168.0.5 --with-mysql-client=$MYSQL/bin/mysql.exe"
sqlite_options="--with-sqlite-db=c:\\projects\\odb\\odb_test.db"
pgsql_options="--with-pgsql-host=192.168.0.5 --with-pgsql-client=$PGSQL/bin/psql.exe"
+oracle-options="--with-oracle-host=192.168.0.5 --with-oracle-service=xe --with-oracle-client=$ORACLE/bin/sqlplus.exe"
test=n
rebuild=n
@@ -62,13 +64,14 @@ while [ $# -gt 0 ]; do
done
if [ "$db" = "" ]; then
- db="pgsql sqlite mysql"
+ db="oracle pgsql sqlite mysql"
fi
# Clean everything up if we are rebuilding.
#
if [ $rebuild = y ]; then
clean libodb
+ clean libodb-oracle
clean libodb-pgsql
clean libodb-sqlite
clean libodb-mysql
diff --git a/test/windows/odb/oracle-driver.bat b/test/windows/odb/oracle-driver.bat
new file mode 100644
index 0000000..83662bf
--- /dev/null
+++ b/test/windows/odb/oracle-driver.bat
@@ -0,0 +1,43 @@
+@echo off
+rem file : oracle-driver.bat
+rem author : Boris Kolpackov <boris@codesynthesis.com>
+rem copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
+rem license : GNU GPL v2; see accompanying LICENSE file
+
+rem
+rem oracle-driver.bat sql-file
+rem
+rem Run the oracle client on the SQL file specified. Adjust the
+rem option below to match your Oracle setup.
+rem
+
+setlocal
+
+set "options=%ORACLE_OPTIONS%"
+set "options=%options% odb_test/odb_test"
+
+set "oracle=%ORACLE_CLIENT%"
+
+if "_%oracle%_" == "__" set "oracle=sqlplus"
+
+if "_%1_" == "__" (
+ echo no sql file specified
+ goto usage
+)
+
+%oracle% %options% < %1
+
+if errorlevel 1 goto error
+goto end
+
+:usage
+echo.
+echo usage: oracle-driver.bat sql-file
+echo.
+
+:error
+endlocal
+exit /b 1
+
+:end
+endlocal
diff --git a/test/windows/odb/oracle.options b/test/windows/odb/oracle.options
new file mode 100644
index 0000000..288ef20
--- /dev/null
+++ b/test/windows/odb/oracle.options
@@ -0,0 +1,9 @@
+# Sample Oracle options file used to run the tests. Adjust to
+# match your Oracle setup.
+#
+
+--user odb_test
+--password odb_test
+# --service
+# --host 192.168.0.X
+# --port
diff --git a/test/windows/odb/setenv.bat b/test/windows/odb/setenv.bat
index dafba20..d23f85c 100755
--- a/test/windows/odb/setenv.bat
+++ b/test/windows/odb/setenv.bat
@@ -6,13 +6,16 @@ set MYSQL64=c:\projects\mysql64
set SQLITE=c:\projects\sqlite
set PGSQL=c:\projects\pgsql
set PGSQL64=c:\projects\pgsql64
+set ORACLE=c:\projects\oracle
+set ORACLE64=c:\projects\oracle64
set QTCORE=c:\projects\qtcore
set QTCORE64=c:\projects\qtcore64
+set "ORACLE_OPTIONS=-L -S"
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%\libodb\bin;%ODB%\libodb-sqlite\bin;%ODB%\libodb-mysql\bin;%ODB%\libodb-pgsql\bin;%ODB%\libodb-boost\bin;%ODB%\libodb-qt\bin;%MYSQL%\bin;%SQLITE%\bin;%PGSQL%\bin;%QTCORE%\bin;%PATH%
-set PATH=%ODB%\libodb\bin64;%ODB%\libodb-sqlite\bin64;%ODB%\libodb-mysql\bin64;%ODB%\libodb-pgsql\bin64;%ODB%\libodb-boost\bin64;%ODB%\libodb-qt\bin64;%MYSQL64%\bin;%SQLITE%\bin64;%PGSQL64%\bin;%QTCORE64%\bin;%PATH%
+set PATH=%ODB%\libodb\bin;%ODB%\libodb-sqlite\bin;%ODB%\libodb-mysql\bin;%ODB%\libodb-pgsql\bin;%ODB%\libodb-oracle\bin;%ODB%\libodb-boost\bin;%ODB%\libodb-qt\bin;%MYSQL%\bin;%SQLITE%\bin;%PGSQL%\bin;%ORACLE%\bin;%QTCORE%\bin;%PATH%
+set PATH=%ODB%\libodb\bin64;%ODB%\libodb-sqlite\bin64;%ODB%\libodb-mysql\bin64;%ODB%\libodb-pgsql\bin64;%ODB%\libodb-oracle\bin64;%ODB%\libodb-boost\bin64;%ODB%\libodb-qt\bin64;%MYSQL64%\bin;%SQLITE%\bin64;%PGSQL64%\bin;%ORACLE64%\bin;%QTCORE64%\bin;%PATH%
if "_%1_" == "__" goto end
diff --git a/test/windows/odb/unpack b/test/windows/odb/unpack
index c45bd6c..8f40853 100755
--- a/test/windows/odb/unpack
+++ b/test/windows/odb/unpack
@@ -12,7 +12,7 @@ function error ()
echo "$*" 1>&2
}
-databases="pgsql sqlite mysql"
+databases="oracle pgsql sqlite mysql"
mingw=n
while [ $# -gt 0 ]; do
@@ -34,7 +34,7 @@ else
base=/cygdrive/t/pack
fi
-rm -rf libodb libodb-pgsql libodb-sqlite libodb-mysql libodb-boost \
+rm -rf libodb libodb-oracle libodb-pgsql libodb-sqlite libodb-mysql libodb-boost \
libodb-qt odb odb-tests odb-examples odb-tests-* odb-examples-*
v=`echo $base/libodb-?.*.zip | sed -e "s%$base/libodb-\(.*\).zip%\1%"`
@@ -44,6 +44,9 @@ echo unpacking $v from $base
unzip -q $base/libodb-$v.zip
mv libodb-$v libodb
+unzip -q $base/libodb-oracle-$v.zip
+mv libodb-oracle-$v libodb-oracle
+
unzip -q $base/libodb-pgsql-$v.zip
mv libodb-pgsql-$v libodb-pgsql