summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/20-07-2011/classController.py
diff options
context:
space:
mode:
authortriatmoko2011-07-18 16:15:35 +0200
committertriatmoko2011-07-18 16:15:35 +0200
commit7b2c90066692566044ac80ec421e15a1aee7ab25 (patch)
treeebe71e8809059d40b1d02569514ad173572bfb72 /For Weekly Test/20-07-2011/classController.py
parentJust two scripts that test the GSM2GSM system! (diff)
downloadgsm-selftest-7b2c90066692566044ac80ec421e15a1aee7ab25.tar.gz
gsm-selftest-7b2c90066692566044ac80ec421e15a1aee7ab25.tar.xz
gsm-selftest-7b2c90066692566044ac80ec421e15a1aee7ab25.zip
fixed bugs for calling part on sip.
Diffstat (limited to 'For Weekly Test/20-07-2011/classController.py')
-rw-r--r--For Weekly Test/20-07-2011/classController.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/For Weekly Test/20-07-2011/classController.py b/For Weekly Test/20-07-2011/classController.py
index a3e98ff..e26250d 100644
--- a/For Weekly Test/20-07-2011/classController.py
+++ b/For Weekly Test/20-07-2011/classController.py
@@ -34,7 +34,7 @@ class test:
def timeout_handler(signum, frame):
raise TimeoutException()
-
+ print ""
print "====================== Preparing Test ======================"
try:
@@ -102,7 +102,7 @@ class test:
print ""
try:
- global portDest
+ print self.dest
if self.dest =="gsmBox1" or self.dest =="gsmBox2":
@@ -112,7 +112,7 @@ class test:
if self.dest =="gsmBox2":
self.portDest = 50103
- y = classClient.Connection(destAdd,portDest)
+ y = classClient.Connection(self.destAdd, self.portDest)
print "Connecting to Receiver handler"
print "Receiver handler status: ", y.connect()
y.sendData('hello server please wakeup the handler and be receiver')
@@ -126,7 +126,7 @@ class test:
if self.dest=="SIPReceiver.py":
self.portDest = 50104
- if self.dest=="rz1Receiver.py":
+ if self.dest=="gsmincom_.py":
self.portDest = 50105
if self.dest == "landlineReceiver.py":
@@ -139,10 +139,9 @@ class test:
#print "not define yet"
#portDest = 50108
- y = classClient.Connection(self.destAdd,portDest)
- print "Connecting to Receiver handler"
+ y = classClient.Connection(self.destAdd, self.portDest)
+ print "Connecting to Receiver handler xx", self.destAdd, self.portDest, self.dest
print "Receiver handler status:", y.connect()
- y.sendData('hello Receiver')
signal.signal(signal.SIGALRM, timeout_handler)
@@ -173,7 +172,7 @@ class test:
y.connect()
signal.signal(signal.SIGALRM, timeout_handler)
- signal.alarm(120)
+ signal.alarm(1200)
print "------------ Test Result ------------"
print ""
@@ -184,7 +183,7 @@ class test:
resultOrig = x.receiveData()
resultDest = y.receiveData()
- if resultOrig <> "" or resultDest <> "":
+ if resultOrig <> "" and resultDest <> "":
break
except TimeoutException:
@@ -214,7 +213,7 @@ class test:
resultOrig = x.receiveData()
resultDest = y.receiveData()
- if resultOrig <> "" or resultDest <> "":
+ if resultOrig <> "" and resultDest <> "":
break
except TimeoutException: