File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -514,6 +514,9 @@ sub mkvcbuild
514
514
if (!(defined ($pyprefix ) && defined ($pyver )));
515
515
516
516
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" );
517
520
my $plpython = $solution -> AddProject(' plpython' . $pymajorver ,
518
521
' dll' , ' PLs' , ' src/pl/plpython' );
519
522
$plpython -> AddIncludeDir($pyprefix . ' /include' );
@@ -983,4 +986,20 @@ sub AdjustModule
983
986
}
984
987
}
985
988
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
+
986
1005
1;
You can’t perform that action at this time.
0 commit comments