test/unit Added support for running the tests if kamailio was built instead of ser
authorMarius Zbihlei <marius.zbihlei@1and1.ro>
Fri, 12 Mar 2010 09:54:25 +0000 (11:54 +0200)
committerMarius Zbihlei <marius.zbihlei@1and1.ro>
Fri, 12 Mar 2010 09:54:25 +0000 (11:54 +0200)
Support was added by checking what executable exists in the $SR_DIR path

test/unit/include/common

index 14077d5..d918496 100644 (file)
@@ -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"