Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d1eaa42

Browse files
committed
Add extra checks for buildfarm to pick up errors when running
on XP or earlier versions of Windows. Andrew Dunstan
1 parent a03e8ad commit d1eaa42

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

src/tools/msvc/build.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
2-
REM $PostgreSQL: pgsql/src/tools/msvc/build.bat,v 1.8 2007/04/18 10:14:06 mha Exp $
2+
REM $PostgreSQL: pgsql/src/tools/msvc/build.bat,v 1.9 2007/06/26 11:43:56 mha Exp $
33

44
SETLOCAL
55
SET STARTDIR=%CD%
@@ -32,4 +32,6 @@ SET E=%ERRORLEVEL%
3232

3333
cd %STARTDIR%
3434

35+
REM exit fix for pre-2003 shell especially if used on buildfarm
36+
if "%XP_EXIT_FIX%" == "yes" exit %E%
3537
exit /b %E%

src/tools/msvc/install.bat

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
@echo off
2-
REM $PostgreSQL: pgsql/src/tools/msvc/install.bat,v 1.1 2007/05/01 20:11:14 mha Exp $
2+
REM $PostgreSQL: pgsql/src/tools/msvc/install.bat,v 1.2 2007/06/26 11:43:56 mha Exp $
33

44
if NOT "%1"=="" GOTO RUN_INSTALL
55

66
echo Invalid command line options.
77
echo Usage: "install.bat <path>"
88
echo.
9+
REM exit fix for pre-2003 shell especially if used on buildfarm
10+
if "%XP_EXIT_FIX%" == "yes" exit 1
911
exit /b 1
1012

1113
:RUN_INSTALL
@@ -15,4 +17,6 @@ if exist buildenv.bat call buildenv.bat
1517

1618
perl install.pl "%1"
1719

20+
REM exit fix for pre-2003 shell especially if used on buildfarm
21+
if "%XP_EXIT_FIX%" == "yes" exit %ERRORLEVEL%
1822
exit /b %ERRORLEVEL%

src/tools/msvc/vcregress.bat

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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

44
SETLOCAL
55
SET STARTDIR=%CD%
@@ -32,6 +32,8 @@ IF NOT "%2"=="" SET SCHEDULE=%2
3232
IF "%what%"=="ECPGCHECK" (
3333
cd "%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
3537
if errorlevel 1 exit /b 1
3638
cd "%TOPDIR%"
3739
cd src\interfaces\ecpg\test
@@ -48,6 +50,8 @@ if "%what%"=="CONTRIBCHECK" call :contribcheck
4850
SET E=%ERRORLEVEL%
4951

5052
cd "%STARTDIR%"
53+
REM exit fix for pre-2003 shell especially if used on buildfarm
54+
if "%XP_EXIT_FIX%" == "yes" exit %E%
5155
exit /b %E%
5256

5357
:usage
@@ -61,8 +65,11 @@ REM Some workarounds due to inconsistently named directories
6165
cd ..\..\PL
6266
FOR /D %%d IN (*) do if exist %%d\sql if exist %%d\expected (
6367
if 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
6470
if errorlevel 1 exit /b 1
6571
if exist ..\..\%CONFIG%\pl%%d call :oneplcheck %%d
72+
if "%XP_EXIT_FIX%" == "yes" if errorlevel 1 exit 1
6673
if errorlevel 1 exit /b 1
6774
)
6875
goto :eof
@@ -83,6 +90,8 @@ del regress.tmp.bat
8390
..\..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\..\%CONFIG%\psql --no-locale --load-language=%PL% %TESTS%
8491
set E=%ERRORLEVEL%
8592
cd ..
93+
REM exit fix for pre-2003 shell especially if used on buildfarm
94+
if "%XP_EXIT_FIX%" == "yes" exit %E%
8695
exit /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
94103
call :onecontribcheck %%d
95104
if 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
97108
if %CONTRIBERROR%==1 exit /b 1
98109
goto :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%
111122
set E=%ERRORLEVEL%
112123
cd ..
124+
REM exit fix for pre-2003 shell especially if used on buildfarm
125+
if "%XP_EXIT_FIX%" == "yes" exit %E%
113126
exit /b %E%

0 commit comments

Comments
 (0)