no test programs in contrib - Mailing list pgsql-hackers

From Alvaro Herrera
Subject no test programs in contrib
Date
Msg-id 20141124134945.GV1639@alvin.alvh.no-ip.org
Whole thread Raw
Responses Re: no test programs in contrib  (Petr Jelinek <petr@2ndquadrant.com>)
Re: no test programs in contrib  (Andres Freund <andres@2ndquadrant.com>)
Re: no test programs in contrib  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: no test programs in contrib  (Noah Misch <noah@leadboat.com>)
Re: no test programs in contrib  (Peter Eisentraut <peter_e@gmx.net>)
Re: no test programs in contrib  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
What's the general opinion on having test programs somewhere other than
contrib/ ?

We currently have a number of subdirectories for test-only programs:

test_parser (a toy text search parser, added in 2007)
dummy_seclabel (for SECURITY LABEL regression testing, added Sept 2010)
worker_spi (for bgworkers, added Dec 2012)
test_shm_mq (test program for shared memory queues, added Jan 2014)
test_decoding (test program for logical decoding, added March 2014)

I'm now contemplating the addition on a new one in the commit-timestamps
patch, and I'm starting to feel that these are all misplaced.  I think
we have been dumping them to contrib not because they really belong
there, but because of the lack of a better place.  As opposed to the
rest of the stuff in contrib/, they don't serve any useful purpose on
themselves; they are just demonstrating some coding techniques, or
testing that some framework work as intended.  It seems impolite to
continue to pollute contrib with these; and my crystal ball says they
will continue to grow much more rapidly than normal, useful contrib
modules.

What would you say if we were to move them to src/test/?  I could also
see putting them in a brand new top-level directory, say testing/ or
testprg/.

Now, I know there is some resistance to the idea of moving source code
around.  If this proposal is objected to, would people object the idea
of putting the commit timestamp test module in src/test/commit_ts
instead of the patch author's proposal, contrib/test_committs?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Replication connection URI?
Next
From: Antonin Houska
Date:
Subject: pg_class(relpersistence) of hash index