test_extensions: fix inconsistency between meson.build and Makefile

Started by Jeff Davisover 2 years ago5 messages
#1Jeff Davis
pgsql@j-davis.com
1 attachment(s)

Patch attached. Currently, the Makefile specifies NO_LOCALE=1, and the
meson.build does not.

--
Jeff Davis
PostgreSQL Contributor Team - AWS

Attachments:

v1-0001-test_extensions-make-meson.build-consistent-with-.patchtext/x-patch; charset=UTF-8; name=v1-0001-test_extensions-make-meson.build-consistent-with-.patchDownload
From 1775c98badb94a2ee185d7a6bd11482a4e5db58a Mon Sep 17 00:00:00 2001
From: Jeff Davis <jeff@j-davis.com>
Date: Fri, 16 Jun 2023 11:51:00 -0700
Subject: [PATCH v1] test_extensions: make meson.build consistent with
 Makefile.

Specify --no-locale and --encoding=UTF8 to be consistent with the
Makefile, which specifies NO_LOCALE=1.
---
 src/test/modules/test_extensions/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/modules/test_extensions/meson.build b/src/test/modules/test_extensions/meson.build
index 29e5bb2fb5..698775b28d 100644
--- a/src/test/modules/test_extensions/meson.build
+++ b/src/test/modules/test_extensions/meson.build
@@ -47,5 +47,6 @@ tests += {
       'test_extensions',
       'test_extdepend',
     ],
+    'regress_args': ['--no-locale', '--encoding=UTF8'],
   },
 }
-- 
2.34.1

#2Tristan Partin
tristan@neon.tech
In reply to: Jeff Davis (#1)
Re: test_extensions: fix inconsistency between meson.build and Makefile

On Fri Jun 16, 2023 at 3:29 PM CDT, Jeff Davis wrote:

Patch attached. Currently, the Makefile specifies NO_LOCALE=1, and the
meson.build does not.

Looks alright to me, but it might be nicer to change the order of
arguments to match contrib/unaccent/meson.build:40. Might help with
grepping in the future.

--
Tristan Partin
Neon (https://neon.tech)

#3Gurjeet Singh
gurjeet@singh.im
In reply to: Tristan Partin (#2)
1 attachment(s)
Re: test_extensions: fix inconsistency between meson.build and Makefile

On Fri, Jun 16, 2023 at 1:56 PM Tristan Partin <tristan@neon.tech> wrote:

On Fri Jun 16, 2023 at 3:29 PM CDT, Jeff Davis wrote:

Patch attached. Currently, the Makefile specifies NO_LOCALE=1, and the
meson.build does not.

Looks alright to me, but it might be nicer to change the order of
arguments to match contrib/unaccent/meson.build:40. Might help with
grepping in the future.

It seems that Jeff's patch tried to match the precedent set in
src/test/modules/test_oat_hooks/meson.build.

No matter which ordering Jeff's patch uses, it will be inconsistent
with one of the existing order of the options.

So attached is updated patch that makes the order consistent across
all 3 occurrences.

Best regards,
Gurjeet
http://Gurje.et

Attachments:

v2-0001-test_extensions-make-meson.build-consistent-with-.patchapplication/octet-stream; name=v2-0001-test_extensions-make-meson.build-consistent-with-.patchDownload
diff --git a/contrib/unaccent/meson.build b/contrib/unaccent/meson.build
index 284d34ee29..bd629ec090 100644
--- a/contrib/unaccent/meson.build
+++ b/contrib/unaccent/meson.build
@@ -37,6 +37,6 @@ tests += {
     'sql': [
       'unaccent',
     ],
-    'regress_args': ['--encoding=UTF8', '--no-locale'],
+    'regress_args': ['--no-locale', '--encoding=UTF8'],
   },
 }
diff --git a/src/test/modules/test_extensions/meson.build b/src/test/modules/test_extensions/meson.build
index 29e5bb2fb5..698775b28d 100644
--- a/src/test/modules/test_extensions/meson.build
+++ b/src/test/modules/test_extensions/meson.build
@@ -47,5 +47,6 @@ tests += {
       'test_extensions',
       'test_extdepend',
     ],
+    'regress_args': ['--no-locale', '--encoding=UTF8'],
   },
 }
#4Michael Paquier
michael@paquier.xyz
In reply to: Gurjeet Singh (#3)
Re: test_extensions: fix inconsistency between meson.build and Makefile

On Sat, Jun 17, 2023 at 07:40:18AM -0700, Gurjeet Singh wrote:

So attached is updated patch that makes the order consistent across
all 3 occurrences.

There is no need to update unaccent since 44e73a4.

--- a/src/test/modules/test_extensions/meson.build
+++ b/src/test/modules/test_extensions/meson.build
@@ -47,5 +47,6 @@ tests += {
       'test_extensions',
       'test_extdepend',
     ],
+    'regress_args': ['--no-locale', '--encoding=UTF8'],

Why is the addition of --encoding necessary for test_extensions? Its
Makefile has a NO_LOCALE, but it has no ENCODING set.
--
Michael

#5Jeff Davis
pgsql@j-davis.com
In reply to: Michael Paquier (#4)
Re: test_extensions: fix inconsistency between meson.build and Makefile

On Thu, 2023-07-06 at 11:41 +0900, Michael Paquier wrote:

Why is the addition of --encoding necessary for test_extensions?  Its
Makefile has a NO_LOCALE, but it has no ENCODING set.

I think that was an oversight -- as you point out, the Makefile doesn't
set ENCODING, so the meson.build does not need to, either.

Regards,
Jeff Davis