[postgis-devel] make check question

Bryce L Nordgren bnordgren at gmail.com
Tue Jul 26 19:48:52 PDT 2011


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/1aa84541/attachment.html>
-------------- next part --------------
[bnordgren at ghosty-mosty postgis-patch]$ make check
for s in liblwgeom regress postgis loader utils  ; do \
                echo "---- Making all in ${s}"; \
                make -C ${s} all || exit 1; \
        done;
---- Making all in liblwgeom
make[1]: Entering directory `/home/bnordgren/src/postgis-patch/liblwgeom'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bnordgren/src/postgis-patch/liblwgeom'
---- Making all in regress
make[1]: Entering directory `/home/bnordgren/src/postgis-patch/regress'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bnordgren/src/postgis-patch/regress'
---- Making all in postgis
make[1]: Entering directory `/home/bnordgren/src/postgis-patch/postgis'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bnordgren/src/postgis-patch/postgis'
---- Making all in loader
make[1]: Entering directory `/home/bnordgren/src/postgis-patch/loader'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bnordgren/src/postgis-patch/loader'
---- Making all in utils
make[1]: Entering directory `/home/bnordgren/src/postgis-patch/utils'
chmod +x postgis_restore.pl create_undef.pl postgis_proc_upgrade.pl profile_intersects.pl test_estimation.pl test_joinestimation.pl
make[1]: Leaving directory `/home/bnordgren/src/postgis-patch/utils'
PostGIS was built successfully. Ready to install.
for s in liblwgeom regress postgis loader utils  ; do \
                echo "---- Making check in ${s}"; \
                make -C ${s} check || exit 1; \
        done;
---- Making check in liblwgeom
make[1]: Entering directory `/home/bnordgren/src/postgis-patch/liblwgeom'
make -C cunit check
make[2]: Entering directory `/home/bnordgren/src/postgis-patch/liblwgeom/cunit'
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_algorithm.o cu_algorithm.c
cu_algorithm.c: In function ?test_lwpoint_interpolate?:
cu_algorithm.c:415:6: warning: variable ?rv? set but not used [-Wunused-but-set-variable]
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_print.o cu_print.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_misc.o cu_misc.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_ptarray.o cu_ptarray.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_geodetic.o cu_geodetic.c
cu_geodetic.c: In function ?test_lwgeom_distance_sphere?:
cu_geodetic.c:769:14: warning: variable ?gbox2? set but not used [-Wunused-but-set-variable]
cu_geodetic.c:769:7: warning: variable ?gbox1? set but not used [-Wunused-but-set-variable]
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_measures.o cu_measures.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_libgeom.o cu_libgeom.c
cu_libgeom.c: In function ?do_lwgeom_flip_coordinates?:
cu_libgeom.c:361:13: warning: variable ?h? set but not used [-Wunused-but-set-variable]
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_surface.o cu_surface.c
cu_surface.c:224:1: warning: ?check_tgeom? defined but not used [-Wunused-function]
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_homogenize.o cu_homogenize.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_out_wkt.o cu_out_wkt.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_out_wkb.o cu_out_wkb.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_out_gml.o cu_out_gml.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_out_kml.o cu_out_kml.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_out_geojson.o cu_out_geojson.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_out_svg.o cu_out_svg.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_out_x3d.o cu_out_x3d.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_in_wkb.o cu_in_wkb.c
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_in_wkt.o cu_in_wkt.c
cu_in_wkt.c: In function ?cu_wkt_in?:
cu_in_wkt.c:54:6: warning: variable ?rv? set but not used [-Wunused-but-set-variable]
cu_in_wkt.c: In function ?test_wkt_in_errlocation?:
cu_in_wkt.c:276:6: warning: variable ?rv? set but not used [-Wunused-but-set-variable]
gcc -g -O2  -Wall -Wmissing-prototypes -I.. -c -o cu_tester.o cu_tester.c
gcc -o cu_tester cu_algorithm.o cu_print.o cu_misc.o cu_ptarray.o cu_geodetic.o cu_measures.o cu_libgeom.o cu_surface.o cu_homogenize.o cu_out_wkt.o cu_out_wkb.o cu_out_gml.o cu_out_kml.o cu_out_geojson.o cu_out_svg.o cu_out_x3d.o cu_in_wkb.o cu_in_wkt.o cu_tester.o  ../liblwgeom.a -lm -lcunit


     CUnit - A unit testing framework for C - Version 2.1-2
     http://cunit.sourceforge.net/


Suite: print_suite
  Test: test_lwprint_default_format ...passed
  Test: test_lwprint_format_orders ...passed
  Test: test_lwprint_optional_format ...passed
  Test: test_lwprint_oddball_formats ...passed
  Test: test_lwprint_bad_formats ...passed
Suite: Misc Suite
  Test: test_misc_force_2d ...passed
  Test: test_misc_simplify ...passed
  Test: test_misc_count_vertices ...passed
  Test: test_misc_area ...passed
  Test: test_misc_wkb ...passed
Suite: PointArray Suite
  Test: test_ptarray_append_point ...passed
  Test: test_ptarray_append_ptarray ...passed
Suite: PostGIS Computational Geometry Suite
  Test: test_lw_segment_side ...passed
  Test: test_lw_segment_intersects ...passed
  Test: test_lwline_crossing_short_lines ...passed
  Test: test_lwline_crossing_long_lines ...passed
  Test: test_lwline_crossing_bugs ...passed
  Test: test_lwpoint_set_ordinate ...passed
  Test: test_lwpoint_get_ordinate ...passed
  Test: test_lwpoint_interpolate ...passed
  Test: test_lwline_clip ...passed
  Test: test_lwline_clip_big ...passed
  Test: test_lwmline_clip ...passed
  Test: test_geohash_point ...passed
  Test: test_geohash_precision ...passed
  Test: test_geohash ...passed
  Test: test_isclosed ...passed
Suite: PostGIS Measures Suite
  Test: test_mindistance2d_tolerance ...passed
  Test: test_rect_tree_contains_point ...passed
  Test: test_rect_tree_intersects_tree ...passed
  Test: test_lwgeom_segmentize2d ...passed
Suite: WKT Out Suite
  Test: test_wkt_out_point ...passed
  Test: test_wkt_out_linestring ...passed
  Test: test_wkt_out_polygon ...passed
  Test: test_wkt_out_multipoint ...passed
  Test: test_wkt_out_multilinestring ...passed
  Test: test_wkt_out_multipolygon ...passed
  Test: test_wkt_out_collection ...passed
  Test: test_wkt_out_circularstring ...passed
  Test: test_wkt_out_compoundcurve ...passed
  Test: test_wkt_out_curvpolygon ...passed
  Test: test_wkt_out_multicurve ...passed
  Test: test_wkt_out_multisurface ...passed
Suite: WKT In Suite
  Test: test_wkt_in_point ...passed
  Test: test_wkt_in_linestring ...passed
  Test: test_wkt_in_polygon ...passed
  Test: test_wkt_in_multipoint ...passed
  Test: test_wkt_in_multilinestring ...passed
  Test: test_wkt_in_multipolygon ...passed
  Test: test_wkt_in_collection ...passed
  Test: test_wkt_in_circularstring ...passed
  Test: test_wkt_in_compoundcurve ...passed
  Test: test_wkt_in_curvpolygon ...passed
  Test: test_wkt_in_multicurve ...passed
  Test: test_wkt_in_multisurface ...passed
  Test: test_wkt_in_polyhedralsurface ...passed
  Test: test_wkt_in_errlocation ...passed
Suite: WKB Out Suite
  Test: test_wkb_out_point ...passed
  Test: test_wkb_out_linestring ...passed
  Test: test_wkb_out_polygon ...passed
  Test: test_wkb_out_multipoint ...passed
  Test: test_wkb_out_multilinestring ...passed
  Test: test_wkb_out_multipolygon ...passed
  Test: test_wkb_out_collection ...passed
  Test: test_wkb_out_circularstring ...passed
  Test: test_wkb_out_compoundcurve ...passed
  Test: test_wkb_out_curvpolygon ...passed
  Test: test_wkb_out_multicurve ...passed
  Test: test_wkb_out_multisurface ...passed
  Test: test_wkb_out_polyhedralsurface ...passed
Suite: WKB In Suite
  Test: test_wkb_in_point ...passed
  Test: test_wkb_in_linestring ...passed
  Test: test_wkb_in_polygon ...passed
  Test: test_wkb_in_multipoint ...passed
  Test: test_wkb_in_multilinestring ...passed
  Test: test_wkb_in_multipolygon ...passed
  Test: test_wkb_in_collection ...passed
  Test: test_wkb_in_circularstring ...passed
  Test: test_wkb_in_compoundcurve ...passed
  Test: test_wkb_in_curvpolygon ...passed
  Test: test_wkb_in_multicurve ...passed
  Test: test_wkb_in_multisurface ...passed
Suite: LibGeom Suite
  Test: test_typmod_macros ...passed
  Test: test_flags_macros ...passed
  Test: test_serialized_srid ...passed
  Test: test_gserialized_from_lwgeom_size ...passed
  Test: test_gbox_serialized_size ...passed
  Test: test_lwgeom_from_gserialized ...passed
  Test: test_lwgeom_count_vertices ...passed
  Test: test_on_gser_lwgeom_count_vertices ...passed
  Test: test_geometry_type_from_string ...passed
  Test: test_lwcollection_extract ...passed
  Test: test_lwgeom_free ...passed
  Test: test_lwgeom_flip_coordinates ...passed
  Test: test_f2d ...passed
Suite: Triangle, Tin and PolyhedralSurface Suite
  Test: triangle_parse ...passed
  Test: tin_parse ...passed
  Test: polyhedralsurface_parse ...passed
  Test: tin_tgeom ...passed
  Test: psurface_tgeom ...passed
  Test: surface_dimension ...passed
  Test: surface_perimeter ...passed
Suite: Geodetic Suite
  Test: test_signum ...passed
  Test: test_gbox_from_spherical_coordinates ...passed
  Test: test_gserialized_get_gbox_geocentric ...passed
  Test: test_clairaut ...passed
  Test: test_edge_intersection ...passed
  Test: test_edge_distance_to_point ...passed
  Test: test_edge_distance_to_edge ...passed
  Test: test_lwgeom_distance_sphere ...passed
  Test: test_lwgeom_check_geodetic ...passed
  Test: test_gbox_calculation ...passed
  Test: test_gserialized_from_lwgeom ...passed
  Test: test_spheroid_distance ...passed
  Test: test_spheroid_area ...passed
  Test: test_lwpoly_covers_point2d ...passed
  Test: test_ptarray_point_in_ring ...passed
Suite: Homogenize Suite
  Test: test_coll_point ...passed
  Test: test_coll_line ...passed
  Test: test_coll_poly ...passed
  Test: test_coll_coll ...passed
  Test: test_geom ...passed
Suite: GML Out Suite
  Test: out_gml_test_precision ...passed
  Test: out_gml_test_srid ...passed
  Test: out_gml_test_dims ...passed
  Test: out_gml_test_geodetic ...passed
  Test: out_gml_test_geoms ...passed
  Test: out_gml_test_geoms_prefix ...passed
  Test: out_gml_test_geoms_nodims ...passed
Suite: KML Out Suite
  Test: out_kml_test_precision ...passed
  Test: out_kml_test_dims ...passed
  Test: out_kml_test_geoms ...passed
  Test: out_kml_test_prefix ...passed
Suite: GeoJson Out Suite
  Test: out_geojson_test_precision ...passed
  Test: out_geojson_test_dims ...passed
  Test: out_geojson_test_srid ...passed
  Test: out_geojson_test_bbox ...passed
  Test: out_geojson_test_geoms ...passed
Suite: SVG Out Suite
  Test: out_svg_test_precision ...passed
  Test: out_svg_test_dims ...passed
  Test: out_svg_test_relative ...passed
  Test: out_svg_test_geoms ...passed
  Test: out_svg_test_srid ...passed
Suite: X3D Out Suite
  Test: out_x3d3_test_precision ...passed
  Test: out_x3d3_test_geoms ...passed

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites     18     18    n/a      0        0
               tests    145    145    145      0        0
             asserts   1243   1243   1243      0      n/a

Elapsed time =    6.200 seconds
make[2]: Leaving directory `/home/bnordgren/src/postgis-patch/liblwgeom/cunit'
make[1]: Leaving directory `/home/bnordgren/src/postgis-patch/liblwgeom'
---- Making check in regress
make[1]: Entering directory `/home/bnordgren/src/postgis-patch/regress'
sed 's,$libdir,/home/bnordgren/src/postgis-patch/regress/00-regress-install/lib,g' ../postgis/postgis.sql > postgis.sql
make -C ../postgis REGRESS=1 DESTDIR=/home/bnordgren/src/postgis-patch/regress/00-regress-install install
make[2]: Entering directory `/home/bnordgren/src/postgis-patch/postgis'
/bin/mkdir -p '/home/bnordgren/src/postgis-patch/regress/00-regress-install/lib'
/bin/mkdir -p '/home/bnordgren/src/postgis-patch/regress/00-regress-install/share/contrib/postgis-2.0'
/bin/sh /usr/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -m 755  postgis-2.0.so '/home/bnordgren/src/postgis-patch/regress/00-regress-install/lib/postgis-2.0.so'
/bin/sh /usr/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -m 644 ./../spatial_ref_sys.sql '/home/bnordgren/src/postgis-patch/regress/00-regress-install/share/contrib/postgis-2.0'
/bin/sh /usr/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -m 644 postgis.sql '/home/bnordgren/src/postgis-patch/regress/00-regress-install/share/contrib/postgis-2.0'
/bin/sh /usr/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -m 644 uninstall_postgis.sql '/home/bnordgren/src/postgis-patch/regress/00-regress-install/share/contrib/postgis-2.0'
/bin/sh /usr/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -m 644 postgis_upgrade_20_minor.sql '/home/bnordgren/src/postgis-patch/regress/00-regress-install/share/contrib/postgis-2.0'
/bin/sh /usr/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -m 644 legacy.sql '/home/bnordgren/src/postgis-patch/regress/00-regress-install/share/contrib/postgis-2.0'
/bin/sh /usr/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -m 644 uninstall_legacy.sql '/home/bnordgren/src/postgis-patch/regress/00-regress-install/share/contrib/postgis-2.0'
make[2]: Leaving directory `/home/bnordgren/src/postgis-patch/postgis'
make -C ../loader REGRESS=1 DESTDIR=/home/bnordgren/src/postgis-patch/regress/00-regress-install install
make[2]: Entering directory `/home/bnordgren/src/postgis-patch/loader'
Makefile:133: warning: overriding commands for target `clean'
/usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk:218: warning: ignoring old commands for target `clean'
/bin/sh /usr/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c pgsql2shp /home/bnordgren/src/postgis-patch/regress/00-regress-install/bin
/bin/sh /usr/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c shp2pgsql /home/bnordgren/src/postgis-patch/regress/00-regress-install/bin
make[2]: Leaving directory `/home/bnordgren/src/postgis-patch/loader'
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Creating spatial db postgis_reg 
createdb: could not connect to database postgres: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
createlang: could not connect to database postgis_reg: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
dropdb: could not connect to database postgres: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

 Something went wrong (no postgis installed in postgis_reg).
 For details, check /tmp/pgis_reg_13688/regress_log

make[1]: *** [check] Error 1
make[1]: Leaving directory `/home/bnordgren/src/postgis-patch/regress'
make: *** [check] Error 1
[bnordgren at ghosty-mosty postgis-patch]$ 


More information about the postgis-devel mailing list