8000 Build and run isolation test programs under MSVC. · postgrespro/postgres_cluster@840826e · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

10000
Appearance settings

Commit 840826e

Browse files
committed
Build and run isolation test programs under MSVC.
1 parent 9bb6d97 commit 840826e

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

src/tools/msvc/Mkvcbuild.pm

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,28 @@ sub mkvcbuild
272272
$pgregress_ecpg->AddDefine('FRONTEND');
273273
$pgregress_ecpg->AddReference($libpgport);
274274

275+
my $isolation_tester = $solution->AddProject('isolation_tester','exe','misc');
276+
$isolation_tester->AddFile('src\test\isolation\isolationtester.c');
277+
$isolation_tester->AddFile('src\test\isolation\specparse.y');
278+
$isolation_tester->AddFile('src\test\isolation\specscanner.l');
279+
$isolation_tester->AddFile('src\test\isolation\specparse.c');
280+
$isolation_tester->AddIncludeDir('src\test\isolation');
281+
$isolation_tester->AddIncludeDir('src\port');
282+
$isolation_tester->AddIncludeDir('src\test\regress');
283+
$isolation_tester->AddIncludeDir('src\interfaces\libpq');
284+
$isolation_tester->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
285+
$isolation_tester->AddDefine('FRONTEND');
286+
$isolation_tester->AddReference($libpq, $libpgport);
287+
288+
my $pgregress_isolation = $solution->AddProject('pg_isolation_regress','exe','misc');
289+
$pgregress_isolation->AddFile('src\test\isolation\isolation_main.c');
290+
$pgregress_isolation->AddFile('src\test\regress\pg_regress.c');
291+
$pgregress_isolation->AddIncludeDir('src\port');
292+
$pgregress_isolation->AddIncludeDir('src\test\regress');
293+
$pgregress_isolation->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
294+
$pgregress_isolation->AddDefine('FRONTEND');
295+
$pgregress_isolation->AddReference($libpgport);
296+
275297
# src/bin
276298
my $initdb = AddSimpleFrontend('initdb');
277299
$initdb->AddIncludeDir('src\interfaces\libpq');

src/tools/msvc/pgbison.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ if "%1" == "src\backend\parser\gram.y" call :generate %1 src\backend\parser\gram
1919
if "%1" == "src\backend\bootstrap\bootparse.y" call :generate %1 src\backend\bootstrap\bootparse.c
2020
if "%1" == "src\backend\replication\repl_gram.y" call :generate %1 src\backend\replication\repl_gram.c
2121
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
22+
if "%1" == "src\test\isolation\specparse.y" call :generate %1 src\test\isolation\specparse.c
2223
if "%1" == "src\interfaces\ecpg\preproc\preproc.y" call :generate %1 src\interfaces\ecpg\preproc\preproc.c src\interfaces\ecpg\preproc\preproc.h
2324
if "%1" == "contrib\cube\cubeparse.y" call :generate %1 contrib\cube\cubeparse.c
2425
if "%1" == "contrib\seg\segparse.y" call :generate %1 contrib\seg\segparse.c

src/tools/msvc/pgflex.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if "%1" == "src\backend\parser\scan.l" call :generate %1 src\backend\parser\scan
1717
if "%1" == "src\backend\bootstrap\bootscanner.l" call :generate %1 src\backend\bootstrap\bootscanner.c
1818
if "%1" == "src\backend\utils\misc\guc-file.l" call :generate %1 src\backend\utils\misc\guc-file.c
1919
if "%1" == "src\backend\replication\repl_scanner.l" call :generate %1 src\backend\replication\repl_scanner.c
20+
if "%1" == "src\test\isolation\specscanner.l" call :generate %1 src\test\isolation\specscanner.c
2021
if "%1" == "src\interfaces\ecpg\preproc\pgc.l" call :generate %1 src\interfaces\ecpg\preproc\pgc.c
2122
if "%1" == "src\bin\psql\psqlscan.l" call :generate %1 src\bin\psql\psqlscan.c
2223
if "%1" == "contrib\cube\cubescan.l" call :generate %1 contrib\cube\cubescan.c

src/tools/msvc/vcregress.pl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727

2828
my < CE6C span class="pl-smi">$what = shift || "";
29-
if ($what =~ /^(check|installcheck|plcheck|contribcheck|ecpgcheck)$/i)
29+
if ($what =~ /^(check|installcheck|plcheck|contribcheck|ecpgcheck|isolationcheck)$/i)
3030
{
3131
$what = uc $what;
3232
}
@@ -137,6 +137,20 @@ sub ecpgcheck
137137
exit $status if $status;
138138
}
139139

140+
sub isolationcheck
141+
{
142+
chdir "../isolation";
143+
copy("../../../$Config/isolation_tester/isolation_tester.exe",".");
144+
my @args = (
145+
"../../../$Config/pg_isolation_regress/pg_isolation_regress",
146+
"--inputdir=.", "--schedule=./isolation_schedule"
147+
);
148+
push(@args,$maxconn) if $maxconn;
149+
system(@args);
150+
my $status = $? >>8;
151+
exit $status if $status;
152+
}
153+
140154
sub plcheck
141155
{
142156
chdir "../../pl";

0 commit comments

Comments
 (0)
0