summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorAndres Freund2022-03-08 02:19:56 +0000
committerAndres Freund2022-03-08 02:20:51 +0000
commitdb23464715f4792298c639153dda7bfd9ad9d602 (patch)
tree57db9275a7ea3b84fab2d8c65153710e9465465a /src/tools
parent76a29adee749f41e277459cbf2e47a2ff7777f31 (diff)
plpython: Remove regression test infrastructure for Python 2.
Since 19252e8ec93 we reject Python 2 during build configuration. Now that the dust on the buildfarm has settled, remove regression testing infrastructure dealing with differing output between Python 2 / 3. Reviewed-By: Peter Eisentraut <peter@eisentraut.org> Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/20211031184548.g4sxfe47n2kyi55r@alap3.anarazel.de
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/msvc/vcregress.pl76
1 files changed, 1 insertions, 75 deletions
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index e2b0db0879b..625f6fb88ae 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -314,55 +314,6 @@ sub taptest
return;
}
-sub mangle_plpython3
-{
- my $tests = shift;
- mkdir "results" unless -d "results";
- mkdir "sql/python3";
- mkdir "results/python3";
- mkdir "expected/python3";
-
- foreach my $test (@$tests)
- {
- local $/ = undef;
- foreach my $dir ('sql', 'expected')
- {
- my $extension = ($dir eq 'sql' ? 'sql' : 'out');
-
- my @files =
- glob("$dir/$test.$extension $dir/${test}_[0-9].$extension");
- foreach my $file (@files)
- {
- open(my $handle, '<', $file)
- || die "test file $file not found";
- my $contents = <$handle>;
- close($handle);
- do
- {
- s/<type 'exceptions\.([[:alpha:]]*)'>/<class '$1'>/g;
- s/<type 'long'>/<class 'int'>/g;
- s/([0-9][0-9]*)L/$1/g;
- s/([ [{])u"/$1"/g;
- s/([ [{])u'/$1'/g;
- s/def next/def __next__/g;
- s/LANGUAGE plpython2?u/LANGUAGE plpython3u/g;
- s/EXTENSION (\S*?)plpython2?u/EXTENSION $1plpython3u/g;
- s/installing required extension "plpython2u"/installing required extension "plpython3u"/g;
- }
- for ($contents);
- my $base = basename $file;
- open($handle, '>', "$dir/python3/$base")
- || die "opening python 3 file for $file";
- print $handle $contents;
- close($handle);
- }
- }
- }
- do { s!^!python3/!; }
- foreach (@$tests);
- return @$tests;
-}
-
sub plcheck
{
chdir "$topdir/src/pl";
@@ -386,8 +337,7 @@ sub plcheck
if ($lang eq 'plpython')
{
next
- unless -d "$topdir/$Config/plpython2"
- || -d "$topdir/$Config/plpython3";
+ unless -d "$topdir/$Config/plpython3";
$lang = 'plpythonu';
}
else
@@ -397,8 +347,6 @@ sub plcheck
my @lang_args = ("--load-extension=$lang");
chdir $dir;
my @tests = fetchTests();
- @tests = mangle_plpython3(\@tests)
- if $lang eq 'plpythonu' && -d "$topdir/$Config/plpython3";
if ($lang eq 'plperl')
{
@@ -462,28 +410,6 @@ sub subdircheck
my @opts = fetchRegressOpts();
- # Special processing for python transform modules, see their respective
- # Makefiles for more details regarding Python-version specific
- # dependencies.
- if ($module =~ /_plpython$/)
- {
- die "Python not enabled in configuration"
- if !defined($config->{python});
-
- @opts = grep { $_ !~ /plpythonu/ } @opts;
-
- if (-d "$topdir/$Config/plpython2")
- {
- push @opts, "--load-extension=plpythonu";
- push @opts, '--load-extension=' . $module . 'u';
- }
- else
- {
- # must be python 3
- @tests = mangle_plpython3(\@tests);
- }
- }
-
print "============================================================\n";
print "Checking $module\n";
my @args = (