Support for running contribcheck on msvc

This commit is contained in:
Magnus Hagander 2007-03-23 09:57:55 +00:00
parent e69f7f450c
commit 3024b0aa94
2 changed files with 30 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.35 2007/03/21 19:22:52 mha Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.36 2007/03/23 09:57:55 mha Exp $ -->
<chapter id="install-win32">
<title>Installation on <productname>Windows</productname></title>
@ -269,6 +269,9 @@
<userinput>
vcregress plcheck
</userinput>
<userinput>
vcregress contribcheck
</userinput>
</screen>
To change the schedule used (default is the parallel), append it to the

View File

@ -1,5 +1,5 @@
@echo off
REM $PostgreSQL: pgsql/src/tools/msvc/vcregress.bat,v 1.5 2007/03/21 16:21:40 mha Exp $
REM $PostgreSQL: pgsql/src/tools/msvc/vcregress.bat,v 1.6 2007/03/23 09:57:55 mha Exp $
SETLOCAL
SET STARTDIR=%CD%
@ -10,6 +10,7 @@ set what=
if /I "%1"=="check" SET what=CHECK
if /I "%1"=="installcheck" SET what=INSTALLCHECK
if /I "%1"=="plcheck" SET what=PLCHECK
if /I "%1"=="contribcheck" SET what=CONTRIBCHECK
if "%what%"=="" goto usage
SET CONFIG=Debug
@ -19,7 +20,7 @@ copy %CONFIG%\refint\refint.dll contrib\spi\
copy %CONFIG%\autoinc\autoinc.dll contrib\spi\
copy %CONFIG%\regress\regress.dll src\test\regress\
SET PATH=..\..\..\%CONFIG%\libpq;%PATH%
SET PATH=..\..\..\%CONFIG%\libpq;..\..\%CONFIG%\libpq;%PATH%
SET TOPDIR=%CD%
cd src\test\regress
@ -32,6 +33,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%"=="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
if "%what%"=="CONTRIBCHECK" call :contribcheck
SET E=%ERRORLEVEL%
cd %STARTDIR%
@ -69,3 +71,25 @@ del regress.tmp.bat
set E=%ERRORLEVEL%
cd ..
exit /b %E%
REM Check contrib modules
:contribcheck
cd ..\..\..\contrib
for /d %%d IN (*) do if exist %%d\sql if exist %%d\expected (
call :onecontribcheck %%d
if errorlevel 1 exit /b 1
)
goto :eof
REM Check a single contrib module
:onecontribcheck
cd %1
perl ../../src/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 --dbname=contrib_regression %TESTS%
set E=%ERRORLEVEL%
cd ..
exit /b %E%