Enable the regress test like its done for postgis (prompted by zhuk@,

thanks!) - fix RDEP while here, postgis is needed at runtime.
This commit is contained in:
landry 2014-12-19 21:16:55 +00:00
parent ababf521f9
commit b281b80dc3
2 changed files with 25 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.1.1.1 2014/12/16 21:34:35 landry Exp $
# $OpenBSD: Makefile,v 1.2 2014/12/19 21:16:55 landry Exp $
SHARED_ONLY = Yes
@ -8,6 +8,7 @@ GH_TAG = v2.0.0
GH_COMMIT = d6ed2cba4c574b8ac463632df451b6f011fd522d
GH_PROJECT = pgrouting
GH_ACCOUNT = pgRouting
REVISION = 0
DISTNAME = pgrouting-2.0.0
CATEGORIES = geo databases
@ -22,9 +23,17 @@ PERMIT_PACKAGE_CDROM= Yes
MODULES = devel/cmake
LIB_DEPENDS = math/cgal
RUN_DEPENDS = databases/postgresql,-server
RUN_DEPENDS = geo/postgis
BUILD_DEPENDS = databases/postgresql,-server
TEST_DEPENDS = ${BUILD_PKGPATH}
WANTLIB += CGAL boost_system-mt boost_thread-mt gmp m stdc++
NO_TEST = Yes
do-test:
regdir=$$(mktemp -t -d pgrouting-regress.XXXXXX) && \
LC_CTYPE=C initdb -D $${regdir} && \
LD_PRELOAD=libpthread.so pg_ctl -D $${regdir} -o '-p 12341' -l $${regdir}/log start && \
cd ${WRKSRC} && perl tools/test-runner.pl -pgport 12341 || \
pg_ctl -D $${regdir} -o '-p 12341' stop -m fast
#not all tests pass - ensure we stop the server
.include <bsd.port.mk>

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-tools_test-runner_pl,v 1.1 2014/12/19 21:16:55 landry Exp $
--- tools/test-runner.pl.orig Fri Dec 19 21:33:45 2014
+++ tools/test-runner.pl Fri Dec 19 21:55:37 2014
@@ -20,7 +20,8 @@ my $DRYRUN = 0;
my $DEBUG = 0;
my $DBNAME = "pgr_test__db__test";
-my $DBUSER = 'postgres';
+my $DBUSER = `whoami`;
+chomp $DBUSER;
my $DBHOST = 'localhost';
my $DBPORT = '5432';