Fix the test 005_char_signedness.
authorMasahiko Sawada <[email protected]>
Tue, 18 Mar 2025 04:34:10 +0000 (21:34 -0700)
committerMasahiko Sawada <[email protected]>
Tue, 18 Mar 2025 04:34:10 +0000 (21:34 -0700)
pg_upgrade test 005_char_signedness was leaving files like
delete_old_cluster.sh in the source directory for VPATH and meson
builds. The fix is to change the directory to tmp_check before running
the test.

Reported-by: Robert Haas <[email protected]>
Reviewed-by: Robert Haas <[email protected]>
Discussion: http://postgr.es/m/CA+TgmoYg5e4oznn0XGoJ3+mceG1qe_JJt34rF2JLwvGS5T1hgQ@mail.gmail.com

src/bin/pg_upgrade/t/005_char_signedness.pl

index 0190747758c86617deb40ad0297a15ec738cfcb7..17fa0d48b15c18bfa675024383e06b45575e9583 100644 (file)
@@ -45,6 +45,11 @@ command_like(
    qr/Default char data signedness:\s+unsigned/,
    'updated default char signedness is unsigned in control file');
 
+# In a VPATH build, we'll be started in the source directory, but we want
+# to run pg_upgrade in the build directory so that any files generated finish
+# in it, like delete_old_cluster.{sh,bat}.
+chdir ${PostgreSQL::Test::Utils::tmp_check};
+
 # Cannot use --set-char-signedness option for upgrading from v18+
 command_checks_all(
    [