mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Build and run isolation test programs under MSVC.
This commit is contained in:
parent
9bb6d97952
commit
840826e36c
@ -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');
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user