psql & regress tests - Mailing list pgsql-hackers

From Peter Eisentraut
Subject psql & regress tests
Date
Msg-id Pine.LNX.4.20.9911182327450.714-100000@localhost.localdomain
Whole thread Raw
Responses Re: [HACKERS] psql & regress tests
List pgsql-hackers
Okay, here is my semiofficial take on the situation:

* Use the psql from the 6.5.* distro to do regression tests until further
notice.


* Although the output format in the current psql is not under intensive
development anymore, I am not sure if I can guarantee a "freeze" soon.
Once in a while I find some sort of flaw in really strange query results;
the aim of the output is to be visually pleasing, not to provide an exact
match so something. Having said that, I do not expect any major changes to
take place anymore though.


* The other problem is *what* is actually printed, as opposed to the
peculiarities of the table format. This is still somewhat confusing even
to me and I am still fixing things so they make sense at the end.

Example:
***OLD
QUERY: CREATE TABLE BOOLTBL1 (f1 bool);
QUERY: INSERT INTO BOOLTBL1 (f1) VALUES ('t'::bool);
QUERY: INSERT INTO BOOLTBL1 (f1) VALUES ('True'::bool);
QUERY: INSERT INTO BOOLTBL1 (f1) VALUES ('true'::bool);
QUERY: SELECT '' AS t_3, BOOLTBL1.*;
t_3|f1
---+--  |t  |t  |t
(3 rows)

***CURRENT
CREATE TABLE BOOLTBL1 (f1 bool);
INSERT INTO BOOLTBL1 (f1) VALUES ('t'::bool);
INSERT INTO BOOLTBL1 (f1) VALUES ('True'::bool);
INSERT INTO BOOLTBL1 (f1) VALUES ('true'::bool);
-- BOOLTBL1 should be full of true's at this point
SELECT '' AS t_3, BOOLTBL1.*;t_3 | f1
-----+----    | t    | t    | t
(3 rows)

(In fact, it's so current, it's not even in CVS yet, thanks to some
problems pointed out by Jan.)

Yes, there actually is a reasoning behind all of this, I'm just not sure
right now what it was ;). If someone is interested, I can bore you with
the details.


* Since no one has picked up on my idea to run the tests directly on the
backend, I will keep reiterating this idea until someone shuts me up
:*) The idea would be to have a target "check" in the top level makefile
like this (conceptually):

check: allmkdir ./regressinitdb -l . -d ./regressfor i in test1 test2 test3 ...; do    postgres -D ./regress -E
template1\      < $(srcdir)/test/regress/sql/$i.sql \      >& output-$i.outdonefor i in test1 test2 test3 ...; do
cmpoutput-$i.out expected-$i.out    if [ $? == 1]; then        echo "Test $i failed."    else        echo "Test $i
passed."       rm -f output-$i.out    fidonerm -rf ./regress
 

Then you can do
./configure
make
make check
make install

Or am I missing something here? Of course this change would require some
work, but I'm just getting at the concept here.


Finally, I'd like to apologize for the extra trouble some must have had. I
can only offer to cooperate on anything that needs to be done.
-Peter

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden





pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Createdb problem report
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] psql & regress tests