From aefb392d4d6bcb59c3f3df34018d754ac4f718e9 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Thu, 24 Nov 2011 09:58:48 +0200 Subject: Add Oracle to automake and Visual Studio build --- Makefile.am | 4 + boost/Makefile.am | 4 + boost/makefile | 2 +- boost/oracle/Makefile.am | 7 + boost/oracle/boost-oracle-vc10.sln | 15 + boost/oracle/boost-oracle-vc9.sln | 15 + boost/oracle/template/Makefile.am | 32 ++ boost/oracle/template/template-vc10.vcxproj | 180 ++++++++++ .../oracle/template/template-vc10.vcxproj.filters | 25 ++ boost/oracle/template/template-vc9.vcproj | 361 +++++++++++++++++++++ boost/oracle/test.bat | 70 ++++ configure.ac | 4 + m4/database.m4 | 7 +- m4/libodb-oracle.m4 | 84 +++++ m4/oracle.m4 | 245 ++++++++++++++ makefile | 3 +- oracle-driver.bat | 43 +++ oracle.options | 9 + oracle/Makefile.am | 7 + oracle/oracle-vc10.sln | 15 + oracle/oracle-vc9.sln | 15 + oracle/template/Makefile.am | 32 ++ oracle/template/template-vc10.vcxproj | 180 ++++++++++ oracle/template/template-vc10.vcxproj.filters | 25 ++ oracle/template/template-vc9.vcproj | 361 +++++++++++++++++++++ oracle/test.bat | 70 ++++ qt/Makefile.am | 4 + qt/makefile | 2 +- qt/oracle/Makefile.am | 7 + qt/oracle/qt-oracle-vc10.sln | 15 + qt/oracle/qt-oracle-vc9.sln | 15 + qt/oracle/template/Makefile.am | 32 ++ qt/oracle/template/template-vc10.vcxproj | 180 ++++++++++ qt/oracle/template/template-vc10.vcxproj.filters | 25 ++ qt/oracle/template/template-vc9.vcproj | 361 +++++++++++++++++++++ qt/oracle/test.bat | 70 ++++ 36 files changed, 2522 insertions(+), 4 deletions(-) create mode 100644 boost/oracle/Makefile.am create mode 100644 boost/oracle/boost-oracle-vc10.sln create mode 100644 boost/oracle/boost-oracle-vc9.sln create mode 100644 boost/oracle/template/Makefile.am create mode 100644 boost/oracle/template/template-vc10.vcxproj create mode 100644 boost/oracle/template/template-vc10.vcxproj.filters create mode 100644 boost/oracle/template/template-vc9.vcproj create mode 100644 boost/oracle/test.bat create mode 100644 m4/libodb-oracle.m4 create mode 100644 m4/oracle.m4 create mode 100644 oracle-driver.bat create mode 100644 oracle.options create mode 100644 oracle/Makefile.am create mode 100644 oracle/oracle-vc10.sln create mode 100644 oracle/oracle-vc9.sln create mode 100644 oracle/template/Makefile.am create mode 100644 oracle/template/template-vc10.vcxproj create mode 100644 oracle/template/template-vc10.vcxproj.filters create mode 100644 oracle/template/template-vc9.vcproj create mode 100644 oracle/test.bat create mode 100644 qt/oracle/Makefile.am create mode 100644 qt/oracle/qt-oracle-vc10.sln create mode 100644 qt/oracle/qt-oracle-vc9.sln create mode 100644 qt/oracle/template/Makefile.am create mode 100644 qt/oracle/template/template-vc10.vcxproj create mode 100644 qt/oracle/template/template-vc10.vcxproj.filters create mode 100644 qt/oracle/template/template-vc9.vcproj create mode 100644 qt/oracle/test.bat diff --git a/Makefile.am b/Makefile.am index 9c56178..9b1360e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,5 +25,9 @@ if DATABASE_PGSQL SUBDIRS += pgsql endif +if DATABASE_ORACLE +SUBDIRS += oracle +endif + EXTRA_DIST = __file__(extra_dist) ACLOCAL_AMFLAGS = -I m4 diff --git a/boost/Makefile.am b/boost/Makefile.am index 2e6565f..a18e3f7 100644 --- a/boost/Makefile.am +++ b/boost/Makefile.am @@ -17,4 +17,8 @@ if DATABASE_PGSQL SUBDIRS += pgsql endif +if DATABASE_ORACLE +SUBDIRS += oracle +endif + EXTRA_DIST = __file__(extra_dist) diff --git a/boost/makefile b/boost/makefile index 9b9a25c..27a5fb8 100644 --- a/boost/makefile +++ b/boost/makefile @@ -5,7 +5,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make -all_dirs := common mysql sqlite pgsql +all_dirs := common mysql sqlite pgsql oracle dirs := common ifeq ($(db_id),mysql) diff --git a/boost/oracle/Makefile.am b/boost/oracle/Makefile.am new file mode 100644 index 0000000..6237668 --- /dev/null +++ b/boost/oracle/Makefile.am @@ -0,0 +1,7 @@ +# file : boost/oracle/Makefile.am +# author : Boris Kolpackov +# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +SUBDIRS = __path__(dirs) +EXTRA_DIST = __file__(extra_dist) diff --git a/boost/oracle/boost-oracle-vc10.sln b/boost/oracle/boost-oracle-vc10.sln new file mode 100644 index 0000000..9a5dc32 --- /dev/null +++ b/boost/oracle/boost-oracle-vc10.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/boost/oracle/boost-oracle-vc9.sln b/boost/oracle/boost-oracle-vc9.sln new file mode 100644 index 0000000..2ec9432 --- /dev/null +++ b/boost/oracle/boost-oracle-vc9.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/boost/oracle/template/Makefile.am b/boost/oracle/template/Makefile.am new file mode 100644 index 0000000..2e5e5f8 --- /dev/null +++ b/boost/oracle/template/Makefile.am @@ -0,0 +1,32 @@ +# file : boost/oracle/template/Makefile.am +# author : Boris Kolpackov +# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +EXTRA_DIST = __file__(extra_dist) + +noinst_PROGRAMS = driver +driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers) +LDADD = $(top_builddir)/libcommon/common/libcommon.la +AM_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon' +AM_CPPFLAGS += -I'$(builddir)' -I'$(srcdir)' + +TESTS=$(top_builddir)/tester +TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir; + +m4_ifelse(__value__(odb_options),,, + +# ODB compilation. +# +driver_SOURCES += test.hxx +nodist_driver_SOURCES = test-odb.cxx +BUILT_SOURCES = test-odb.hxx +CLEANFILES = test-odb.hxx test-odb.ixx test-odb.cxx + +ODB = @ODB@ +ODBFLAGS = @ODBFLAGS@ +ODBCPPFLAGS = @ODBCPPFLAGS@ + +test-odb.hxx: test.hxx + $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $< +) diff --git a/boost/oracle/template/template-vc10.vcxproj b/boost/oracle/template/template-vc10.vcxproj new file mode 100644 index 0000000..99773c8 --- /dev/null +++ b/boost/oracle/template/template-vc10.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {__uuid__()} + Win32Proj + __value__(name) + + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + false + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + + + + true + $(Configuration)\ + driver + + + true + $(Platform)\$(Configuration)\ + driver + + + false + $(Configuration)\ + driver + + + false + $(Platform)\$(Configuration)\ + driver + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\..\libcommon\lib\common-d.lib;odb-oracle-d.lib;odb-boost-d.lib;odb-d.lib;%(AdditionalDependencies) + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\..\libcommon\lib64\common-d.lib;odb-oracle-d.lib;odb-boost-d.lib;odb-d.lib;%(AdditionalDependencies) + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\..\libcommon\lib\common.lib;odb-oracle.lib;odb-boost.lib;odb.lib;%(AdditionalDependencies) + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\..\libcommon\lib64\common.lib;odb-oracle.lib;odb-boost.lib;odb.lib;%(AdditionalDependencies) + Console + true + true + true + + +m4_ifelse(__value__(odb_options),,, +m4_dnl + +__custom_build_entry__( +test.hxx, +odb test.hxx, +odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx, +test-odb.hxx;test-odb.ixx;test-odb.cxx) + ) + +m4_ifelse(__value__(odb_options),,, +__header_entry__(test-odb.hxx) +__header_entry__(test-odb.ixx)) +__header_entries__(extra_headers) + + +__source_entry__(driver.cxx) +m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx)) +__source_entries__(extra_sources) + + + + + diff --git a/boost/oracle/template/template-vc10.vcxproj.filters b/boost/oracle/template/template-vc10.vcxproj.filters new file mode 100644 index 0000000..951015b --- /dev/null +++ b/boost/oracle/template/template-vc10.vcxproj.filters @@ -0,0 +1,25 @@ + + + + + {__uuid__()} + cxx + + + {__uuid__()} + h;hxx;ixx;txx + + + +m4_ifelse(__value__(odb_options),,, +__header_filter_entry__(test.hxx) +__header_filter_entry__(test-odb.hxx) +__header_filter_entry__(test-odb.ixx)) +__header_filter_entries__(extra_headers) + + +__source_filter_entry__(driver.cxx) +m4_ifelse(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) +__source_filter_entries__(extra_sources) + + \ No newline at end of file diff --git a/boost/oracle/template/template-vc9.vcproj b/boost/oracle/template/template-vc9.vcproj new file mode 100644 index 0000000..0342966 --- /dev/null +++ b/boost/oracle/template/template-vc9.vcproj @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +__source_entry__(driver.cxx) +m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx)) +__source_entries__(extra_sources) + + +m4_ifelse(__value__(odb_options),,, +__file_entry_custom_build__( +test.hxx, +odb test.hxx, +odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx, +test-odb.hxx;test-odb.ixx;test-odb.cxx) +__file_entry__(test-odb.hxx) +__file_entry__(test-odb.ixx)) +__file_entries__(extra_headers) + + + + + diff --git a/boost/oracle/test.bat b/boost/oracle/test.bat new file mode 100644 index 0000000..d323b10 --- /dev/null +++ b/boost/oracle/test.bat @@ -0,0 +1,70 @@ +@echo off +rem file : boost/oracle/test.bat +rem author : Boris Kolpackov +rem copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +setlocal + +set "tests=__path__(dirs)" +set "confs=__path__(configurations)" +set "plats=__path__(platforms)" +set "curdir=%CD%" +set "topdir=%curdir%\..\.." +set "failed=" + +goto start + +rem +rem %1 - test directory +rem %2 - configuration +rem %3 - platform +rem +:run_test + cd %1 + + if "_%3_" == "_Win32_" ( + set "dir=%2" + ) else ( + set "dir=%3\%2" + ) + + if exist %dir%\driver.exe ( + echo %1\%3\%2 + call %topdir%\tester.bat oracle %2 %3 + if errorlevel 1 ( + set "failed=%failed% %1\%3\%2" + ) + ) + + cd %curdir% +goto :eof + +:start + +for %%t in (%tests%) do ( + for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_test %%t %%c %%p + ) + ) +) + +if not "_%failed%_" == "__" goto error + +echo. +echo ALL TESTS PASSED +echo. +goto end + +:error +if not "_%failed%_" == "__" ( + echo. + for %%t in (%failed%) do echo FAILED: %%t + echo. +) +endlocal +exit /b 1 + +:end +endlocal diff --git a/configure.ac b/configure.ac index 26ae26d..532140d 100644 --- a/configure.ac +++ b/configure.ac @@ -81,6 +81,10 @@ case $database in LIBODB_PGSQL([], [AC_MSG_ERROR([libodb-pgsql is not found; consider using --with-libodb-pgsql=DIR])]) PGSQL ;; + oracle) + LIBODB_ORACLE([], [AC_MSG_ERROR([libodb-oracle is not found; consider using --with-libodb-oracle=DIR])]) + ORACLE + ;; esac # Check for the ODB compiler. diff --git a/m4/database.m4 b/m4/database.m4 index 968f764..5f5a03e 100644 --- a/m4/database.m4 +++ b/m4/database.m4 @@ -13,7 +13,7 @@ AC_MSG_CHECKING([for database to use]) AC_ARG_WITH( [database], [AC_HELP_STRING([--with-database=db], - [database to use for tests; valid values are: 'mysql', 'sqlite', and 'pgsql'])], + [database to use for tests; valid values are: 'mysql', 'sqlite', 'pgsql', and 'oracle'])], [case $withval in no | yes) AC_MSG_RESULT([]) @@ -31,6 +31,10 @@ AC_ARG_WITH( database=pgsql AC_DEFINE([DATABASE_PGSQL], [1], [Using PostgreSQL.]) ;; + oracle) + database=oracle + AC_DEFINE([DATABASE_ORACLE], [1], [Using Oracle.]) + ;; *) AC_MSG_RESULT([]) AC_MSG_ERROR([unknown database $withval]) @@ -47,5 +51,6 @@ AC_SUBST([database]) AM_CONDITIONAL([DATABASE_MYSQL], [test x$database = xmysql]) AM_CONDITIONAL([DATABASE_SQLITE], [test x$database = xsqlite]) AM_CONDITIONAL([DATABASE_PGSQL], [test x$database = xpgsql]) +AM_CONDITIONAL([DATABASE_ORACLE], [test x$database = xoracle]) ])dnl diff --git a/m4/libodb-oracle.m4 b/m4/libodb-oracle.m4 new file mode 100644 index 0000000..319377f --- /dev/null +++ b/m4/libodb-oracle.m4 @@ -0,0 +1,84 @@ +dnl file : m4/libodb-oracle.m4 +dnl author : Boris Kolpackov +dnl copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +dnl license : GNU GPL v2; see accompanying LICENSE file +dnl +dnl LIBODB_ORACLE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +dnl +dnl +AC_DEFUN([LIBODB_ORACLE], [ +libodb_oracle_found=no + +AC_ARG_WITH( + [libodb-oracle], + [AC_HELP_STRING([--with-libodb-oracle=DIR],[location of libodb-oracle build directory])], + [libodb_oracle_dir=${withval}], + [libodb_oracle_dir=]) + +AC_MSG_CHECKING([for libodb-oracle]) + +# If libodb_oracle_dir was given, add the necessary preprocessor and +# linker flags. +# +if test x"$libodb_oracle_dir" != x; then + save_CPPFLAGS="$CPPFLAGS" + save_LDFLAGS="$LDFLAGS" + + AS_SET_CATFILE([abs_libodb_oracle_dir], [$ac_pwd], [$libodb_oracle_dir]) + + CPPFLAGS="$CPPFLAGS -I$abs_libodb_oracle_dir" + LDFLAGS="$LDFLAGS -L$abs_libodb_oracle_dir/odb/oracle" +fi + +save_LIBS="$LIBS" +LIBS="-lodb-oracle $LIBS" + +CXX_LIBTOOL_LINK_IFELSE( +AC_LANG_SOURCE([[ +#include + +void +f () +{ +} + +const char* +g () +{ + try + { + f (); + } + catch (const odb::oracle::database_exception& e) + { + return e.what (); + } + return 0; +} + +int +main () +{ + const char* m (g ()); + return m != 0; +} +]]), +[libodb_oracle_found=yes]) +libodb_oracle_found=yes +if test x"$libodb_oracle_found" = xno; then + LIBS="$save_LIBS" + + if test x"$libodb_oracle_dir" != x; then + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + fi +fi + +if test x"$libodb_oracle_found" = xyes; then + AC_MSG_RESULT([yes]) + $1 +else + AC_MSG_RESULT([no]) + $2 +fi +])dnl diff --git a/m4/oracle.m4 b/m4/oracle.m4 new file mode 100644 index 0000000..836ded5 --- /dev/null +++ b/m4/oracle.m4 @@ -0,0 +1,245 @@ +dnl file : m4/oracle.m4 +dnl author : Boris Kolpackov +dnl copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +dnl license : GNU GPL v2; see accompanying LICENSE file +dnl +dnl ORACLE +dnl +AC_DEFUN([ORACLE], [ + +# Client. +# +AC_MSG_CHECKING([for oracle client program]) +AC_ARG_WITH( + [oracle-client], + [AC_HELP_STRING([--with-oracle-client=path], [Oracle client program path (sqlplus by default)])], + [case $withval in + yes) + oracle_client=sqlplus + ;; + no) + AC_MSG_RESULT([]) + AC_MSG_ERROR([need oracle client to run the tests]) + ;; + *) + oracle_client=$withval + ;; + esac], + [oracle_client=sqlplus]) + +$oracle_client -V 2>/dev/null 1>&2 + +if test x"$?" = x0; then + AC_MSG_RESULT([$oracle_client]) +else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([oracle client is not found; consider using --with-oracle-client=PATH]) +fi + +# User. +# +AC_MSG_CHECKING([for oracle database user]) +AC_ARG_WITH( + [oracle-user], + [AC_HELP_STRING([--with-oracle-user=login], [Oracle database user (odb_test by default)])], + [case $withval in + yes) + oracle_user=odb_test + oracle_user_set=yes + ;; + no) + oracle_user_set=no + ;; + *) + oracle_user=$withval + oracle_user_set=yes + ;; + esac], + [oracle_user=odb_test + oracle_user_set=yes]) + +if test x$oracle_user_set = xyes; then + AC_MSG_RESULT(['$oracle_user']) +else + AC_MSG_RESULT([none]) +fi + +# Password. +# +AC_MSG_CHECKING([for oracle database password]) +AC_ARG_WITH( + [oracle-password], + [AC_HELP_STRING([--with-oracle-password=login], [Oracle database password])], + [case $withval in + yes) + oracle_password= + oracle_password_set=yes + ;; + no) + oracle_password_set=no + ;; + *) + oracle_password=$withval + oracle_password_set=yes + ;; + esac], + [oracle_password_set=no]) + +if test x$oracle_password_set = xyes; then + AC_MSG_RESULT(['$oracle_password']) +# Use obd_test as a default password if the user is odb_test and the password +# option was not specified. +# +elif test x$oracle_user = xodb_test; then + oracle_password=odb_test + oracle_password_set=yes + AC_MSG_RESULT(['$oracle_password']) +else + AC_MSG_RESULT([none]) +fi + +# Service name. +# +AC_MSG_CHECKING([for oracle service name]) +AC_ARG_WITH( + [oracle-service], + [AC_HELP_STRING([--with-oracle-service=name], [Oracle service name (default service if left empty). Note that all data in the database associated with the test user on this service WILL BE LOST!])], + [case $withval in + yes) + oracle_service= + oracle_service_set=yes + ;; + no) + oracle_service_set=no + ;; + *) + oracle_service=$withval + oracle_service_set=yes + ;; + esac], + [oracle_service_set=no]) + +if test x$oracle_service_set = xyes; then + AC_MSG_RESULT(['$oracle_service']) +else + AC_MSG_RESULT([default]) +fi + +# Host. +# +AC_MSG_CHECKING([for oracle database host]) +AC_ARG_WITH( + [oracle-host], + [AC_HELP_STRING([--with-oracle-host=host], [Oracle database host (localhost by default)])], + [case $withval in + yes) + oracle_host= + oracle_host_set=yes + ;; + no) + oracle_host_set=no + ;; + *) + oracle_host=$withval + oracle_host_set=yes + ;; + esac], + [oracle_host_set=no]) + +if test x$oracle_host_set = xyes; then + AC_MSG_RESULT(['$oracle_host']) +else + AC_MSG_RESULT([default]) +fi + +# Port. +# +AC_MSG_CHECKING([for oracle database port]) +AC_ARG_WITH( + [oracle-port], + [AC_HELP_STRING([--with-oracle-port=port], [Oracle database port (standard Oracle port by default)])], + [case $withval in + yes) + oracle_port= + oracle_port_set=yes + ;; + no) + oracle_port_set=no + ;; + *) + oracle_port=$withval + oracle_port_set=yes + ;; + esac], + [oracle_port_set=no]) + +if test x$oracle_port_set = xyes; then + AC_MSG_RESULT(['$oracle_port']) +else + AC_MSG_RESULT([default]) +fi + +# Create options file. +# +AC_CONFIG_COMMANDS([oracle.options], + [ + rm -f db.options + echo '#! /bin/sh' >db-driver + + if test x$oracle_user_set = xyes; then + echo "--user '$oracle_user'" >>db.options + echo 'conn_str="'"$oracle_user"'"' >>db-driver + fi + + if test x$oracle_password_set = xyes; then + echo "--password '$oracle_password'" >>db.options + echo 'conn_str="$conn_str/'"$oracle_password"'"' >>db-driver + fi + + if test x$oracle_host_set = xyes; then + echo "--host '$oracle_host'" >>db.options + echo 'conn_str="$conn_str@//'"$oracle_host"'"' >>db-driver + + if test x$oracle_port_set = xyes; then + echo "--port '$oracle_port'" >>db.options + echo 'conn_str="$conn_str:'"$oracle_port"'"' >>db-driver + fi + fi + + if test x$oracle_service != x; then + if test x$oracle_host_set = xno; then + echo 'conn_str="$conn_str@"' >>db-driver + fi + + echo "--service '$oracle_service'" >>db.options + echo 'conn_str="$conn_str/'"$oracle_service"'"' >>db-driver + fi + + echo 'if test x$[]1 != x; then' >>db-driver + echo " exec $oracle_client -L -S "'$conn_str <$[]1' >>db-driver + echo "else" >>db-driver + echo " exec $oracle_client -L -S "'$conn_str' >>db-driver + echo "fi" >>db-driver + + chmod +x db-driver + ], + [ + oracle_client="$oracle_client" + + oracle_user="$oracle_user" + oracle_user_set="$oracle_user_set" + + oracle_password="$oracle_password" + oracle_password_set="$oracle_password_set" + + oracle_service="$oracle_service" + oracle_service_set="$oracle_service_set" + + oracle_host="$oracle_host" + oracle_host_set="$oracle_host_set" + + oracle_port="$oracle_port" + oracle_port_set="$oracle_port_set" + ]) + +])dnl diff --git a/makefile b/makefile index dc0d58a..bc46d43 100644 --- a/makefile +++ b/makefile @@ -33,7 +33,8 @@ $(default): $(addprefix $(out_base)/,$(addsuffix /,$(dirs))) $(dist): data_dist := GPLv2 LICENSE README INSTALL version test.bat \ tester.bat mysql-driver.bat mysql.options sqlite-driver.bat \ -sqlite.options pgsql-driver.bat pgsql.options +sqlite.options pgsql-driver.bat pgsql.options oracle.options \ +oracle-driver.bat $(dist): exec_dist := bootstrap tester.in $(dist): export extra_dist := $(data_dist) $(exec_dist) build.bat $(dist): export version = $(shell cat $(src_root)/version) diff --git a/oracle-driver.bat b/oracle-driver.bat new file mode 100644 index 0000000..83662bf --- /dev/null +++ b/oracle-driver.bat @@ -0,0 +1,43 @@ +@echo off +rem file : oracle-driver.bat +rem author : Boris Kolpackov +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/oracle.options b/oracle.options new file mode 100644 index 0000000..3f4f77f --- /dev/null +++ b/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 +# --port diff --git a/oracle/Makefile.am b/oracle/Makefile.am new file mode 100644 index 0000000..2fefbca --- /dev/null +++ b/oracle/Makefile.am @@ -0,0 +1,7 @@ +# file : oracle/Makefile.am +# author : Boris Kolpackov +# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +SUBDIRS = __path__(dirs) +EXTRA_DIST = __file__(extra_dist) diff --git a/oracle/oracle-vc10.sln b/oracle/oracle-vc10.sln new file mode 100644 index 0000000..9a5dc32 --- /dev/null +++ b/oracle/oracle-vc10.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/oracle/oracle-vc9.sln b/oracle/oracle-vc9.sln new file mode 100644 index 0000000..2ec9432 --- /dev/null +++ b/oracle/oracle-vc9.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/oracle/template/Makefile.am b/oracle/template/Makefile.am new file mode 100644 index 0000000..4cb79d0 --- /dev/null +++ b/oracle/template/Makefile.am @@ -0,0 +1,32 @@ +# file : oracle/template/Makefile.am +# author : Boris Kolpackov +# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +EXTRA_DIST = __file__(extra_dist) + +noinst_PROGRAMS = driver +driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers) +LDADD = $(top_builddir)/libcommon/common/libcommon.la +AM_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon' +AM_CPPFLAGS += -I'$(builddir)' -I'$(srcdir)' + +TESTS=$(top_builddir)/tester +TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir; + +m4_ifelse(__value__(odb_options),,, + +# ODB compilation. +# +driver_SOURCES += test.hxx +nodist_driver_SOURCES = test-odb.cxx +BUILT_SOURCES = test-odb.hxx +CLEANFILES = test-odb.hxx test-odb.ixx test-odb.cxx + +ODB = @ODB@ +ODBFLAGS = @ODBFLAGS@ +ODBCPPFLAGS = @ODBCPPFLAGS@ + +test-odb.hxx: test.hxx + $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $< +) diff --git a/oracle/template/template-vc10.vcxproj b/oracle/template/template-vc10.vcxproj new file mode 100644 index 0000000..fce8b69 --- /dev/null +++ b/oracle/template/template-vc10.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {__uuid__()} + Win32Proj + __value__(name) + + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + false + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + + + + true + $(Configuration)\ + driver + + + true + $(Platform)\$(Configuration)\ + driver + + + false + $(Configuration)\ + driver + + + false + $(Platform)\$(Configuration)\ + driver + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\libcommon\lib\common-d.lib;odb-oracle-d.lib;odb-d.lib;%(AdditionalDependencies) + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-oracle-d.lib;odb-d.lib;%(AdditionalDependencies) + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\libcommon\lib\common.lib;odb-oracle.lib;odb.lib;%(AdditionalDependencies) + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\libcommon\lib64\common.lib;odb-oracle.lib;odb.lib;%(AdditionalDependencies) + Console + true + true + true + + +m4_ifelse(__value__(odb_options),,, +m4_dnl + +__custom_build_entry__( +test.hxx, +odb test.hxx, +odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\libcommon)) test.hxx, +test-odb.hxx;test-odb.ixx;test-odb.cxx) + ) + +m4_ifelse(__value__(odb_options),,, +__header_entry__(test-odb.hxx) +__header_entry__(test-odb.ixx)) +__header_entries__(extra_headers) + + +__source_entry__(driver.cxx) +m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx)) +__source_entries__(extra_sources) + + + + + diff --git a/oracle/template/template-vc10.vcxproj.filters b/oracle/template/template-vc10.vcxproj.filters new file mode 100644 index 0000000..951015b --- /dev/null +++ b/oracle/template/template-vc10.vcxproj.filters @@ -0,0 +1,25 @@ + + + + + {__uuid__()} + cxx + + + {__uuid__()} + h;hxx;ixx;txx + + + +m4_ifelse(__value__(odb_options),,, +__header_filter_entry__(test.hxx) +__header_filter_entry__(test-odb.hxx) +__header_filter_entry__(test-odb.ixx)) +__header_filter_entries__(extra_headers) + + +__source_filter_entry__(driver.cxx) +m4_ifelse(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) +__source_filter_entries__(extra_sources) + + \ No newline at end of file diff --git a/oracle/template/template-vc9.vcproj b/oracle/template/template-vc9.vcproj new file mode 100644 index 0000000..acec7e6 --- /dev/null +++ b/oracle/template/template-vc9.vcproj @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +__source_entry__(driver.cxx) +m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx)) +__source_entries__(extra_sources) + + +m4_ifelse(__value__(odb_options),,, +__file_entry_custom_build__( +test.hxx, +odb test.hxx, +odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\libcommon)) test.hxx, +test-odb.hxx;test-odb.ixx;test-odb.cxx) +__file_entry__(test-odb.hxx) +__file_entry__(test-odb.ixx)) +__file_entries__(extra_headers) + + + + + diff --git a/oracle/test.bat b/oracle/test.bat new file mode 100644 index 0000000..13680d5 --- /dev/null +++ b/oracle/test.bat @@ -0,0 +1,70 @@ +@echo off +rem file : oracle/test.bat +rem author : Boris Kolpackov +rem copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +setlocal + +set "tests=__path__(dirs)" +set "confs=__path__(configurations)" +set "plats=__path__(platforms)" +set "curdir=%CD%" +set "topdir=%curdir%\.." +set "failed=" + +goto start + +rem +rem %1 - test directory +rem %2 - configuration +rem %3 - platform +rem +:run_test + cd %1 + + if "_%3_" == "_Win32_" ( + set "dir=%2" + ) else ( + set "dir=%3\%2" + ) + + if exist %dir%\driver.exe ( + echo %1\%3\%2 + call %topdir%\tester.bat oracle %2 %3 + if errorlevel 1 ( + set "failed=%failed% %1\%3\%2" + ) + ) + + cd %curdir% +goto :eof + +:start + +for %%t in (%tests%) do ( + for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_test %%t %%c %%p + ) + ) +) + +if not "_%failed%_" == "__" goto error + +echo. +echo ALL TESTS PASSED +echo. +goto end + +:error +if not "_%failed%_" == "__" ( + echo. + for %%t in (%failed%) do echo FAILED: %%t + echo. +) +endlocal +exit /b 1 + +:end +endlocal diff --git a/qt/Makefile.am b/qt/Makefile.am index fc38fc6..9c22df3 100644 --- a/qt/Makefile.am +++ b/qt/Makefile.am @@ -17,4 +17,8 @@ if DATABASE_PGSQL SUBDIRS += pgsql endif +if DATABASE_ORACLE +SUBDIRS += oracle +endif + EXTRA_DIST = __file__(extra_dist) diff --git a/qt/makefile b/qt/makefile index 13a05a0..1345e70 100644 --- a/qt/makefile +++ b/qt/makefile @@ -5,7 +5,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make -all_dirs := common mysql sqlite pgsql +all_dirs := common mysql sqlite pgsql oracle dirs := common ifeq ($(db_id),mysql) diff --git a/qt/oracle/Makefile.am b/qt/oracle/Makefile.am new file mode 100644 index 0000000..dedab0e --- /dev/null +++ b/qt/oracle/Makefile.am @@ -0,0 +1,7 @@ +# file : qt/oracle/Makefile.am +# author : Constantin Michael +# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +SUBDIRS = __path__(dirs) +EXTRA_DIST = __file__(extra_dist) diff --git a/qt/oracle/qt-oracle-vc10.sln b/qt/oracle/qt-oracle-vc10.sln new file mode 100644 index 0000000..9a5dc32 --- /dev/null +++ b/qt/oracle/qt-oracle-vc10.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/qt/oracle/qt-oracle-vc9.sln b/qt/oracle/qt-oracle-vc9.sln new file mode 100644 index 0000000..2ec9432 --- /dev/null +++ b/qt/oracle/qt-oracle-vc9.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/qt/oracle/template/Makefile.am b/qt/oracle/template/Makefile.am new file mode 100644 index 0000000..00b4afe --- /dev/null +++ b/qt/oracle/template/Makefile.am @@ -0,0 +1,32 @@ +# file : qt/oracle/template/Makefile.am +# author : Constantin Michael +# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +EXTRA_DIST = __file__(extra_dist) + +noinst_PROGRAMS = driver +driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers) +LDADD = $(top_builddir)/libcommon/common/libcommon.la +AM_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon' +AM_CPPFLAGS += -I'$(builddir)' -I'$(srcdir)' + +TESTS=$(top_builddir)/tester +TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir; + +m4_ifelse(__value__(odb_options),,, + +# ODB compilation. +# +driver_SOURCES += test.hxx +nodist_driver_SOURCES = test-odb.cxx +BUILT_SOURCES = test-odb.hxx +CLEANFILES = test-odb.hxx test-odb.ixx test-odb.cxx + +ODB = @ODB@ +ODBFLAGS = @ODBFLAGS@ +ODBCPPFLAGS = @ODBCPPFLAGS@ + +test-odb.hxx: test.hxx + $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $< +) diff --git a/qt/oracle/template/template-vc10.vcxproj b/qt/oracle/template/template-vc10.vcxproj new file mode 100644 index 0000000..d984502 --- /dev/null +++ b/qt/oracle/template/template-vc10.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {__uuid__()} + Win32Proj + __value__(name) + + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + false + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + + + + true + $(Configuration)\ + driver + + + true + $(Platform)\$(Configuration)\ + driver + + + false + $(Configuration)\ + driver + + + false + $(Platform)\$(Configuration)\ + driver + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\..\libcommon\lib\common-d.lib;odb-oracle-d.lib;odb-qt-d.lib;odb-d.lib;QtCored4.lib;%(AdditionalDependencies) + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\..\libcommon\lib64\common-d.lib;odb-oracle-d.lib;odb-qt-d.lib;odb-d.lib;QtCored4.lib;%(AdditionalDependencies) + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\..\libcommon\lib\common.lib;odb-oracle.lib;odb-qt.lib;odb.lib;QtCore4.lib;%(AdditionalDependencies) + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) + $(SolutionDir)\..\..\libcommon + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\..\libcommon\lib64\common.lib;odb-oracle.lib;odb-qt.lib;odb.lib;QtCore4.lib;%(AdditionalDependencies) + Console + true + true + true + + +m4_ifelse(__value__(odb_options),,, +m4_dnl + +__custom_build_entry__( +test.hxx, +odb test.hxx, +odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx, +test-odb.hxx;test-odb.ixx;test-odb.cxx) + ) + +m4_ifelse(__value__(odb_options),,, +__header_entry__(test-odb.hxx) +__header_entry__(test-odb.ixx)) +__header_entries__(extra_headers) + + +__source_entry__(driver.cxx) +m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx)) +__source_entries__(extra_sources) + + + + + diff --git a/qt/oracle/template/template-vc10.vcxproj.filters b/qt/oracle/template/template-vc10.vcxproj.filters new file mode 100644 index 0000000..951015b --- /dev/null +++ b/qt/oracle/template/template-vc10.vcxproj.filters @@ -0,0 +1,25 @@ + + + + + {__uuid__()} + cxx + + + {__uuid__()} + h;hxx;ixx;txx + + + +m4_ifelse(__value__(odb_options),,, +__header_filter_entry__(test.hxx) +__header_filter_entry__(test-odb.hxx) +__header_filter_entry__(test-odb.ixx)) +__header_filter_entries__(extra_headers) + + +__source_filter_entry__(driver.cxx) +m4_ifelse(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) +__source_filter_entries__(extra_sources) + + \ No newline at end of file diff --git a/qt/oracle/template/template-vc9.vcproj b/qt/oracle/template/template-vc9.vcproj new file mode 100644 index 0000000..563a440 --- /dev/null +++ b/qt/oracle/template/template-vc9.vcproj @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +__source_entry__(driver.cxx) +m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx)) +__source_entries__(extra_sources) + + +m4_ifelse(__value__(odb_options),,, +__file_entry_custom_build__( +test.hxx, +odb test.hxx, +odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx, +test-odb.hxx;test-odb.ixx;test-odb.cxx) +__file_entry__(test-odb.hxx) +__file_entry__(test-odb.ixx)) +__file_entries__(extra_headers) + + + + + diff --git a/qt/oracle/test.bat b/qt/oracle/test.bat new file mode 100644 index 0000000..e73cdff --- /dev/null +++ b/qt/oracle/test.bat @@ -0,0 +1,70 @@ +@echo off +rem file : qt/oracle/test.bat +rem author : Constantin Michael +rem copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +setlocal + +set "tests=__path__(dirs)" +set "confs=__path__(configurations)" +set "plats=__path__(platforms)" +set "curdir=%CD%" +set "topdir=%curdir%\..\.." +set "failed=" + +goto start + +rem +rem %1 - test directory +rem %2 - configuration +rem %3 - platform +rem +:run_test + cd %1 + + if "_%3_" == "_Win32_" ( + set "dir=%2" + ) else ( + set "dir=%3\%2" + ) + + if exist %dir%\driver.exe ( + echo %1\%3\%2 + call %topdir%\tester.bat oracle %2 %3 + if errorlevel 1 ( + set "failed=%failed% %1\%3\%2" + ) + ) + + cd %curdir% +goto :eof + +:start + +for %%t in (%tests%) do ( + for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_test %%t %%c %%p + ) + ) +) + +if not "_%failed%_" == "__" goto error + +echo. +echo ALL TESTS PASSED +echo. +goto end + +:error +if not "_%failed%_" == "__" ( + echo. + for %%t in (%failed%) do echo FAILED: %%t + echo. +) +endlocal +exit /b 1 + +:end +endlocal -- cgit v1.1