Selaa lähdekoodia

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
Marius Zbihlei 15 vuotta sitten
vanhempi
commit
a0b247b8cd
1 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. 9 0
      test/unit/include/common

+ 9 - 0
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"