[libmongodb-perl] 01/03: Only run the test suite on architectures where mongod is available

dom at earth.li dom at earth.li
Tue Aug 13 19:47:02 UTC 2013


This is an automated email from the git hooks/post-receive script.

dom pushed a commit to branch master
in repository libmongodb-perl.

commit 30dfabb81d172964fd7f3f18102d9e83ab8f617f
Author: Niko Tyni <ntyni at debian.org>
Date:   Tue Aug 13 21:31:55 2013 +0300

    Only run the test suite on architectures where mongod is available
    
    Hardcoding the architectures here is unfortunate but probably
    unavoidable.
    
    There are a few tests in the suite that don't require a
    database server, so we run the test suite everywhere
    and let it decide which tests to skip.
---
 debian/control |    2 +-
 debian/rules   |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index 5891924..77e612d 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@ Build-Depends: debhelper (>= 9.20120312),
  libtie-ixhash-perl,
  libtry-tiny-perl,
  libtest-warn-perl,
- mongodb-server,
+ mongodb-server [i386 amd64],
  procps
 Standards-Version: 3.9.4
 Homepage: https://metacpan.org/release/MongoDB/
diff --git a/debian/rules b/debian/rules
index 9cf0565..f9f980f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,8 +8,10 @@ PIDFILE = $(BUILDHOME)/mongod.pid
 
 override_dh_auto_test:
 	mkdir -p $(BUILDHOME)
-	mongod --dbpath $(BUILDHOME) --noprealloc --nojournal --quiet --fork --logpath $(BUILDHOME)/mongod.log --pidfilepath $(PIDFILE)
-	sleep 10
+	if [ -x /usr/bin/mongod ]; then \
+	  mongod --dbpath $(BUILDHOME) --noprealloc --nojournal --quiet --fork --logpath $(BUILDHOME)/mongod.log --pidfilepath $(PIDFILE); \
+	  sleep 10; \
+	fi
 	dh_auto_test
 	[ ! -s $(PIDFILE) ] || /bin/kill `cat $(PIDFILE)`
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmongodb-perl.git



More information about the Pkg-perl-cvs-commits mailing list