Re: Very confusing installcheck behavior with PGXS

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Very confusing installcheck behavior with PGXS
Date: 2016-01-06 17:39:56
Message-ID: CA+TgmoaKJFjY-=A6x3Qhk2Sf7egQG3=FdSUdzTCQtogYbBGyCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 3, 2016 at 5:22 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
> The rule that gets executed if you do `make installcheck` with something
> using PGXS is
>
> pgxs.mk: $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
>
> where $(pg_regress_installcheck) is set in Makefile.global.in to
>
>> pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress
>> --inputdir=$(srcdir) --bindir='$(bindir)' $(pg_regress_locale_flags)
>> $(EXTRA_REGRESS_OPTS)
>
> The problem here is that in a PGXS make, srcdir is set to '.'[1], and
> --inputdir is specified a second time in REGRESS_OPTS. Normally that works
> OK (for some reason ignoring what's in ./sql), but if you happen to have a
> file in your test/sql directory that matches a file in ./sql, pg_regress
> runs the first file and not the second.

Stupid question time: why in the world would you have that?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-01-06 17:54:42 Re: Very confusing installcheck behavior with PGXS
Previous Message Robert Haas 2016-01-06 17:38:08 Re: Description tweak for vacuumdb