Skip to content

Commit d2a2ce4

Browse files
committed
Make upgradecheck a no-op in MSVC's vcregress.pl
322becb has changed upgradecheck to use the TAP tests, discarding pg_upgrade's tests in bincheck. However, this is proving to be a bad idea for the Windows buildfarm clients that use MSVC when TAP tests are disabled as this causes a hard failure at the pg_upgrade step. This commit disables upgradecheck, moving the execution of the tests of pg_upgrade to bincheck, as per an initial suggestion from Andres Freund, so as the buildfarm is able to live happily with those changes. While on it, remove the routine that was used by upgradecheck to create databases whose names are generated with a range of ASCII characters as it is not used since 322becb. upgradecheck is removed from the CI script for Windows, as bincheck takes care of that now. Per report from buildfarm member hamerkop (MSVC 2017 without a TAP setup). Reviewed-by: Justin Pryzby Discussion: https://postgr.es/m/YkbnpriYEAagZ2wH@paquier.xyz
1 parent d43085d commit d2a2ce4

File tree

3 files changed

+5
-31
lines changed

3 files changed

+5
-31
lines changed

.cirrus.yml

-2
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,6 @@ task:
443443
%T_C% perl src/tools/msvc/vcregress.pl recoverycheck
444444
test_bin_script: |
445445
%T_C% perl src/tools/msvc/vcregress.pl bincheck
446-
test_pg_upgrade_script: |
447-
%T_C% perl src/tools/msvc/vcregress.pl upgradecheck
448446
test_ecpg_script: |
449447
rem tries to build additional stuff
450448
vcvarsall x64

doc/src/sgml/install-windows.sgml

-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ $ENV{CONFIG}="Debug";
470470
<userinput>vcregress isolationcheck</userinput>
471471
<userinput>vcregress bincheck</userinput>
472472
<userinput>vcregress recoverycheck</userinput>
473-
<userinput>vcregress upgradecheck</userinput>
474473
</screen>
475474

476475
To change the schedule used (default is parallel), append it to the

src/tools/msvc/vcregress.pl

+5-28
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
ISOLATIONCHECK => \&isolationcheck,
107107
BINCHECK => \&bincheck,
108108
RECOVERYCHECK => \&recoverycheck,
109-
UPGRADECHECK => \&upgradecheck,
109+
UPGRADECHECK => \&upgradecheck, # no-op
110110
TAPTEST => \&taptest,);
111111

112112
my $proc = $command{$what};
@@ -286,9 +286,6 @@ sub bincheck
286286
foreach my $dir (@bin_dirs)
287287
{
288288
next unless -d "$dir/t";
289-
# Do not consider pg_upgrade, as it is handled by
290-
# upgradecheck.
291-
next if ($dir =~ "/pg_upgrade/");
292289

293290
my $status = tap_check($dir);
294291
$mstat ||= $status;
@@ -498,31 +495,11 @@ sub quote_system_arg
498495
return "\"$arg\"";
499496
}
500497

501-
# Generate a database with a name made of a range of ASCII characters, useful
502-
# for testing pg_upgrade.
503-
sub generate_db
504-
{
505-
my ($prefix, $from_char, $to_char, $suffix) = @_;
506-
507-
my $dbname = $prefix;
508-
for my $i ($from_char .. $to_char)
509-
{
510-
next if $i == 7 || $i == 10 || $i == 13; # skip BEL, LF, and CR
511-
$dbname = $dbname . sprintf('%c', $i);
512-
}
513-
$dbname .= $suffix;
514-
515-
system('createdb', quote_system_arg($dbname));
516-
my $status = $? >> 8;
517-
exit $status if $status;
518-
return;
519-
}
520-
521498
sub upgradecheck
522499
{
523-
InstallTemp();
524-
my $mstat = tap_check("$topdir/src/bin/pg_upgrade");
525-
exit $mstat if $mstat;
500+
# pg_upgrade is now handled by bincheck, but keep this target for
501+
# backward compatibility.
502+
print "upgradecheck is a no-op, use bincheck instead.\n";
526503
return;
527504
}
528505

@@ -640,7 +617,7 @@ sub usage
640617
" plcheck run tests of PL languages\n",
641618
" recoverycheck run recovery test suite\n",
642619
" taptest run an arbitrary TAP test set\n",
643-
" upgradecheck run tests of pg_upgrade\n",
620+
" upgradecheck run tests of pg_upgrade (no-op)\n",
644621
"\nOptions for <arg>: (used by check and installcheck)\n",
645622
" serial serial mode\n",
646623
" parallel parallel mode\n",

0 commit comments

Comments
 (0)