Module: sip-router
Branch: master
Commit: 2c9196b6e53885d4cde7534b3230426d769e561b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2c9196b…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Fri Oct 23 17:31:18 2009 +0300
Fixed test 36.sh
Grepped into location after specific string (___test___)
Better formating
---
test/unit/36.sh | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/test/unit/36.sh b/test/unit/36.sh
index 808ccb6..da63623 100755
--- a/test/unit/36.sh
+++ b/test/unit/36.sh
@@ -31,10 +31,10 @@ CFG=11.cfg
cp $CFG $CFG.bak
-echo "loadmodule \"db_mysql/db_mysql.so\"" >> $CFG
+echo "loadmodule \"../../modules/db_mysql/db_mysql.so\"" >>
$CFG
# 1768 contacts should fit into 1 MB of PKG memory
-../$BIN -V | grep "PKG_MALLOC" > /dev/null
+$BIN -V | grep "PKG_MALLOC" > /dev/null
if [ $? -eq 0 ]; then
NR=176
else
@@ -44,16 +44,25 @@ fi;
COUNTER=0
while [ $COUNTER -lt $NR ]; do
COUNTER=$(($COUNTER+1))
- $MYSQL "insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); insert into location
(username, domain, contact, user_agent) values ('foobar-$COUNTER-$RANDOM',
'local', 'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); insert
into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); insert into location
(username, domain, contact, user_agent) values ('foobar-$COUNTER-$RANDOM',
'local', 'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); insert
into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); insert into location
(username, domain, contact, user_agent) values ('foobar-$COUNTER-$RANDOM',
'local', 'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); insert
into location (username, domain, contact, u
ser_agent) values ('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); insert into location
(username, domain, contact, user_agent) values ('foobar-$COUNTER-$RANDOM',
'local', 'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); insert
into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); insert into location
(username, domain, contact, user_agent) values ('foobar-$COUNTER-$RANDOM',
'local', 'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___');"
+ $MYSQL "insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); \
+ insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); \
+ insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); \
+ insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); \
+ insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); \
+ insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); \
+ insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); \
+ insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); \
+ insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___'); \
+ insert into location (username, domain, contact, user_agent) values
('foobar-$COUNTER-$RANDOM', 'local',
'foobar-$COUNTER-$RANDOM@$DOMAIN', '___test___');"
done
-../$BIN -w . -f $CFG > /dev/null
+$BIN -w . -f $CFG > /dev/null
ret=$?
if [ $ret -eq 0 ]; then
sleep 1
for ((i=1;i<=100;i+=1)); do
- tmp=`../scripts/$CTL fifo ul_dump | grep "AOR" | wc -l`
+ tmp=$($CTL fifo ul_dump | grep "User-agent:: ___test___" | wc -l)
NR_=$(($NR * 10))
if ! [ $tmp -eq $NR_ ]; then
ret=1