From: Andrew Dunstan Date: Sun, 15 May 2011 21:55:05 +0000 (-0400) Subject: Build and run isolation test programs under MSVC. X-Git-Tag: REL9_1_BETA2~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=840826e36cd40e63a3af05d9b41dc65250bc7a7a;p=postgresql Build and run isolation test programs under MSVC. --- diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 1231f643d6..5d58463a1e 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -272,6 +272,28 @@ sub mkvcbuild $pgregress_ecpg->AddDefine('FRONTEND'); $pgregress_ecpg->AddReference($libpgport); + my $isolation_tester = $solution->AddProject('isolation_tester','exe','misc'); + $isolation_tester->AddFile('src\test\isolation\isolationtester.c'); + $isolation_tester->AddFile('src\test\isolation\specparse.y'); + $isolation_tester->AddFile('src\test\isolation\specscanner.l'); + $isolation_tester->AddFile('src\test\isolation\specparse.c'); + $isolation_tester->AddIncludeDir('src\test\isolation'); + $isolation_tester->AddIncludeDir('src\port'); + $isolation_tester->AddIncludeDir('src\test\regress'); + $isolation_tester->AddIncludeDir('src\interfaces\libpq'); + $isolation_tester->AddDefine('HOST_TUPLE="i686-pc-win32vc"'); + $isolation_tester->AddDefine('FRONTEND'); + $isolation_tester->AddReference($libpq, $libpgport); + + my $pgregress_isolation = $solution->AddProject('pg_isolation_regress','exe','misc'); + $pgregress_isolation->AddFile('src\test\isolation\isolation_main.c'); + $pgregress_isolation->AddFile('src\test\regress\pg_regress.c'); + $pgregress_isolation->AddIncludeDir('src\port'); + $pgregress_isolation->AddIncludeDir('src\test\regress'); + $pgregress_isolation->AddDefine('HOST_TUPLE="i686-pc-win32vc"'); + $pgregress_isolation->AddDefine('FRONTEND'); + $pgregress_isolation->AddReference($libpgport); + # src/bin my $initdb = AddSimpleFrontend('initdb'); $initdb->AddIncludeDir('src\interfaces\libpq'); diff --git a/src/tools/msvc/pgbison.bat b/src/tools/msvc/pgbison.bat index 24963ab2c8..e67b8fcf19 100755 --- a/src/tools/msvc/pgbison.bat +++ b/src/tools/msvc/pgbison.bat @@ -19,6 +19,7 @@ if "%1" == "src\backend\parser\gram.y" call :generate %1 src\backend\parser\gram if "%1" == "src\backend\bootstrap\bootparse.y" call :generate %1 src\backend\bootstrap\bootparse.c if "%1" == "src\backend\replication\repl_gram.y" call :generate %1 src\backend\replication\repl_gram.c if "%1" == "src\pl\plpgsql\src\gram.y" call :generate %1 src\pl\plpgsql\src\pl_gram.c src\pl\plpgsql\src\pl_gram.h +if "%1" == "src\test\isolation\specparse.y" call :generate %1 src\test\isolation\specparse.c if "%1" == "src\interfaces\ecpg\preproc\preproc.y" call :generate %1 src\interfaces\ecpg\preproc\preproc.c src\interfaces\ecpg\preproc\preproc.h if "%1" == "contrib\cube\cubeparse.y" call :generate %1 contrib\cube\cubeparse.c if "%1" == "contrib\seg\segparse.y" call :generate %1 contrib\seg\segparse.c diff --git a/src/tools/msvc/pgflex.bat b/src/tools/msvc/pgflex.bat index 58870f0512..75f4eb9dfe 100755 --- a/src/tools/msvc/pgflex.bat +++ b/src/tools/msvc/pgflex.bat @@ -17,6 +17,7 @@ if "%1" == "src\backend\parser\scan.l" call :generate %1 src\backend\parser\scan if "%1" == "src\backend\bootstrap\bootscanner.l" call :generate %1 src\backend\bootstrap\bootscanner.c if "%1" == "src\backend\utils\misc\guc-file.l" call :generate %1 src\backend\utils\misc\guc-file.c if "%1" == "src\backend\replication\repl_scanner.l" call :generate %1 src\backend\replication\repl_scanner.c +if "%1" == "src\test\isolation\specscanner.l" call :generate %1 src\test\isolation\specscanner.c if "%1" == "src\interfaces\ecpg\preproc\pgc.l" call :generate %1 src\interfaces\ecpg\preproc\pgc.c if "%1" == "src\bin\psql\psqlscan.l" call :generate %1 src\bin\psql\psqlscan.c if "%1" == "contrib\cube\cubescan.l" call :generate %1 contrib\cube\cubescan.c diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 8c920b883a..769f93135b 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -26,7 +26,7 @@ if ( -e "src/tools/msvc/buildenv.pl") } my $what = shift || ""; -if ($what =~ /^(check|installcheck|plcheck|contribcheck|ecpgcheck)$/i) +if ($what =~ /^(check|installcheck|plcheck|contribcheck|ecpgcheck|isolationcheck)$/i) { $what = uc $what; } @@ -137,6 +137,20 @@ sub ecpgcheck exit $status if $status; } +sub isolationcheck +{ + chdir "../isolation"; + copy("../../../$Config/isolation_tester/isolation_tester.exe","."); + my @args = ( + "../../../$Config/pg_isolation_regress/pg_isolation_regress", + "--inputdir=.", "--schedule=./isolation_schedule" + ); + push(@args,$maxconn) if $maxconn; + system(@args); + my $status = $? >>8; + exit $status if $status; +} + sub plcheck { chdir "../../pl";