mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Add support for running regression tests on procedural languages
This commit is contained in:
parent
3c5d5f070a
commit
e8a85e6f84
@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
REM $PostgreSQL: pgsql/src/tools/msvc/vcregress.bat,v 1.4 2007/03/21 15:39:03 mha Exp $
|
REM $PostgreSQL: pgsql/src/tools/msvc/vcregress.bat,v 1.5 2007/03/21 16:21:40 mha Exp $
|
||||||
|
|
||||||
SETLOCAL
|
SETLOCAL
|
||||||
SET STARTDIR=%CD%
|
SET STARTDIR=%CD%
|
||||||
@ -9,6 +9,7 @@ if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
|
|||||||
set what=
|
set what=
|
||||||
if /I "%1"=="check" SET what=CHECK
|
if /I "%1"=="check" SET what=CHECK
|
||||||
if /I "%1"=="installcheck" SET what=INSTALLCHECK
|
if /I "%1"=="installcheck" SET what=INSTALLCHECK
|
||||||
|
if /I "%1"=="plcheck" SET what=PLCHECK
|
||||||
if "%what%"=="" goto usage
|
if "%what%"=="" goto usage
|
||||||
|
|
||||||
SET CONFIG=Debug
|
SET CONFIG=Debug
|
||||||
@ -30,6 +31,7 @@ SET PERL5LIB=..\..\tools\msvc
|
|||||||
|
|
||||||
if "%what%"=="INSTALLCHECK" ..\..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\..\%CONFIG%\psql --schedule=%SCHEDULE%_schedule --multibyte=SQL_ASCII --load-language=plpgsql --no-locale
|
if "%what%"=="INSTALLCHECK" ..\..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\..\%CONFIG%\psql --schedule=%SCHEDULE%_schedule --multibyte=SQL_ASCII --load-language=plpgsql --no-locale
|
||||||
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%
|
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%
|
||||||
|
if "%what%"=="PLCHECK" call :plcheck
|
||||||
SET E=%ERRORLEVEL%
|
SET E=%ERRORLEVEL%
|
||||||
|
|
||||||
cd %STARTDIR%
|
cd %STARTDIR%
|
||||||
@ -38,3 +40,32 @@ exit /b %E%
|
|||||||
:usage
|
:usage
|
||||||
echo "Usage: vcregress <check|installcheck> [schedule]"
|
echo "Usage: vcregress <check|installcheck> [schedule]"
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
|
REM Check procedural languages
|
||||||
|
REM Some workarounds due to inconsistently named directories
|
||||||
|
:plcheck
|
||||||
|
cd ..\..\PL
|
||||||
|
FOR /D %%d IN (*) do if exist %%d\sql if exist %%d\expected (
|
||||||
|
if exist ..\..\%CONFIG%\%%d call :oneplcheck %%d
|
||||||
|
if errorlevel 1 exit /b 1
|
||||||
|
if exist ..\..\%CONFIG%\pl%%d call :oneplcheck %%d
|
||||||
|
if errorlevel 1 exit /b 1
|
||||||
|
)
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
REM Check a single procedural language
|
||||||
|
:oneplcheck
|
||||||
|
echo Checking %1
|
||||||
|
cd %1
|
||||||
|
SET PL=%1
|
||||||
|
IF %PL%==plpython SET PL=plpythonu
|
||||||
|
IF %PL%==tcl SET PL=pltcl
|
||||||
|
|
||||||
|
perl ../../tools/msvc/getregress.pl > regress.tmp.bat
|
||||||
|
call regress.tmp.bat
|
||||||
|
del regress.tmp.bat
|
||||||
|
..\..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\..\%CONFIG%\psql --no-locale --load-language=%PL% %TESTS%
|
||||||
|
set E=%ERRORLEVEL%
|
||||||
|
cd ..
|
||||||
|
exit /b %E%
|
||||||
|
Loading…
x
Reference in New Issue
Block a user