Skip site navigation (1) Skip section navigation (2)


From: Joachim Wieland <joe(at)mcknight(dot)de>
To: pgsql-patches(at)postgresql(dot)org
Subject: modular
Date: 2006-06-19 09:47:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
I propose a patch to make more modular. I'd like to do
ecpg regression tests for my soc project and don't want to duplicate
functionality. I put those parts of the code that parse the command line
and set up the environment variables and the database into sh-functions
and moved them to a separate file. then includes this
file and calls these functions as any other regression framework can
then do.

The patch adds a new file

Before there was: -> (replacements) -> pg_regress

now I have: -> (replacements) ->
There is nothing to replace in so I made that get called
for the regression tests instead of pg_regress.

The patch also adds a new option, --listen-on-tcp that makes the server
listen on the tcp port even when unix sockets can be used.

There were two issues I noticed with the old script:

DROP regressionuser[1-3], regressiongroup1 was done previously before
running the tests, that is, after creating the regression database and
before installing PLs into it.  The only effect of this that I can see
is that if a regression test aborts in privileges.sql and does use an
already running server then the next run could lead to a failed
privileges test. If privileges.sql gets executed completely then it will
clean up anyway in the end which makes lingering roles from this test
quite unprobable. I kept the behavior however but do the cleanup now
at the beginning of the very privileges.sql.

Next, this comment seems to be not true anymore:

  # ----------
  # Set backend timezone and datestyle explicitly
  # To pass the horology test in its current form, the postmaster must be
  # started with PGDATESTYLE=ISO, while the frontend must be started with
  # PGDATESTYLE=Postgres.  We set the postmaster values here and change
  # to the frontend settings after the postmaster has been started.
  # ----------

  PGTZ='PST8PDT'; export PGTZ

It seems that the affected regression tests set those values already in
the .sql files. Also note that if this was true, you couldn't use an
already running server without special adaptions.



pgsql-hackers by date

Next:From: ITAGAKI TakahiroDate: 2006-06-19 10:33:44
Subject: Re: sync_file_range()
Previous:From: Stefan KaltenbrunnerDate: 2006-06-19 08:52:09
Subject: Re: regresssion script hole

pgsql-patches by date

Next:From: Tom LaneDate: 2006-06-19 13:15:59
Subject: Re: table/index fillfactor control, try 2
Previous:From: Simon RiggsDate: 2006-06-19 08:31:41
Subject: Re: table/index fillfactor control, try 2

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group