[SR-Dev] git:master: test: small fixes for test 2, port test 1 and 4

Henning Westerholt henning.westerholt at 1und1.de
Wed May 6 18:37:29 CEST 2009


Module: sip-router
Branch: master
Commit: f2379c23397cda41a571587a8e2220627cbbadfe
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f2379c23397cda41a571587a8e2220627cbbadfe

Author: Henning Westerholt <henning.westerholt at 1und1.de>
Committer: Henning Westerholt <henning.westerholt at 1und1.de>
Date:   Wed May  6 18:35:38 2009 +0200

test: small fixes for test 2, port test 1 and 4

---

 test/unit/1.sh  |    4 ++--
 test/unit/2.cfg |   21 ++++++++++-----------
 test/unit/2.sh  |    6 +++---
 test/unit/4.sh  |   11 ++++-------
 4 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/test/unit/1.sh b/test/unit/1.sh
index 65859ec..f44fd4e 100755
--- a/test/unit/1.sh
+++ b/test/unit/1.sh
@@ -24,9 +24,9 @@ source include/common
 CFG=1.cfg
 
 # setup config
-echo -e "debug=3" > $CFG
+echo -e "debug=2" > $CFG
 
-../$BIN -w . -f $CFG > /dev/null
+$BIN -w . -f $CFG > /dev/null
 ret=$?
 
 sleep 1
diff --git a/test/unit/2.cfg b/test/unit/2.cfg
index 5b7a1df..3528cca 100644
--- a/test/unit/2.cfg
+++ b/test/unit/2.cfg
@@ -1,8 +1,7 @@
 debug=2
-# FIXME
-##loadpath "../../modules"
 loadpath "../../modules_k"
 loadmodule "../../modules/tm/tm.so"
+loadmodule "tmx"
 loadmodule "acc"
 loadmodule "alias_db"
 loadmodule "auth"
@@ -10,8 +9,8 @@ loadmodule "auth_db"
 loadmodule "avpops"
 loadmodule "benchmark"
 loadmodule "cfgutils"
-##loadmodule "dialog"
-##loadmodule "dispatcher"
+###loadmodule "dialog"
+loadmodule "dispatcher"
 loadmodule "diversion"
 loadmodule "domain"
 loadmodule "domainpolicy"
@@ -37,31 +36,31 @@ loadmodule "siputils"
 loadmodule "sl"
 loadmodule "sms"
 loadmodule "speeddial"
-loadmodule "sst"
-##loadmodule "statistics"
+###loadmodule "sst"
+loadmodule "statistics"
 loadmodule "textops"
 loadmodule "uac"
 ##loadmodule "uac_redirect"
 loadmodule "uri_db"
 loadmodule "usrloc"
 loadmodule "userblacklist"
-##loadmodule "registrar"
+loadmodule "registrar"
 loadmodule "permissions"
 loadmodule "pdt"
-##loadmodule "pv"
+loadmodule "pv"
 loadmodule "mediaproxy"
 loadmodule "xlog"
 
 modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
 modparam("mi_datagram", "socket_name", "/tmp/kamailio.sock")
-##modparam("dialog", "dlg_flag", 10)
-##modparam("dialog", "db_mode", 2)
+###modparam("dialog", "dlg_flag", 10)
+###modparam("dialog", "db_mode", 2)
 ##modparam("tm", "fr_inv_timer_avp", "$avp(i:704)")
 modparam("^auth$|lcr", "rpid_avp", "$avp(i:302)")
 modparam("sms", "modems", "Nokia [d=/dev/ttyS1;b=9600;m=new;l=30] ")
 modparam("sms", "networks", "D1 [m=10] ;d2[ m=20]")
 modparam("sms", "links", "NOKIA[D1;d2]")
-modparam("sst", "sst_flag", 6)
+###modparam("sst", "sst_flag", 6)
 modparam("usrloc", "nat_bflag", 15)
 modparam("uri_db", "use_uri_table", 1)
 modparam("uri_db", "db_table", "uri")
diff --git a/test/unit/2.sh b/test/unit/2.sh
index 8cbea91..f0b09b9 100755
--- a/test/unit/2.sh
+++ b/test/unit/2.sh
@@ -35,9 +35,9 @@ cp $CFG $CFG.bak
 
 touch dispatcher.list
 
-##echo "loadmodule \"../../modules/db_mysql/db_mysql.so\"" >> $CFG
-##echo "modparam(\"dispatcher\", \"list_file\", \"`pwd`/../test/dispatcher.list\")" >> $CFG
-cat $CFG > foobar
+echo "loadmodule \"$SR_DIR/modules/db_mysql/db_mysql.so\"" >> $CFG
+echo "modparam(\"dispatcher\", \"list_file\", \"$SR_DIR/$TEST_DIR/dispatcher.list\")" >> $CFG
+
 # start
 $BIN -w . -f $CFG > /dev/null
 ret=$?
diff --git a/test/unit/4.sh b/test/unit/4.sh
index f29a317..4df2223 100755
--- a/test/unit/4.sh
+++ b/test/unit/4.sh
@@ -29,24 +29,21 @@ if ! (check_kamailio); then
 fi ;
 
 # setup config
-echo -e "loadmodule \"../modules/mi_fifo/mi_fifo.so\"" > $CFG
+echo -e "loadmodule \"$SR_DIR/modules_k/mi_fifo/mi_fifo.so\"" > $CFG
+echo -e "loadmodule \"$SR_DIR/modules_k/kex/kex.so\"" >> $CFG
 echo -e "modparam(\"mi_fifo\", \"fifo_name\", \"/tmp/kamailio_fifo\")" >> $CFG
 
 
         
-../$BIN -w . -f $CFG > /dev/null
+$BIN -w . -f $CFG > /dev/null
 ret=$?
 
-cd ../scripts
-
 if [ "$ret" -eq 0 ] ; then
 	sleep 1
-	./$CTL ps > /dev/null
+	$CTL version > /dev/null
 	ret=$?
 fi ;
 
-cd ../test
-
 $KILL
 
 rm -f $CFG




More information about the sr-dev mailing list