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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

pg_regress: referencing shared objects from tests


  • From: Jorgen Austvik - Sun Norway <Jorgen(dot)Austvik(at)Sun(dot)COM>
  • To: Hackers <pgsql-hackers(at)postgresql(dot)org>
  • Subject: pg_regress: referencing shared objects from tests
  • Date: Wed, 28 May 2008 14:08:14 +0200
  • Message-id: <483D4B2E(dot)80203(at)sun(dot)com>

Hi,

we would like to be able to use and ship pg_regress and the PostgreSQL test suite independently of the PostgreSQL build environment, for testing and maybe even as a separate package to be build and shipped with the OS for others to test their setup. Does this sound like a sane and OK thing to do?

I have a problem with one of the tests (create_function_1.source):

---------8<----------------8<----------------8<----------------8<-------
     20 CREATE FUNCTION int44out(city_budget)
     21    RETURNS cstring
     22    AS '@abs_builddir@/regress(at)DLSUFFIX@'
     23    LANGUAGE C STRICT;
     24
     25 CREATE FUNCTION check_primary_key ()
     26         RETURNS trigger
     27         AS '@abs_builddir@/../../../contrib/spi/refint(at)DLSUFFIX@'
     28         LANGUAGE C;
...
     35 CREATE FUNCTION autoinc ()
     36         RETURNS trigger
     37         AS '@abs_builddir@/../../../contrib/spi/autoinc(at)DLSUFFIX@'
     38         LANGUAGE C;
---------8<----------------8<----------------8<----------------8<-------

(The ../../../contrib/spi-path does not exist outside of the build environment, so to be able to run the test you need to have source code, compilers, ...)

I could work around this problem by copying the needed shared objects to @abs_builddir@ as part of make or make check, I could add a “–look-for-shared-objects-here” parameter to pg_regress, and you probably have other suggestions.

Is this something we want to fix, and what would be the right way to do it? (I have no problem providing a patch.)

-Jørgen
--

Jørgen Austvik, Software Engineering - QA
Sun Microsystems Database Group

http://blogs.sun.com/austvik, http://www.autvik.net/

Sun Microsystems AS
Haakon VII gt. 7b
N-7485 Trondheim, Norway

begin:vcard
fn;quoted-printable:J=C3=B8rgen Austvik
n;quoted-printable:Austvik;J=C3=B8rgen
org:Sun Microsystems;Database Technology Group
adr:;;Haakon VII gt. 7b;Trondheim;;NO-7485;Norway
email;internet:jorgen(dot)austvik(at)sun(dot)com
title:Senior Engineer
tel;work:+47 73 84 21 10 
tel;fax:+47 73 84 21 01
tel;cell:+47 901 97 886
x-mozilla-html:FALSE
url:http://www.sun.com/
version:2.1
end:vcard



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group