summaryrefslogtreecommitdiff
path: root/test/windows
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-01 16:14:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-01 16:14:20 +0200
commit6005adc00b2a924922b17cf801eb7c713c520d87 (patch)
tree7bd51ebd97f26e44c4479a1d59b9eea8d463f7cb /test/windows
parent4c13c40aefbd7eb73586a75bd421a8b76661c8d4 (diff)
Add support for building only certain configurations/platforms on Windows
Diffstat (limited to 'test/windows')
-rwxr-xr-xtest/windows/odb/all32
-rwxr-xr-xtest/windows/odb/build.bat39
2 files changed, 55 insertions, 16 deletions
diff --git a/test/windows/odb/all b/test/windows/odb/all
index cef5a67..8eddb09 100755
--- a/test/windows/odb/all
+++ b/test/windows/odb/all
@@ -7,12 +7,33 @@ function error ()
echo "$*" 1>&2
}
+function usage ()
+{
+ error "usage: $0 vc-version 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"
+}
+
if [ "$1" = "" ]; then
- echo vc++ version expected
+ error vc version expected
+ usage
+ exit 1
+fi
+
+if [ "$2" = "" ]; then
+ error configuration expected
+ usage
exit 1
fi
-action=$2
+if [ "$3" = "" ]; then
+ error platform expected
+ usage
+ exit 1
+fi
+
+action=$4
if [ "$action" == "" ]; then
action=/Build
fi
@@ -20,12 +41,11 @@ fi
databases="mysql"
for d in $databases; do
- cmd.exe /C "setenv.bat build.bat $d $1 $action"
+ cmd.exe /C setenv.bat build.bat "$d" "$1" "$2" "$3" "$action"
cd odb-tests
- cmd.exe /C "..\setenv.bat test.bat $d"
+ cmd.exe /C ..\setenv.bat test.bat "$d"
cd ..
cd odb-examples
- cmd.exe /C "..\setenv.bat test.bat $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 b97cf62..8b1667b 100755
--- a/test/windows/odb/build.bat
+++ b/test/windows/odb/build.bat
@@ -5,15 +5,14 @@ rem copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
rem license : GNU GPL v2; see accompanying LICENSE file
rem
-rem build.bat database vc-version [/Build|/Clean|/Rebuild]
+rem build.bat database vc-version conf plat [/Build|/Clean|/Rebuild]
+rem
+rem conf: {Debug,Release}|all
+rem plat: {Win32,x64}|all
rem
setlocal
-set "confs=Debug Release"
-set "plats=Win32 x64"
-set "failed="
-
if "_%1_" == "__" (
echo no database specified
goto usage
@@ -24,6 +23,18 @@ if "_%2_" == "__" (
goto usage
)
+if "_%~3_" == "__" (
+ echo no configuration specified
+ goto usage
+)
+
+if "_%~4_" == "__" (
+ echo no platform specified
+ goto usage
+)
+
+set "failed="
+
if "_%2_" == "_9_" set "vcver=9"
if "_%2_" == "_10_" set "vcver=10"
@@ -32,7 +43,13 @@ if "_%vcver%_" == "__" (
goto usage
)
-set "action=%3"
+set "confs=%~3"
+set "plats=%~4"
+
+if "_%confs%_" == "_all_" set "confs=Debug Release"
+if "_%plats%_" == "_all_" set "plats=Win32 x64"
+
+set "action=%5"
if "_%action%_" == "__" set "action=/Build"
set "devenv=%DEVENV%"
@@ -81,14 +98,14 @@ for %%c in (%confs%) do (
if not "_%failed%_" == "__" goto error
cd odb-tests
-call build.bat %1 %2 %action%
+call build.bat %1 %2 %3 %4 %action%
if errorlevel 1 (
cd ..
goto error
)
cd boost
-call build.bat %1 %2 %action%
+call build.bat %1 %2 %3 %4 %action%
if errorlevel 1 (
cd ..\..
goto error
@@ -101,8 +118,10 @@ goto end
:usage
echo.
-echo usage: build.bat database vc-version [action]
-echo valid actions are /Build, /Clean, and /Rebuild
+echo usage: build.bat database vc-version conf plat [action]
+echo valid configurations are: {Debug,Release}|all
+echo valid platforms are: {Win32,x64}|all
+echo valid actions are: /Build (default), /Clean, and /Rebuild
echo.
:error