aupg - aupg_src: Added a rudimentary testing infrastructure.

From: rlucas(at)pgfoundry(dot)org (User Rlucas)
To: pgsql-committers(at)postgresql(dot)org
Subject: aupg - aupg_src: Added a rudimentary testing infrastructure.
Date: 2007-10-10 19:43:11
Message-ID: 20071010194311.B766A2176ED@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Added a rudimentary testing infrastructure. If this were SVN I would move files
around and rename them to clarify, but for now we'll keep the structure as is.

In a nutshell, alltest.pl uses Test::Harness to run all the *.t files in the
current dir. You make a *.t file by writing a test .sql file, then symlinking
polytest.pl to the *.t with

ln -s polytest.pl mytest.sql

...which gives you mytest.t.

You should kick off your test.sql file with test_plan(N) where N is the number of
tests that should pass in your test.sql file.

Tests pass by calling select(ok, 'description'). Try not to have other things
in your sql arbitrarily output strings starting with "\s*(not )?ok \d", if you get my drift.

Modified Files:
--------------
aupg_src/sql:
_test_setup.sql (r1.1 -> r1.2)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/aupg/aupg_src/sql/_test_setup.sql.diff?r1=1.1&r2=1.2)
_test_takedown.sql (r1.1 -> r1.2)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/aupg/aupg_src/sql/_test_takedown.sql.diff?r1=1.1&r2=1.2)
audit_infrastructure.sql (r1.3 -> r1.4)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/aupg/aupg_src/sql/audit_infrastructure.sql.diff?r1=1.3&r2=1.4)
audit_test_cds.sql (r1.1 -> r1.2)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/aupg/aupg_src/sql/audit_test_cds.sql.diff?r1=1.1&r2=1.2)
test.sh (r1.1 -> r1.2)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/aupg/aupg_src/sql/test.sh.diff?r1=1.1&r2=1.2)

Added Files:
-----------
aupg_src/sql:
alltest.pl (r1.1)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/aupg/aupg_src/sql/alltest.pl?rev=1.1&content-type=text/x-cvsweb-markup)
polytest.pl (r1.1)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/aupg/aupg_src/sql/polytest.pl?rev=1.1&content-type=text/x-cvsweb-markup)
test_dump.sh (r1.1)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/aupg/aupg_src/sql/test_dump.sh?rev=1.1&content-type=text/x-cvsweb-markup)
test_infrastructure.sql (r1.1)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/aupg/aupg_src/sql/test_infrastructure.sql?rev=1.1&content-type=text/x-cvsweb-markup)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2007-10-10 19:49:22 Re: Skytools committed without hackers discussion/review
Previous Message Michael Glaesemann 2007-10-10 19:13:16 Re: Skytools committed without hackers discussion/review