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
44SETLOCAL
55SET STARTDIR = %CD%
@@ -9,6 +9,7 @@ if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
99set what =
1010if /I " %1 " == " check" SET what = CHECK
1111if /I " %1 " == " installcheck" SET what = INSTALLCHECK
12+ if /I " %1 " == " plcheck" SET what = PLCHECK
1213if " %what% " == " " goto usage
1314
1415SET CONFIG = Debug
@@ -30,6 +31,7 @@ SET PERL5LIB=..\..\tools\msvc
3031
3132if " %what% " == " INSTALLCHECK" ..\..\..\%CONFIG% \pg_regress\pg_regress --psqldir=..\..\..\%CONFIG% \psql --schedule=%SCHEDULE% _schedule --multibyte=SQL_ASCII --load-language=plpgsql --no-locale
3233if " %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
3335SET E = %ERRORLEVEL%
3436
3537cd %STARTDIR%
@@ -38,3 +40,32 @@ exit /b %E%
3840:usage
3941echo " Usage: vcregress <check|installcheck> [schedule]"
4042goto :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