2 REM $PostgreSQL: pgsql/src/tools/msvc/vcregress.bat,v 1.7 2007/04/04 20:53:44 adunstan Exp $
6 if exist ..\..\..\src\tools\msvc\vcregress.bat cd ..\..\..
7 if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
10 if /I "%1"=="check" SET what=CHECK
11 if /I "%1"=="installcheck" SET what=INSTALLCHECK
12 if /I "%1"=="plcheck" SET what=PLCHECK
13 if /I "%1"=="contribcheck" SET what=CONTRIBCHECK
14 if "%what%"=="" goto usage
17 if exist release\postgres\postgres.exe SET CONFIG=Release
19 copy %CONFIG%\refint\refint.dll contrib\spi\
20 copy %CONFIG%\autoinc\autoinc.dll contrib\spi\
21 copy %CONFIG%\regress\regress.dll src\test\regress\
23 SET PATH=..\..\..\%CONFIG%\libpq;..\..\%CONFIG%\libpq;%PATH%
29 IF NOT "%2"=="" SET SCHEDULE=%2
31 SET PERL5LIB=..\..\tools\msvc
33 if "%what%"=="INSTALLCHECK" ..\..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\..\%CONFIG%\psql --schedule=%SCHEDULE%_schedule --multibyte=SQL_ASCII --load-language=plpgsql --no-locale
34 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%
35 if "%what%"=="PLCHECK" call :plcheck
36 if "%what%"=="CONTRIBCHECK" call :contribcheck
43 echo "Usage: vcregress <check|installcheck> [schedule]"
47 REM Check procedural languages
48 REM Some workarounds due to inconsistently named directories
51 FOR /D %%d IN (*) do if exist %%d\sql if exist %%d\expected (
52 if exist ..\..\%CONFIG%\%%d call :oneplcheck %%d
53 if errorlevel 1 exit /b 1
54 if exist ..\..\%CONFIG%\pl%%d call :oneplcheck %%d
55 if errorlevel 1 exit /b 1
59 REM Check a single procedural language
61 echo ==========================================================================
65 IF %PL%==plpython SET PL=plpythonu
66 IF %PL%==tcl SET PL=pltcl
68 perl ../../tools/msvc/getregress.pl > regress.tmp.bat
71 ..\..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\..\%CONFIG%\psql --no-locale --load-language=%PL% %TESTS%
77 REM Check contrib modules
80 for /d %%d IN (*) do if exist %%d\sql if exist %%d\expected (
81 call :onecontribcheck %%d
82 if errorlevel 1 exit /b 1
86 REM Check a single contrib module
90 echo ==========================================================================
92 perl ../../src/tools/msvc/getregress.pl > regress.tmp.bat
95 ..\..\%CONFIG%\pg_regress\pg_regress --psqldir=..\..\%CONFIG%\psql --no-locale --dbname=contrib_regression %TESTS%