enabling FOO=bar arguments to vcregress.pl

Started by Andrew Dunstanalmost 5 years ago5 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t45048
psql -h localhost -U postgres

Built from patchset v3 (message #3), July 27, 2026 at 04:00 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t45048_3 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t45048_3 && git checkout t45048_3

Patchset v3 (message #3) is on t45048_3

Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

As I mentioned recently at
</messages/by-id/5d72f199-dc11-89a8-29d1-f20f9687c86f@dunslane.net&gt;,%C2%A0
I want to get USE_MODULE_DB working for vcregress.pl. I started out
writing code to strip this from the command line or get it from the
environment, but then it struck me that if would be better to implement
a general Makefile-like mechanism for handling FOO=bar type arguments on
the command line, along the lines of the attached.

Thoughts?

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachments:

vcregress-foo=bar.patchtext/x-patch; charset=UTF-8; name="vcregress-foo=bar.patch"Download+8-0
#2Michael Paquier
michael@paquier.xyz
In reply to: Andrew Dunstan (#1)
Re: enabling FOO=bar arguments to vcregress.pl

On Mon, Nov 01, 2021 at 11:33:21AM -0400, Andrew Dunstan wrote:

As I mentioned recently at
</messages/by-id/5d72f199-dc11-89a8-29d1-f20f9687c86f@dunslane.net&gt;,%C2%A0
I want to get USE_MODULE_DB working for vcregress.pl. I started out
writing code to strip this from the command line or get it from the
environment, but then it struck me that if would be better to implement
a general Makefile-like mechanism for handling FOO=bar type arguments on
the command line, along the lines of the attached.

I am not sure to understand how that will that work with USE_MODULE_DB
which sets up the database names used by the regression tests. Each
target's module has its own needs in terms of settings that can be
used, meaning that you would still need some boilerplate to do the
mapping between a variable and its command argument?
--
Michael

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Michael Paquier (#2)
Re: enabling FOO=bar arguments to vcregress.pl

On 11/1/21 21:23, Michael Paquier wrote:

On Mon, Nov 01, 2021 at 11:33:21AM -0400, Andrew Dunstan wrote:

As I mentioned recently at
</messages/by-id/5d72f199-dc11-89a8-29d1-f20f9687c86f@dunslane.net&gt;,%C2%A0
I want to get USE_MODULE_DB working for vcregress.pl. I started out
writing code to strip this from the command line or get it from the
environment, but then it struck me that if would be better to implement
a general Makefile-like mechanism for handling FOO=bar type arguments on
the command line, along the lines of the attached.

I am not sure to understand how that will that work with USE_MODULE_DB
which sets up the database names used by the regression tests. Each
target's module has its own needs in terms of settings that can be
used, meaning that you would still need some boilerplate to do the
mapping between a variable and its command argument?

I think you misunderstood the purpose of my email. It wasn't meant to
be  complete patch.

But here's an untested patch that should do almost all of what I want
for USE_MODULE_DB.

cheers

andrew

--

Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachments:

t45048_3
msvc-use-module-db.patchtext/x-patch; charset=UTF-8; name=msvc-use-module-db.patchDownload+17-1
#4Andrew Dunstan
andrew@dunslane.net
In reply to: Andrew Dunstan (#3)
Re: enabling FOO=bar arguments to vcregress.pl

On 11/2/21 11:03, Andrew Dunstan wrote:

On 11/1/21 21:23, Michael Paquier wrote:

On Mon, Nov 01, 2021 at 11:33:21AM -0400, Andrew Dunstan wrote:

As I mentioned recently at
</messages/by-id/5d72f199-dc11-89a8-29d1-f20f9687c86f@dunslane.net&gt;,%C2%A0
I want to get USE_MODULE_DB working for vcregress.pl. I started out
writing code to strip this from the command line or get it from the
environment, but then it struck me that if would be better to implement
a general Makefile-like mechanism for handling FOO=bar type arguments on
the command line, along the lines of the attached.

I am not sure to understand how that will that work with USE_MODULE_DB
which sets up the database names used by the regression tests. Each
target's module has its own needs in terms of settings that can be
used, meaning that you would still need some boilerplate to do the
mapping between a variable and its command argument?

I think you misunderstood the purpose of my email. It wasn't meant to
be  complete patch.

But here's an untested patch that should do almost all of what I want
for USE_MODULE_DB.

Now tested and doing what is expected. I'd like to backpatch it. Nobody
who doesn't set USE_MODULE_DB would be at all affected, but I want to
enable it for MSVC builds in the buildfarm.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

#5Michael Paquier
michael@paquier.xyz
In reply to: Andrew Dunstan (#4)
Re: enabling FOO=bar arguments to vcregress.pl

On Tue, Nov 02, 2021 at 05:59:49PM -0400, Andrew Dunstan wrote:

On 11/2/21 11:03, Andrew Dunstan wrote:

I think you misunderstood the purpose of my email. It wasn't meant to
be complete patch.

But here's an untested patch that should do almost all of what I want
for USE_MODULE_DB.

Now tested and doing what is expected. I'd like to backpatch it. Nobody
who doesn't set USE_MODULE_DB would be at all affected, but I want to
enable it for MSVC builds in the buildfarm.

Okay, now I get your intention here, thanks. Shouldn't you add some
documentation to show out to use this facility when passing down
parameters?
--
Michael