Unix Technical Forum

pg_regress: referencing shared objects from tests

This is a discussion on pg_regress: referencing shared objects from tests within the pgsql Hackers forums, part of the PostgreSQL category; --> Hi, we would like to be able to use and ship pg_regress and the PostgreSQL test suite independently of ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-29-2008, 09:43 AM
Jorgen Austvik - Sun Norway
 
Posts: n/a
Default pg_regress: referencing shared objects from tests

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@DLSUFFIX@'
23 LANGUAGE C STRICT;
24
25 CREATE FUNCTION check_primary_key ()
26 RETURNS trigger
27 AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
28 LANGUAGE C;
....
35 CREATE FUNCTION autoinc ()
36 RETURNS trigger
37 AS '@abs_builddir@/../../../contrib/spi/autoinc@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



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-29-2008, 09:43 AM
Tom Lane
 
Posts: n/a
Default Re: pg_regress: referencing shared objects from tests

Jorgen Austvik - Sun Norway <Jorgen.Austvik@Sun.COM> writes:
> 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?


The RPM packages have done this since approximately forever. You might
want to look at the patches used there.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-02-2008, 12:35 PM
Jorgen Austvik - Sun Norway
 
Posts: n/a
Default Re: pg_regress: referencing shared objects from tests

Tom Lane wrote:
> Jorgen Austvik - Sun Norway <Jorgen.Austvik@Sun.COM> writes:
>> 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?

>
> The RPM packages have done this since approximately forever. You might
> want to look at the patches used there.


Hi,

yes [1] is the same that we have been using internally.

Let me reformulate my question: would it be better to include something
like the attached patch in PostgreSQL, than have every distributor of
the tests apply it?

[1]
http://cvs.fedoraproject.org/viewcvs...=1.3&view=auto

-J
--

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

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


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-02-2008, 12:36 PM
Tom Lane
 
Posts: n/a
Default Re: pg_regress: referencing shared objects from tests

Jorgen Austvik - Sun Norway <Jorgen.Austvik@Sun.COM> writes:
> Tom Lane wrote:
>> The RPM packages have done this since approximately forever. You might
>> want to look at the patches used there.


> yes [1] is the same that we have been using internally.


> Let me reformulate my question: would it be better to include something
> like the attached patch in PostgreSQL, than have every distributor of
> the tests apply it?


> [1]
> http://cvs.fedoraproject.org/viewcvs...=1.3&view=auto


I never particularly thought it would be useful to push that patch
upstream, but certainly it would make life a tad simpler for Devrim and
me. Since nobody else has objected, I'll look into doing this in HEAD.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:55 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com