Re: pg_regress: paths in largeobject test

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Jorgen Austvik - Sun Norway <Jorgen(dot)Austvik(at)Sun(dot)COM>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_regress: paths in largeobject test
Date: 2007-11-30 12:21:17
Message-ID: 20071130122117.GC1837@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Jorgen Austvik - Sun Norway wrote:
> Tom Lane wrote:
>> Jorgen Austvik - Sun Norway <Jorgen(dot)Austvik(at)Sun(dot)COM> writes:
>>> I believe the results paths in line 139 and 144 are missing the
>>> @abs_builddir@ qualifier.
>> I'd put it the other way around: likely we should get rid of the
>> one use of @abs_builddir(at)(dot)
>
> He, he.
>
> Generally I prefer explicit over implicit (having the full paths make
> troubleshooting easier), but in this case you have the additional aspect of
> the lo_import operating relative to the client, while lo_export operates
> relative to the server.

I submit that the test is OK as it currently is. The lo_export() call
is expanded by the server, which can be running anywhere -- hence the
need to use an absolute path.

Then we have \lo_import and \lo_export calls which are relative to the
client. The client is already running in the regress builddir, so using
relative paths works fine.

If I try to run the client from another directory, it fails completely.
Exactly what is the problem you are trying to fix?

$ cd ..
$ pwd
/pgsql/build/00head/src/test
$ regress/pg_regress largeobject
(using postmaster on Unix socket, port 55432)
============== dropping database "regression" ==============
DROP DATABASE
============== creating database "regression" ==============
CREATE DATABASE
ALTER DATABASE
============== running regression test queries ==============
test largeobject ... /bin/sh: cannot open ./sql/largeobject.sql: No such file
diff: ./expected/largeobject.out: No such file or directory
diff: ./results/largeobject.out: No such file or directory
diff command failed with status 512: diff -w "./expected/largeobject.out" "./results/largeobject.out" > "./results/largeobject.out.diff"

--
Alvaro Herrera http://www.advogato.org/person/alvherre
"The Postgresql hackers have what I call a "NASA space shot" mentality.
Quite refreshing in a world of "weekend drag racer" developers."
(Scott Marlowe)

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-11-30 14:53:20 Re: pg_regress: paths in largeobject test
Previous Message Gregory Stark 2007-11-30 10:09:22 Re: [GENERAL] Empty arrays with ARRAY[]