[postgis-devel] make check question

Paragon Corporation lr at pcorp.us
Tue Jul 26 22:17:52 PDT 2011


Bryce,

 

To do the non C-Unit checks, you need a running PostgreSQL server period.

 

The reason why you don't have to install first before doing a make check is
that the regress version installs a version of postgis where the libdir is
pointing at your regress folder .so/dll , and not the one in the normal bin
folder of your PostgreSQL install.

I forget, but I think this is the same case for the rppostgis.so/dll.

 

I'm on windows and compile using mingW so not sure how others do it, but I
have 3 versions of PostgreSQL I test with  that I launch with a batch script
on different ports prior to doing any compile make check.  So my compile
script compiles for each, and then tests against the port I have for that
version of PostgreSQL

By setting the PGPORT, PGUSER environment variables.

 

So my compile / make check / install script has these lines

 

export PGPORT=5434

export PG_VER=84

export PGUSER=postgres

 

And I change those for each version I compile against to get the right
include paths etc.

 

The other VER variables are other ones I have defined to point at different
versions of GDAL, XML, GEOS etc as needed

./configure --prefix=/c/projects/pg/pg${PG_VER}
--with-gdalconfig=/c/projects/gdal/rel-${GDAL_VER}/bin/gdal-config
--with-xml2config=/c/projects/libxml/libxml2-${XML_VER}release/bin/xml2-conf
ig --with-pgconfig=/c/projects/pg/pg${PG_VER}/bin/pg_config
--with-geosconfig=/c/projects/geos/rel-${GEOS_VER}/bin/geos-config
--with-projdir=/c/projects/proj/rel-4.6.1 --with-gui --with-raster
--with-topology

 

 

I think the process is essentially the same under Linux as it is in MingW so
the above approach should work for you.

 

Hope that helps,

Regina

 

 

 

  _____  

From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of Bryce L
Nordgren
Sent: Tuesday, July 26, 2011 10:49 PM
To: PostGIS Development Discussion
Subject: [postgis-devel] make check question

 

The attached file is the output from "make check" (after applying my patch
on #1050). The CUnit tests appear to all run successfully. Then there's
another phase where something tries to connect to a running server. This
fails, of course, as there is no running server on my system (and if there
were, it wouldn't be the modified version).

When I first saw this, I took this to be an indication that you never run
"make check" until the software is installed, the database cluster is
initialized, and everything is happy. But I was corrected into the belief
that "make check" should be run before "make install". But it's still trying
to connect to a server which isn't there. So is there a trick? If the build
system is supposed to be managing a "faux install" for testing purposes, is
there something in the error messages which indicates what's going wrong?
How isolated is the build directory from the system directories? (I'm
running this as a regular user.)

And of course, postgis is just an extension to the postgresql server, it
doesn't contain the server code itself. How are you supposed to run the
tests?

Bryce

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20110727/1383ce89/attachment.html>


More information about the postgis-devel mailing list