Skip to content

Commit e4bb915

Browse files
committed
Support preprocessing of atx tests under windows
1 parent 837b196 commit e4bb915

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/tools/msvc/Mkvcbuild.pm

100644100755
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,9 @@ sub mkvcbuild
514514
if (!(defined($pyprefix) && defined($pyver)));
515515

516516
my $pymajorver = substr($pyver, 0, 1);
517+
ProcessTestSubstitutions("python_majorversion",$pymajorver,
518+
"src/test/regress/sql/atx.sql",
519+
"src/test/regress/expected/atx.out");
517520
my $plpython = $solution->AddProject('plpython' . $pymajorver,
518521
'dll', 'PLs', 'src/pl/plpython');
519522
$plpython->AddIncludeDir($pyprefix . '/include');
@@ -983,4 +986,20 @@ sub AdjustModule
983986
}
984987
}
985988

989+
sub ProcessTestSubstitutions {
990+
my $varname = shift;
991+
my $varvalue = shift;
992+
for my $file (@_) {
993+
open IN,"<","${file}.in" or die "${file}.in not found";
994+
open OUT,">",$file;
995+
while (<IN>) {
996+
s/\@$varname\@/$varvalue/g;
997+
print OUT $_;
998+
}
999+
close IN;
1000+
close OUT;
1001+
}
1002+
}
1003+
1004+
9861005
1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy