Re: custom postgres launcher for tests

From: "Ivan N(dot) Taranov" <i(dot)taranov(at)postgrespro(dot)ru>
To:
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: custom postgres launcher for tests
Date: 2020-02-21 08:04:09
Message-ID: CAKqLMA9+na+wPsoEhCX8Jr=3FsbEZqk9myLPeRU4YMC46yiaMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 21, 2020 at 4:49 AM Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:

> I thought I saw a related patch to this that proposed to add a pg_ctl
> argument. Was that you too? I can't find it at the moment.

This very simple two-line patch for src/test/perl/PostgresNode.pm code,
it set `pg_ctl -p <path>` argument, and one-line patch for
src/test/regress/pg_regress.c it spawn postgres-launcher directly.

This routine usable only for tap tests with used
PostgresNode::get_new_node/start/restart, and for regress tests.

Perhaps the name TEST_PGLAUNCHER is more correct for this env-var.

>into doing whatever they want, so it's not a security concern

>I currently do this with a horrid shellscript hack that uses next-on-path
>lookups and a wrapper 'postgres' executable

Its not security problem, because this kit only for developer, commonly - for
iteratively build and run concrete tests.

For more complexy replacing need patch for pg_ctl, or postgres wrapper, or
replacing postgres bin and other ways...

Thanks for the response!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-02-21 08:05:07 Re: pg_regress cleans up tablespace twice.
Previous Message Kyotaro Horiguchi 2020-02-21 07:49:59 Re: [HACKERS] WAL logging problem in 9.4.3?