Version 2 (modified by 15 years ago) ( diff ) | ,
---|
PostGIS Garden Test
The PostGIS Garden Test is a suite of SQL statements designed to stress test the PostGIS library within the PostgreSQL environment. It is a test generated from the reference.xml that tries to test every documented function against every kind of geometry supported by PostGIS. The main objectives of the tests is to try to catch bugs that will crash the server. It is also useful for monitoring odd behavior as well as as a regression test against prior versions of the software.
To build the garden test you need an xsltproc (the same that is used to build the docs or some other .xsl processor). On windows you can download precompiled binaries from http://www.zlatkovic.com/pub/libxml/ and its part of the libxslt package.
The reference.xml and postgis_gardentest.sql.xsl located in the doc and doc/xsl folders are both needed to build the tests.
Below is a basic script to build the tests and run them (if you are running from dos, change the slashes or just run everything from same folder:
xsltproc -o torturetest.sql trunk/doc/xsl/postgis_gardentest.sql.xsl trunk/doc/reference.xml psql -p 5432 -U postgres -d postgres -c "CREATE DATABASE testpostgis;" psql -p 5432 -U postgres -d testpostgis -f postgis.sql psql -p 5432 -U postgres -d testpostgis -f geography.sql psql -p 5432 -U postgres -d testpostgis -f spatial_ref_sys.sql psql -p 5432 -U postgres -d testpostgis -f torturetest.sql > torturetest_results.txt psql -p 5432 -U postgres -d postgres -c "DROP DATABASE testpostgis;"