From 5b78c8b2fa20fa0ab211fa33cdc57995e9e3bf6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Tue, 2 Feb 2016 09:42:22 +0100
Subject: Print log if server could not been started

---
 perl-MongoDB.spec | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/perl-MongoDB.spec b/perl-MongoDB.spec
index 0ecfb0d..895c052 100644
--- a/perl-MongoDB.spec
+++ b/perl-MongoDB.spec
@@ -1,6 +1,6 @@
 Name:           perl-MongoDB
 Version:        0.708.4.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A MongoDB Driver for Perl
 # The distribution itself is under ASL 2.0
 # Various parts of the BSON and YAJL bits are under a combination
@@ -98,7 +98,13 @@ find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f 
{} +
 
 %check
 mkdir test_db
-mongod --fork --logpath $PWD/mongod.log --pidfilepath $PWD/mongod.pid --dbpath 
$PWD/test_db/
+mongod --fork --logpath $PWD/mongod.log --pidfilepath $PWD/mongod.pid \
+    --dbpath $PWD/test_db/ || test_rc=$?
+if [ -n "$test_rc" ]; then
+    printf "Error: Could not start mongod server\n"
+    cat mongod.log
+    exit 1
+fi
 make test || test_rc=$?
 kill `cat mongod.pid`
 cat mongod.log
@@ -112,6 +118,9 @@ exit $test_rc
 %{_mandir}/man3/*
 
 %changelog
+* Tue Feb 02 2016 Petr Pisar <ppi...@redhat.com> - 0.708.4.0-2
+- Print log if server could not been started
+
 * Wed Aug 12 2015 Petr Ĺ abata <con...@redhat.com> - 0.708.4.0-1
 - 0.708.4.0 bump, fix the build
 - Source URL updated
-- 
cgit v0.11.2


        
http://pkgs.fedoraproject.org/cgit/perl-MongoDB.git/commit/?h=master&id=5b78c8b2fa20fa0ab211fa33cdc57995e9e3bf6f
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to