11@ echo off
2- REM $PostgreSQL: pgsql/src/tools/msvc/vcregress.bat,v 1.12 2007/06/12 11:07:34 mha Exp $
2+ REM $PostgreSQL: pgsql/src/tools/msvc/vcregress.bat,v 1.13 2007/06/26 11:43:56 mha Exp $
33
44SETLOCAL
55SET STARTDIR = %CD%
@@ -32,6 +32,8 @@ IF NOT "%2"=="" SET SCHEDULE=%2
3232IF " %what% " == " ECPGCHECK" (
3333cd " %STARTDIR% "
3434 msbuild ecpg_regression.proj /p:config=%CONFIG%
35+ REM exit fix for pre-2003 shell especially if used on buildfarm
36+ if " %XP_EXIT_FIX% " == " yes" if errorlevel 1 exit 1
3537if errorlevel 1 exit /b1
3638cd " %TOPDIR% "
3739cd src\interfaces\ecpg\test
@@ -48,6 +50,8 @@ if "%what%"=="CONTRIBCHECK" call :contribcheck
4850SET E = %ERRORLEVEL%
4951
5052cd " %STARTDIR% "
53+ REM exit fix for pre-2003 shell especially if used on buildfarm
54+ if " %XP_EXIT_FIX% " == " yes" exit %E%
5155exit /b%E%
5256
5357:usage
@@ -61,8 +65,11 @@ REM Some workarounds due to inconsistently named directories
6165cd ..\..\PL
6266FOR /D%%d IN (*)do if exist %%d \sqlif exist %%d \expected (
6367if exist ..\..\%CONFIG% \%%d call :oneplcheck %%d
68+ REM exit fix for pre-2003 shell especially if used on buildfarm
69+ if " %XP_EXIT_FIX% " == " yes" if errorlevel 1 exit 1
6470if errorlevel 1 exit /b1
6571if exist ..\..\%CONFIG% \pl%%d call :oneplcheck %%d
72+ if " %XP_EXIT_FIX% " == " yes" if errorlevel 1 exit 1
6673if errorlevel 1 exit /b1
6774)
6875goto :eof
@@ -83,6 +90,8 @@ del regress.tmp.bat
8390..\..\..\%CONFIG% \pg_regress\pg_regress --psqldir=..\..\..\%CONFIG% \psql --no-locale --load-language=%PL% %TESTS%
8491set E = %ERRORLEVEL%
8592cd ..
93+ REM exit fix for pre-2003 shell especially if used on buildfarm
94+ if " %XP_EXIT_FIX% " == " yes" exit %E%
8695exit /b%E%
8796
8897
@@ -94,6 +103,8 @@ for /d %%d IN (*) do if exist %%d\sql if exist %%d\expected if exist %%d\Makefil
94103call :onecontribcheck %%d
95104if errorlevel 1 set CONTRIBERROR = 1
96105)
106+ REM exit fix for pre-2003 shell especially if used on buildfarm
107+ if " %XP_EXIT_FIX% " == " yes" if %CONTRIBERROR% == 1 exit 1
97108if %CONTRIBERROR% == 1 exit /b1
98109goto :eof
99110
@@ -110,4 +121,6 @@ del regress.tmp.bat
110121..\..\%CONFIG% \pg_regress\pg_regress --psqldir=..\..\%CONFIG% \psql --no-locale --dbname=contrib_regression%TESTS%
111122set E = %ERRORLEVEL%
112123cd ..
124+ REM exit fix for pre-2003 shell especially if used on buildfarm
125+ if " %XP_EXIT_FIX% " == " yes" exit %E%
113126exit /b%E%