diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-30 16:12:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-30 16:12:06 +0200 |
commit | 6a9aeb7eed00b1f03039b73f72015e65bbea48b4 (patch) | |
tree | fb0f77bdf6e7c7c7dc970025669d56a49fbbd7ca /test | |
parent | 457b2c78ff3b6da7856c6d336de6e1b2dc3a4d60 (diff) |
Update with multi-database build and SQLite support
Diffstat (limited to 'test')
-rw-r--r-- | test/windows/README | 6 | ||||
-rwxr-xr-x | test/windows/odb/all | 26 | ||||
-rwxr-xr-x | test/windows/odb/build.bat | 30 | ||||
-rwxr-xr-x | test/windows/odb/setenv.bat | 5 | ||||
-rw-r--r-- | test/windows/odb/sqlite-driver.bat | 1 | ||||
-rw-r--r-- | test/windows/odb/sqlite.options | 1 | ||||
-rwxr-xr-x | test/windows/odb/unpack | 28 |
7 files changed, 64 insertions, 33 deletions
diff --git a/test/windows/README b/test/windows/README index 8efd025..5ab3c76 100644 --- a/test/windows/README +++ b/test/windows/README @@ -9,7 +9,7 @@ Steps: 1. Copy odb\ to the root directory. -2. Edit default.options, mysql-driver.bat and mysql.options to match +2. Edit default.options, <db>-driver.bat and <db>.options to match your setup. 3. Run the 'unpack' script. @@ -18,8 +18,10 @@ Steps: mysql mysql64 + sqlite odb/libodb odb/libodb-tracer + odb/libodb-sqlite odb/libodb-mysql odb/libodb-boost @@ -31,4 +33,4 @@ Steps: 6. Run the 'all' script: - ./all <vc-version> 2>&1 | tee all.log + ./all <vc-version> <database> <conf> <plat> 2>&1 | tee all.log diff --git a/test/windows/odb/all b/test/windows/odb/all index d9ecc16..f81218d 100755 --- a/test/windows/odb/all +++ b/test/windows/odb/all @@ -9,7 +9,7 @@ function error () function usage () { - error "usage: $0 vc-version conf plat [action]" + error "usage: $0 vc-version database conf plat [action]" error " valid configurations are: {Debug,Release}|all" error " valid platforms are: {Win32,x64}|all" error " valid actions are: /Build (default), /Clean, and /Rebuild" @@ -22,30 +22,40 @@ if [ "$1" = "" ]; then fi if [ "$2" = "" ]; then - error configuration expected + error database expected usage exit 1 +else + if [ "$2" = "all" ]; then + databases="sqlite mysql" + else + databases=$2 + fi fi if [ "$3" = "" ]; then + error configuration expected + usage + exit 1 +fi + +if [ "$4" = "" ]; then error platform expected usage exit 1 fi -action=$4 +action=$5 if [ "$action" == "" ]; then action=/Build fi -databases="mysql" - for d in $databases; do - cmd.exe /C setenv.bat build.bat "$d" "$1" "$2" "$3" "$action" - cd odb-tests + cmd.exe /C setenv.bat build.bat "$d" "$1" "$3" "$4" "$action" + cd odb-tests-$d cmd.exe /C ..\\setenv.bat test.bat "$d" cd .. - cd odb-examples + cd odb-examples-$d cmd.exe /C ..\\setenv.bat test.bat "$d" cd .. done diff --git a/test/windows/odb/build.bat b/test/windows/odb/build.bat index 8b1667b..93d9251 100755 --- a/test/windows/odb/build.bat +++ b/test/windows/odb/build.bat @@ -83,33 +83,37 @@ if not "_%failed%_" == "__" goto error for %%c in (%confs%) do ( for %%p in (%plats%) do ( - call :run_build odb-examples/examples-%1-vc%vcver%.sln %%c %%p + call :run_build odb-examples-%1/examples-%1-vc%vcver%.sln %%c %%p ) ) if not "_%failed%_" == "__" goto error -for %%c in (%confs%) do ( - for %%p in (%plats%) do ( - call :run_build odb-examples/boost/boost-%1-vc%vcver%.sln %%c %%p - ) -) +rem @@ enable +rem +rem for %%c in (%confs%) do ( +rem for %%p in (%plats%) do ( +rem call :run_build odb-examples-%1/boost/boost-%1-vc%vcver%.sln %%c %%p +rem ) +rem ) if not "_%failed%_" == "__" goto error -cd odb-tests +cd odb-tests-%1 call build.bat %1 %2 %3 %4 %action% if errorlevel 1 ( cd .. goto error ) -cd boost -call build.bat %1 %2 %3 %4 %action% -if errorlevel 1 ( - cd ..\.. - goto error -) +rem @@ enable +rem +rem cd boost +rem call build.bat %1 %2 %3 %4 %action% +rem if errorlevel 1 ( +rem cd ..\.. +rem goto error +rem ) echo. echo ALL BUILDS SUCCEEDED diff --git a/test/windows/odb/setenv.bat b/test/windows/odb/setenv.bat index 91ea40a..b266f45 100755 --- a/test/windows/odb/setenv.bat +++ b/test/windows/odb/setenv.bat @@ -3,10 +3,11 @@ set ODB=c:\projects\odb set MYSQL=c:\projects\mysql set MYSQL64=c:\projects\mysql64 +set SQLITE=c:\projects\sqlite set "DIFF=c:\cygwin\bin\diff.exe -ubB" 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-mysql\bin;%ODB%\libodb-tracer\bin;%ODB%\libodb-boost\bin;%MYSQL%\bin;%PATH% -set PATH=%ODB%\odb-tests\libcommon\bin64;%ODB%\libodb\bin64;%ODB%\libodb-mysql\bin64;%ODB%\libodb-tracer\bin64;%ODB%\libodb-boost\bin64;%MYSQL64%\bin;%PATH% +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;%MYSQL%\bin;%SQLITE%\bin;%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;%MYSQL64%\bin;%SQLITE%\bin64;%PATH% if "_%1_" == "__" goto end diff --git a/test/windows/odb/sqlite-driver.bat b/test/windows/odb/sqlite-driver.bat new file mode 100644 index 0000000..bfc3acb --- /dev/null +++ b/test/windows/odb/sqlite-driver.bat @@ -0,0 +1 @@ +rem dummy diff --git a/test/windows/odb/sqlite.options b/test/windows/odb/sqlite.options new file mode 100644 index 0000000..98ded5c --- /dev/null +++ b/test/windows/odb/sqlite.options @@ -0,0 +1 @@ +--database 'c:\projects\odb\odb_test.db' diff --git a/test/windows/odb/unpack b/test/windows/odb/unpack index 5aaf68f..8e1c180 100755 --- a/test/windows/odb/unpack +++ b/test/windows/odb/unpack @@ -8,8 +8,10 @@ function error () } base=/cygdrive/t/pack +databases="sqlite mysql" -rm -rf libodb libodb-mysql libodb-tracer libodb-boost odb odb-tests odb-examples +rm -rf libodb libodb-sqlite libodb-mysql libodb-tracer libodb-boost \ +odb odb-tests-* odb-examples-* v=`echo $base/libodb-?.*.zip | sed -e "s%$base/libodb-\(.*\).zip%\1%"` @@ -21,6 +23,9 @@ mv libodb-$v libodb unzip -q $base/libodb-tracer-$v.zip mv libodb-tracer-$v libodb-tracer +unzip -q $base/libodb-sqlite-$v.zip +mv libodb-sqlite-$v libodb-sqlite + unzip -q $base/libodb-mysql-$v.zip mv libodb-mysql-$v libodb-mysql @@ -28,18 +33,25 @@ unzip -q $base/libodb-boost-$v.zip mv libodb-boost-$v libodb-boost unzip -q $base/odb-tests-$v.zip -mv odb-tests-$v odb-tests +for d in $databases; do + cp -r odb-tests-$v odb-tests-$d +done +rm -r odb-tests-$v unzip -q $base/odb-examples-$v.zip -mv odb-examples-$v odb-examples +for d in $databases; do + cp -r odb-examples-$v odb-examples-$d +done +rm -r odb-examples-$v unzip -q $base/odb-$v-i686-windows.zip mv odb-$v-i686-windows odb cp default.options odb/etc/odb/ -cp mysql.options odb-tests/ -cp mysql-driver.bat odb-tests/ - -cp mysql.options odb-examples/ -cp mysql-driver.bat odb-examples/ +for d in $databases; do + cp $d.options odb-tests-$d/ + cp $d-driver.bat odb-tests-$d/ + cp $d.options odb-examples-$d/ + cp $d-driver.bat odb-examples-$d/ +done |