Make upgradecheck a no-op in MSVC's vcregress.pl
authorMichael Paquier <michael@paquier.xyz>
Sat, 2 Apr 2022 03:06:11 +0000 (12:06 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sat, 2 Apr 2022 03:06:11 +0000 (12:06 +0900)
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

.cirrus.yml
doc/src/sgml/install-windows.sgml
src/tools/msvc/vcregress.pl

index 7b883b462a8234dd7d5744cfd68ef8af7234f811..f23d6cae5527a67b2f08ad174d7cd2621fddc86f 100644 (file)
@@ -443,8 +443,6 @@ task:
     %T_C% perl src/tools/msvc/vcregress.pl recoverycheck
   test_bin_script: |
     %T_C% perl src/tools/msvc/vcregress.pl bincheck
-  test_pg_upgrade_script: |
-    %T_C% perl src/tools/msvc/vcregress.pl upgradecheck
   test_ecpg_script: |
     rem tries to build additional stuff
     vcvarsall x64
index 43d05bde4ec03783c73d14b5a65d239bc42f9a89..18101e7a701b9c58602850f473eeb469f5491491 100644 (file)
@@ -470,7 +470,6 @@ $ENV{CONFIG}="Debug";
 <userinput>vcregress isolationcheck</userinput>
 <userinput>vcregress bincheck</userinput>
 <userinput>vcregress recoverycheck</userinput>
-<userinput>vcregress upgradecheck</userinput>
 </screen>
 
    To change the schedule used (default is parallel), append it to the
index e896820ac5f7ce3d5b24dd3d92875b380557f2ac..fc7aa8b9a37b32edfc221e177944420ca8a95888 100644 (file)
@@ -106,7 +106,7 @@ my %command = (
        ISOLATIONCHECK => \&isolationcheck,
        BINCHECK       => \&bincheck,
        RECOVERYCHECK  => \&recoverycheck,
-       UPGRADECHECK   => \&upgradecheck,
+       UPGRADECHECK   => \&upgradecheck,     # no-op
        TAPTEST        => \&taptest,);
 
 my $proc = $command{$what};
@@ -286,9 +286,6 @@ sub bincheck
        foreach my $dir (@bin_dirs)
        {
                next unless -d "$dir/t";
-               # Do not consider pg_upgrade, as it is handled by
-               # upgradecheck.
-               next if ($dir =~ "/pg_upgrade/");
 
                my $status = tap_check($dir);
                $mstat ||= $status;
@@ -498,31 +495,11 @@ sub quote_system_arg
        return "\"$arg\"";
 }
 
-# Generate a database with a name made of a range of ASCII characters, useful
-# for testing pg_upgrade.
-sub generate_db
-{
-       my ($prefix, $from_char, $to_char, $suffix) = @_;
-
-       my $dbname = $prefix;
-       for my $i ($from_char .. $to_char)
-       {
-               next if $i == 7 || $i == 10 || $i == 13;    # skip BEL, LF, and CR
-               $dbname = $dbname . sprintf('%c', $i);
-       }
-       $dbname .= $suffix;
-
-       system('createdb', quote_system_arg($dbname));
-       my $status = $? >> 8;
-       exit $status if $status;
-       return;
-}
-
 sub upgradecheck
 {
-       InstallTemp();
-       my $mstat = tap_check("$topdir/src/bin/pg_upgrade");
-       exit $mstat if $mstat;
+       # pg_upgrade is now handled by bincheck, but keep this target for
+       # backward compatibility.
+       print "upgradecheck is a no-op, use bincheck instead.\n";
        return;
 }
 
@@ -640,7 +617,7 @@ sub usage
          "  plcheck        run tests of PL languages\n",
          "  recoverycheck  run recovery test suite\n",
          "  taptest        run an arbitrary TAP test set\n",
-         "  upgradecheck   run tests of pg_upgrade\n",
+         "  upgradecheck   run tests of pg_upgrade (no-op)\n",
          "\nOptions for <arg>: (used by check and installcheck)\n",
          "  serial         serial mode\n",
          "  parallel       parallel mode\n",