Module: sip-router
Branch: master
Commit: a0b247b8cd596b3032270316a2184a04c9cff917
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a0b247b…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Fri Mar 12 11:54:25 2010 +0200
test/unit Added support for running the tests if kamailio was built instead of ser
Support was added by checking what executable exists in the $SR_DIR path
---
test/unit/include/common | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/test/unit/include/common b/test/unit/include/common
index 14077d5..d918496 100644
--- a/test/unit/include/common
+++ b/test/unit/include/common
@@ -7,6 +7,15 @@ CTLRC="$CTL_DIR/kamctlrc"
CTL="$CTL_DIR/kamctl"
DBCTL="$CTL_DIR/kamdbctl"
BIN="$SR_DIR/ser"
+if [ -f $SR_DIR/ser ] ; then
+ BIN="$SR_DIR/ser"
+else
+ if [ -f $SR_DIR/kamailio ] ; then
+ BIN="$SR_DIR/kamailio"
+ else
+ echo "WARNING Binary not found!"
+ fi
+fi
KILL="killall -15 $BIN"
# test directory relative to root
TEST_DIR="test/unit"