Skip to content

Commit e8a85e6

Browse files
committed
Add support for running regression tests on procedural languages
1 parent 3c5d5f0 commit e8a85e6

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

src/tools/msvc/vcregress.bat

Lines changed: 32 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.4 2007/03/21 15:39:03 mha Exp $
2+
REM $PostgreSQL: pgsql/src/tools/msvc/vcregress.bat,v 1.5 2007/03/21 16:21:40 mha Exp $
33

44
SETLOCAL
55
SET STARTDIR=%CD%
@@ -9,6 +9,7 @@ if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
99
set what=
1010
if /I "%1"=="check" SET what=CHECK
1111
if /I "%1"=="installcheck" SET what=INSTALLCHECK
12+
if /I "%1"=="plcheck" SET what=PLCHECK
1213
if "%what%"=="" goto usage
1314

1415
SET CONFIG=Debug
@@ -30,6 +31,7 @@ SET PERL5LIB=..\..\tools\msvc
3031

3132
if "%what%"=="INSTALLCHECK" ..\..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\..\%CONFIG%\psql --schedule=%SCHEDULE%_schedule --multibyte=SQL_ASCII --load-language=plpgsql --no-locale
3233
if "%what%"=="CHECK" ..\..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\..\%CONFIG%\psql --schedule=%SCHEDULE%_schedule --multibyte=SQL_ASCII --load-language=plpgsql --no-locale --temp-install=./tmp_check --top-builddir=%TOPDIR% --temp-port=%TEMPPORT%
34+
if "%what%"=="PLCHECK" call :plcheck
3335
SET E=%ERRORLEVEL%
3436

3537
cd %STARTDIR%
@@ -38,3 +40,32 @@ exit /b %E%
3840
:usage
3941
echo "Usage: vcregress <check|installcheck> [schedule]"
4042
goto :eof
43+
44+
45+
REM Check procedural languages
46+
REM Some workarounds due to inconsistently named directories
47+
:plcheck
48+
cd ..\..\PL
49+
FOR /D %%d IN (*) do if exist %%d\sql if exist %%d\expected (
50+
if exist ..\..\%CONFIG%\%%d call :oneplcheck %%d
51+
if errorlevel 1 exit /b 1
52+
if exist ..\..\%CONFIG%\pl%%d call :oneplcheck %%d
53+
if errorlevel 1 exit /b 1
54+
)
55+
goto :eof
56+
57+
REM Check a single procedural language
58+
:oneplcheck
59+
echo Checking %1
60+
cd %1
61+
SET PL=%1
62+
IF %PL%==plpython SET PL=plpythonu
63+
IF %PL%==tcl SET PL=pltcl
64+
65+
perl ../../tools/msvc/getregress.pl > regress.tmp.bat
66+
call regress.tmp.bat
67+
del regress.tmp.bat
68+
..\..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\..\%CONFIG%\psql --no-locale --load-language=%PL% %TESTS%
69+
set E=%ERRORLEVEL%
70+
cd ..
71+
exit /b %E%

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy