summaryrefslogtreecommitdiffstats
path: root/For Weekly Test
diff options
context:
space:
mode:
authortriatmoko2011-07-18 17:46:32 +0200
committertriatmoko2011-07-18 17:46:32 +0200
commit8f8af7bde52680e1c71807b18422b908cf58d52d (patch)
tree5eff18df95e847888444ff990b52b2071af1ecef /For Weekly Test
parentokMerge branch 'master' of lab.ks.uni-freiburg.de:lsfks/projekte/gsm-selftest (diff)
downloadgsm-selftest-8f8af7bde52680e1c71807b18422b908cf58d52d.tar.gz
gsm-selftest-8f8af7bde52680e1c71807b18422b908cf58d52d.tar.xz
gsm-selftest-8f8af7bde52680e1c71807b18422b908cf58d52d.zip
fic landline handler to be the same with sip part.
Diffstat (limited to 'For Weekly Test')
-rw-r--r--For Weekly Test/20-07-2011/Controller.py6
-rw-r--r--For Weekly Test/20-07-2011/classController.py19
-rw-r--r--For Weekly Test/20-07-2011/classController.pycbin5353 -> 5539 bytes
-rw-r--r--For Weekly Test/20-07-2011/landlineReceiver.py2
-rw-r--r--For Weekly Test/20-07-2011/sipCall.py5
5 files changed, 23 insertions, 9 deletions
diff --git a/For Weekly Test/20-07-2011/Controller.py b/For Weekly Test/20-07-2011/Controller.py
index 5d4367c..69d9d87 100644
--- a/For Weekly Test/20-07-2011/Controller.py
+++ b/For Weekly Test/20-07-2011/Controller.py
@@ -101,7 +101,7 @@ if dbStatus == 1:
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
@@ -116,6 +116,8 @@ if dbStatus == 1:
else:
x = classController.test(sipCall, "localhost", "Box2", "132.0.0.3","405")
x.FuncTest()
+
+
db.addResult(taskID, testResult)
if repeatTest == "true":
#select temporary table, if there are have test from gsmrz to sip then skip
@@ -129,6 +131,8 @@ if dbStatus == 1:
else:
x = classController.test(sipCall, "localhost", landlnRec, "localhost",landlnNum)
x.FuncTest()
+ sleep(10)
+ #print x.testResult()
db.addResult(taskID, testResult)
if callTo == "localsip":
diff --git a/For Weekly Test/20-07-2011/classController.py b/For Weekly Test/20-07-2011/classController.py
index f39aafb..193f1b4 100644
--- a/For Weekly Test/20-07-2011/classController.py
+++ b/For Weekly Test/20-07-2011/classController.py
@@ -210,6 +210,7 @@ class test:
resultDest = y.receiveData()
if resultOrig <> "" and resultDest <> "":
+ print "here"
break
except TimeoutException:
@@ -220,12 +221,14 @@ class test:
#if still failed, we make automatic test vice versa
if resultOrig == 486 or resultDest == 486:
- testResult = 486
+ self.testResult = 486
repeatTest = True
+ return 486
print "Second test result origin: ", resultOrig
print "Second test result Destination: ", resultDest
else:
- testResult = 200
+ self.testResult = 200
+ return 200
print "Second test result origin: ", resultOrig
print "Second test result Destination: ", resultDest
x.sendData('487')
@@ -233,14 +236,15 @@ class test:
else:
- testResult = 200
+ self.testResult = 200
+ return 200
print "Test Result origin: ", resultOrig
print "Test Result Destination: ", resultDest
x.sendData('487')
y.sendData('487')
else:
- testResult = 604
+ self.testResult = 604
print "604 General Handler Error: Destination handler no respond"
#tell Caller handler to terminate because receiver doesnt work
x.sendData('487')
@@ -249,9 +253,9 @@ class test:
except ValueError:
print "601 General Handler Error: Could not open Destination handler"
- testResult = "601"
+ self.testResult = 601
else:
- testResult = 605
+ self.testResult = 605
print "605 General Handler Error: Origin handler no respond"
x.closeConnection()
@@ -260,3 +264,6 @@ class test:
testResult = 602
print "602 General Handler Error: Could not open Origin handler"
+ def testResult(self):
+ return 200
+
diff --git a/For Weekly Test/20-07-2011/classController.pyc b/For Weekly Test/20-07-2011/classController.pyc
index 3104b8a..763113e 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/landlineReceiver.py b/For Weekly Test/20-07-2011/landlineReceiver.py
index 0890f36..69b19c5 100644
--- a/For Weekly Test/20-07-2011/landlineReceiver.py
+++ b/For Weekly Test/20-07-2011/landlineReceiver.py
@@ -56,6 +56,7 @@ class MyAccountCallback(pj.AccountCallback):
sleep(1)
#current_call.hangup()
#status = 200
+ print "Here"
server.sendData('200')
class MyCallCallback(pj.CallCallback):
@@ -109,6 +110,7 @@ try:
server.sendData('ready')
server.closeConnection()
tried = server.openSocket()
+ print "status", server.connected
while stop <> True:
data = server.receiveData()
diff --git a/For Weekly Test/20-07-2011/sipCall.py b/For Weekly Test/20-07-2011/sipCall.py
index a863ce8..75d299e 100644
--- a/For Weekly Test/20-07-2011/sipCall.py
+++ b/For Weekly Test/20-07-2011/sipCall.py
@@ -19,7 +19,7 @@ class MyCallCallback(pj.CallCallback):
sleep(1)
if self.call.info().state <> pj.CallState.DISCONNECTED:
current_call.hangup()
-
+ print "here2"
server.sendData('200')
else:
sleep(0.5)
@@ -75,9 +75,10 @@ while stop <> True:
event = data[0:5]
num = data[6:]
if event == "start" and num <> "":
-
+
server.closeConnection()
tried = server.openSocket()
+ print "here", server.connected
number = "sip:"+num+"@132.230.4.8"
current_call = make_call(number)