]> granicus.if.org Git - postgresql/commitdiff
Add script to run regression tests under vc++ without mingw. Update
authorMagnus Hagander <magnus@hagander.net>
Tue, 13 Feb 2007 15:36:32 +0000 (15:36 +0000)
committerMagnus Hagander <magnus@hagander.net>
Tue, 13 Feb 2007 15:36:32 +0000 (15:36 +0000)
clean script to properly clean up the result of it.

src/tools/msvc/clean.bat
src/tools/msvc/vcregress.bat [new file with mode: 0644]

index a1dd09ac47735f976793a87ba6196f4f75af50e4..08c195429c52235718da79f3cce6be633d363028 100755 (executable)
@@ -45,6 +45,10 @@ call :del contrib\cube\cubeparse.h
 call :del contrib\seg\segparse.c
 call :del contrib\seg\segparse.h
 
+if exist src\test\regress\tmp_check rd /s /q src\test\regress\tmp_check
+call :del contrib\spi\refint.dll
+call :del contrib\spi\autoinc.dll
+call :del src\test\regress\regress.dll
 
 cd %D%
 goto :eof
diff --git a/src/tools/msvc/vcregress.bat b/src/tools/msvc/vcregress.bat
new file mode 100644 (file)
index 0000000..c895449
--- /dev/null
@@ -0,0 +1,35 @@
+@echo off
+SETLOCAL
+SET STARTDIR=%CD%
+if exist ..\..\..\src\tools\msvc\vcregress.bat cd ..\..\..
+if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
+
+set what=
+if /I "%1"=="check" SET what=CHECK
+if /I "%1"=="installcheck" SET what=INSTALLCHECK
+if "%what%"=="" goto usage
+
+SET CONFIG=Debug
+if exist release\postgres\postgres.exe SET CONFIG=Release
+
+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 TOPDIR=%CD%
+cd src\test\regress
+SET SCHEDULE=parallel
+SET TEMPPORT=54321
+IF NOT "%2"=="" SET SCHEDULE=%2
+
+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%
+
+cd %STARTDIR%
+goto :eof
+
+:usage
+echo "Usage: vcregress <check|installcheck> [schedule]"
+goto :eof