summaryrefslogtreecommitdiffstats
path: root/For Weekly Test
diff options
context:
space:
mode:
authortriatmoko2011-07-18 17:08:49 +0200
committertriatmoko2011-07-18 17:08:49 +0200
commit0142e3a74f820177775a3d476c0651f4629026b6 (patch)
treeb8f25ba041373dc0753e2336d9e7b1c9a475e97d /For Weekly Test
parentChanged the code to make it more smoothly working. (diff)
downloadgsm-selftest-0142e3a74f820177775a3d476c0651f4629026b6.tar.gz
gsm-selftest-0142e3a74f820177775a3d476c0651f4629026b6.tar.xz
gsm-selftest-0142e3a74f820177775a3d476c0651f4629026b6.zip
modified controller.
Diffstat (limited to 'For Weekly Test')
-rw-r--r--For Weekly Test/20-07-2011/Controller.py2
-rw-r--r--For Weekly Test/20-07-2011/classClient.py8
-rw-r--r--For Weekly Test/20-07-2011/classClient.pycbin2884 -> 2791 bytes
-rw-r--r--For Weekly Test/20-07-2011/classController.py8
-rw-r--r--For Weekly Test/20-07-2011/classController.pycbin5346 -> 5353 bytes
-rw-r--r--For Weekly Test/20-07-2011/sipCall.py21
6 files changed, 13 insertions, 26 deletions
diff --git a/For Weekly Test/20-07-2011/Controller.py b/For Weekly Test/20-07-2011/Controller.py
index a4e64f1..5d4367c 100644
--- a/For Weekly Test/20-07-2011/Controller.py
+++ b/For Weekly Test/20-07-2011/Controller.py
@@ -100,6 +100,8 @@ if dbStatus == 1:
else:
x = classController.test(sipCall, "localhost", "Box1", "132.0.0.2","404")
x.FuncTest()
+ print ""
+ sleep(10)
db.addResult(taskID, testResult)
if repeatTest == "true":
#select temporary table, if there are have test from gsmrz to sip then skip
diff --git a/For Weekly Test/20-07-2011/classClient.py b/For Weekly Test/20-07-2011/classClient.py
index 625e48e..ce02d19 100644
--- a/For Weekly Test/20-07-2011/classClient.py
+++ b/For Weekly Test/20-07-2011/classClient.py
@@ -64,11 +64,3 @@ class Connection:
else:
return 0
-#MAIN PART
-x = Connection('localhost',50008)
-print x.connect()
-x.sendData('hello server :)')
-print x.receiveData()
-x.sendData('I send you another message')
-x.closeConnection()
-
diff --git a/For Weekly Test/20-07-2011/classClient.pyc b/For Weekly Test/20-07-2011/classClient.pyc
index 85f1aa7..9255493 100644
--- a/For Weekly Test/20-07-2011/classClient.pyc
+++ b/For Weekly Test/20-07-2011/classClient.pyc
Binary files differ
diff --git a/For Weekly Test/20-07-2011/classController.py b/For Weekly Test/20-07-2011/classController.py
index e26250d..f39aafb 100644
--- a/For Weekly Test/20-07-2011/classController.py
+++ b/For Weekly Test/20-07-2011/classController.py
@@ -161,9 +161,7 @@ class test:
print "Receiver handler : Ready"
print ""
- x.sendData("start")#send message to handler to start the call
- sleep(0.5)
- x.sendData(self.destNo)
+ x.sendData("start|"+self.destNo)#send message to handler to start the call
x.closeConnection()
x.connect()
@@ -194,9 +192,7 @@ class test:
#if failed, tell everybody to try one more time
if resultOrig == 486 or resultDest == 486:
- x.sendData("start")
- sleep(0.5)
- x.sendData(self.destNo)
+ x.sendData("start|"+self.destNo)
x.closeConnection()
x.connect()
diff --git a/For Weekly Test/20-07-2011/classController.pyc b/For Weekly Test/20-07-2011/classController.pyc
index 6abfa92..3104b8a 100644
--- a/For Weekly Test/20-07-2011/classController.pyc
+++ b/For Weekly Test/20-07-2011/classController.pyc
Binary files differ
diff --git a/For Weekly Test/20-07-2011/sipCall.py b/For Weekly Test/20-07-2011/sipCall.py
index f41756d..a863ce8 100644
--- a/For Weekly Test/20-07-2011/sipCall.py
+++ b/For Weekly Test/20-07-2011/sipCall.py
@@ -24,7 +24,6 @@ class MyCallCallback(pj.CallCallback):
else:
sleep(0.5)
-
if self.call.info().last_reason == "Busy Here":
server.sendData('486')
@@ -73,17 +72,15 @@ while stop <> True:
while 1:
try:
data = server.receiveData()
-
- if data == "start":
-
- while 1:
-
- num = server.receiveData()
- if num <> "":
-
- number = "sip:"+num+"@132.230.4.8"
- current_call = make_call(number)
- break
+ event = data[0:5]
+ num = data[6:]
+ if event == "start" and num <> "":
+
+ server.closeConnection()
+ tried = server.openSocket()
+
+ number = "sip:"+num+"@132.230.4.8"
+ current_call = make_call(number)
if data == "487":
stop = True