diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-10 11:35:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-10 11:35:20 +0200 |
commit | ed24158b4d247dff58162c97f04cbc4011579600 (patch) | |
tree | 6e9ba4ab126f64af1d710cda804782e158d1c7a0 /tester.bat | |
parent | f8eea05c337019bdc669d786e50d015f0cca14a2 (diff) |
Add automated build and test scripts for Windows
Diffstat (limited to 'tester.bat')
-rw-r--r-- | tester.bat | 44 |
1 files changed, 25 insertions, 19 deletions
@@ -4,51 +4,57 @@ rem author : Boris Kolpackov <boris@codesynthesis.com> rem copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC rem license : GNU GPL v2; see accompanying LICENSE file +rem rem Run an ODB test. The test directory is the current directory. -rem %1 database id, for example, mysql -rem %2 configuration, for example, Debug or x64/Debug +rem +rem %1 database +rem %2 configuration, for example, Debug or Release +rem %3 platform, for example Win32 or x64 rem topdir variable containing the path to top project directory +rem -rem clear errorlevel -rem setlocal & endlocal +setlocal -rem echo %1 -rem echo %2 -rem echo "%topdir%" +set "PATH=%topdir%\libcommon\bin64;%topdir%\libcommon\bin;%PATH%" if "_%DIFF%_" == "__" set DIFF=fc +if "_%3_" == "_Win32_" ( + set "dir=%2" +) else ( + set "dir=%3\%2" +) + if exist test.sql ( - %topdir%\%1-driver test.sql + call %topdir%\%1-driver.bat test.sql if errorlevel 1 goto error ) -rem echo %2\driver.exe --options-file %topdir%\%1.options - if exist test.std ( - %2\driver.exe --options-file %topdir%\%1.options >test.out + %dir%\driver.exe --options-file %topdir%\%1.options >test.out if errorlevel 1 goto error %DIFF% test.std test.out - + if errorlevel 1 ( del /f test.out goto error - ) - - del /f test.out + ) + + del /f test.out goto end - + ) else ( - %2\driver.exe --options-file %topdir%\%1.options + %dir%\driver.exe --options-file %topdir%\%1.options if errorlevel 1 goto error ) goto end - :error +endlocal exit /b 1 -goto end :end +endlocal + |