Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Commiteb01063

Browse files
committed
Enable transforms tests for python 2 on MSVC builds
Currently regression tests for python 3 are disabled on MSVC, and thesetests fail with python 3, too, so we have some work to do to enableboth. Meanwhile, all the buildfarm hosts seem to be building with python2 anyway, so this at least gets us some coverage.Original patch from Michael Paquier, significantly modified by me.
1 parent5aa2350 commiteb01063

File tree

1 file changed

+38
-4
lines changed

1 file changed

+38
-4
lines changed

‎src/tools/msvc/vcregress.pl

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,46 @@ sub subdircheck
238238
{
239239
return;
240240
}
241+
241242
chdir$module;
243+
my@tests = fetchTests();
244+
my@opts = fetchRegressOpts();
245+
246+
# Add some options for transform modules, see their respective
247+
# Makefile for more details regarding Python-version specific
248+
# dependencies.
249+
if ($moduleeq"hstore_plpython" ||
250+
$moduleeq"ltree_plpython")
251+
{
252+
die"Python not enabled in configuration"
253+
if !defined($config->{python});
254+
255+
# Attempt to get python version and location.
256+
# Assume python.exe in specified dir.
257+
my$pythonprog ="import sys;" .
258+
"print(str(sys.version_info[0]))";
259+
my$prefixcmd =$config->{python}
260+
."\\python -c\"$pythonprog\"";
261+
my$pyver =`$prefixcmd`;
262+
die"Could not query for python version!\n"if$?;
263+
chomp($pyver);
264+
if ($pyvereq"2")
265+
{
266+
push@opts,"--load-extension=plpythonu";
267+
push@opts,'--load-extension=' .$module .'u';
268+
}
269+
else
270+
{
271+
# disable tests on python3 for now.
272+
chdir"..";
273+
return;
274+
}
275+
}
276+
277+
242278
print
243279
"============================================================\n";
244280
print"Checking$module\n";
245-
my@tests = fetchTests();
246-
my@opts = fetchRegressOpts();
247281
my@args = (
248282
"${tmp_installdir}/bin/pg_regress",
249283
"--bindir=${tmp_installdir}/bin",
@@ -266,8 +300,8 @@ sub contribcheck
266300
nextif ($moduleeq"sslinfo" && !defined($config->{openssl}));
267301
nextif ($moduleeq"xml2" && !defined($config->{xml}));
268302
nextif ($moduleeq"hstore_plperl" && !defined($config->{perl}));
269-
nextif ($moduleeq"hstore_plpython");
270-
nextif ($moduleeq"ltree_plpython");
303+
nextif ($moduleeq"hstore_plpython" && !defined($config->{python}));
304+
nextif ($moduleeq"ltree_plpython" && !defined($config->{python}));
271305
nextif ($moduleeq"sepgsql");
272306

273307
subdircheck("$topdir/contrib",$module);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp