summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/30-07-2011/gsmselftest.py
diff options
context:
space:
mode:
authorMac-Linux2011-07-28 14:45:40 +0200
committerMac-Linux2011-07-28 14:45:40 +0200
commit8f3f099c436843724268bd2dac70053f568f0378 (patch)
tree67822ecca53abdd65d3654410ec61954988300d1 /For Weekly Test/30-07-2011/gsmselftest.py
parenttake gsm handler from refik folder to being part of the test (diff)
downloadgsm-selftest-8f3f099c436843724268bd2dac70053f568f0378.tar.gz
gsm-selftest-8f3f099c436843724268bd2dac70053f568f0378.tar.xz
gsm-selftest-8f3f099c436843724268bd2dac70053f568f0378.zip
now testing include external GSM
Diffstat (limited to 'For Weekly Test/30-07-2011/gsmselftest.py')
-rwxr-xr-xFor Weekly Test/30-07-2011/gsmselftest.py84
1 files changed, 40 insertions, 44 deletions
diff --git a/For Weekly Test/30-07-2011/gsmselftest.py b/For Weekly Test/30-07-2011/gsmselftest.py
index 400970f..92842fe 100755
--- a/For Weekly Test/30-07-2011/gsmselftest.py
+++ b/For Weekly Test/30-07-2011/gsmselftest.py
@@ -30,10 +30,33 @@ def ping(handler):
server = PingClass.Ping('132.230.4.64')
serverStatus = server.ping(3)
+def allPing():
+
+ global sipGate
+ global sipServer
+ global sipLoc
+ global gsmBox1
+ global gsmBox2
+
+ server = PingClass.Ping('sipgate.de')
+ sipGate = server.ping(3)
+
+ server = PingClass.Ping('132.230.4.8')
+ sipServer = server.ping(3)
+
+ server = PingClass.Ping('132.230.252.228')
+ sipLoc = server.ping(3)
+
+ server = PingClass.Ping('localhost')
+ gsmBox1 = server.ping(3)
+
+ server = PingClass.Ping('132.230.4.64')
+ gsmBox2 = server.ping(3)
-def doTest(callFrom,callTo):
- global testResult
+def doTest(callFrom,callTo):
+ global testRepeat
+ testRepeat = None
ping(callFrom)
device = DeviceAddress.DeviceAddress()
@@ -53,17 +76,11 @@ def doTest(callFrom,callTo):
print 'Destination: ', callTo
makeTest = ControllerClass.test(callFrom, callAdd, callTo, recAdd, destNo)
makeTest.FuncTest()
-
- #db.addResult(taskID, makeTest.testResult)
if makeTest.repeatTest == True:
testRepeat = True
print "Result :", makeTest.testResult
-
- #db.deleteTempTask(taskID)
- #db.tasksList.remove(item)
- #db.tasksList.insert(i,'')
sleep(3)
else:
print "[failed] 500 "+callTo+ " Server Internal Error"
@@ -80,6 +97,8 @@ def doSipTest():
callFrom = 'sip'
if callFrom <> callTo:
doTest(callFrom, callTo)
+ if testRepeat == True:
+ doTest(callTo,callFrom)
def doLandlineTest():
@@ -90,38 +109,36 @@ def doLandlineTest():
callFrom = 'landline'
doTest(callFrom, callTo)
+ if testRepeat == True:
+ doTest(callTo,callFrom)
def doGsmrzTest():
print '--GSM Part Test--'
destList = ['sip', 'gsmr1','gsmr2', 'gsmr3', 'landline', 'unisip', 'gsmeO', 'gsmeV', 'gsmeT', 'gsmeE']
- calllist = ['gsmr1','gsmr2', 'gsmr3']
+ callList = ['gsmr1','gsmr2', 'gsmr3']
- for callFrom in calllist:
+ for callFrom in callList:
for callTo in destList:
if callTo <> callFrom:
doTest(callFrom, callTo)
+ if testRepeat == True:
+ doTest(callTo,callFrom)
doGsmExtTest()
def doGsmExtTest():
destList = ['sip', 'gsmr1','gsmr2', 'gsmr3']
+ callList = ['gsmeO', 'gsmeV', 'gsmeT', 'gsmeE']
- for callTo in destList:
-
- callFrom = 'gsmeO'
- doTest(callFrom, callTo)
-
- callFrom = 'gsmeV'
- doTest(callFrom, callTo)
-
- callFrom = 'gsmeT'
- doTest(callFrom, callTo)
-
- callFrom = 'gsmeE'
- doTest(callFrom, callTo)
+ for callFrom in callList:
+ for callTo in destList:
+
+ doTest(callFrom, callTo)
+ if testRepeat == True:
+ doTest(callTo,callFrom)
def doAllTest():
@@ -226,28 +243,7 @@ else:
-def allPing():
-
- global sipGate
- global sipServer
- global sipLoc
- global gsmBox1
- global gsmBox2
-
- server = PingClass.Ping('sipgate.de')
- sipGate = server.ping(3)
-
- server = PingClass.Ping('132.230.4.8')
- sipServer = server.ping(3)
-
- server = PingClass.Ping('132.230.252.228')
- sipLoc = server.ping(3)
- server = PingClass.Ping('localhost')
- gsmBox1 = server.ping(3)
-
- server = PingClass.Ping('132.230.4.64')
- gsmBox2 = server.ping(3)