summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/ClientClass.py0
-rw-r--r--For Weekly Test/Advance/ClientClass.pycbin3574 -> 3457 bytes
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/ControllerClass.py22
-rw-r--r--For Weekly Test/Advance/ControllerClass.pycbin7220 -> 7093 bytes
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/DbClass.py0
-rw-r--r--For Weekly Test/Advance/DbClass.pycbin6881 -> 6699 bytes
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/GSMClass.py0
-rw-r--r--For Weekly Test/Advance/GSMClass.pycbin7085 -> 6916 bytes
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/GSMHandler.py4
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/LogFileClass.py0
-rw-r--r--For Weekly Test/Advance/LogFileClass.pycbin1479 -> 1414 bytes
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/PingClass.py0
-rw-r--r--For Weekly Test/Advance/PingClass.pycbin1239 -> 1187 bytes
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/SIPHandler.py16
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/SSHTunnelBoxClass.py0
-rw-r--r--For Weekly Test/Advance/SSHTunnelBoxClass.pycbin1805 -> 1740 bytes
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/SSHTunnelClass.py0
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/ServerClass.py0
-rw-r--r--For Weekly Test/Advance/ServerClass.pycbin4530 -> 4387 bytes
-rw-r--r--For Weekly Test/Advance/TestProcessLog.log0
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/gsmselftest-website.py0
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/gsmselftest-website2.py23
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/gsmselftest.py75
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/help.txt0
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/initTestClass.py37
-rw-r--r--For Weekly Test/Advance/initTestClass.pycbin5495 -> 5750 bytes
-rw-r--r--For Weekly Test/Advance/procname-0.2/Makefile13
-rwxr-xr-xFor Weekly Test/Advance/procname-0.2/procname.sobin7340 -> 0 bytes
-rw-r--r--For Weekly Test/Advance/procname-0.2/procnamemodule.c65
-rw-r--r--For Weekly Test/Advance/procname-0.2/procnamemodule.obin2616 -> 0 bytes
-rw-r--r--For Weekly Test/Advance/procname-0.2/test.py10
-rw-r--r--For Weekly Test/Advance/procname-0.2/test2.py9
-rwxr-xr-xFor Weekly Test/Advance/procname.sobin7340 -> 0 bytes
-rw-r--r--For Weekly Test/Advance/procnamemodule.c65
-rw-r--r--For Weekly Test/Advance/procnamemodule.obin2616 -> 0 bytes
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/trueTableClass.py52
-rw-r--r--For Weekly Test/Advance/trueTableClass.pycbin3236 -> 3314 bytes
-rwxr-xr-x[-rw-r--r--]For Weekly Test/Advance/usbDetectClass.py0
-rw-r--r--For Weekly Test/Advance/usbDetectClass.pycbin3411 -> 3294 bytes
-rw-r--r--For Weekly Test/kill.py (renamed from For Weekly Test/Advance/procname-0.2/kill.py)7
-rw-r--r--For Weekly Test/testingfile.py3
41 files changed, 142 insertions, 259 deletions
diff --git a/For Weekly Test/Advance/ClientClass.py b/For Weekly Test/Advance/ClientClass.py
index 46c3b00..46c3b00 100644..100755
--- a/For Weekly Test/Advance/ClientClass.py
+++ b/For Weekly Test/Advance/ClientClass.py
diff --git a/For Weekly Test/Advance/ClientClass.pyc b/For Weekly Test/Advance/ClientClass.pyc
index 965a70c..566715a 100644
--- a/For Weekly Test/Advance/ClientClass.pyc
+++ b/For Weekly Test/Advance/ClientClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/ControllerClass.py b/For Weekly Test/Advance/ControllerClass.py
index 5a57b9d..5bcb53e 100644..100755
--- a/For Weekly Test/Advance/ControllerClass.py
+++ b/For Weekly Test/Advance/ControllerClass.py
@@ -85,10 +85,11 @@ class doTheTest:
def waitingFeedback(self):
logger.logEvent('Waiting Feedback')
- self.resultCaller = self.caller.receiveData(15)
self.resultDest = self.receiver.receiveData(15)
-
- if self.resultCaller <> 'CALL OK' or self.resultDest <> 'CALL OK':
+ self.resultCaller = self.caller.receiveData(15)
+ print 'call', self.resultCaller
+ print 'Dest', self.resultDest
+ if self.resultCaller <> 'CALL OK' and self.resultDest <> 'CALL OK':
logger.logEvent('Test Failed')
self.testResult = 486
@@ -104,14 +105,14 @@ class doTheTest:
self.receiver.sendData('RECEIVE START')
self.caller.sendData('CALL START')
- def initAccount(self,account):
+ def initAccount(self, account):
accConf = account
self.username = accConf[0:accConf.find(':')]
-
+
line = accConf[accConf.find(':')+1:]
self.password = line[0:line.find(':')]
-
+
newLine = line[line.find(':')+1:]
self.server = newLine[0:newLine.find(':')]
@@ -124,8 +125,9 @@ class doTheTest:
if self.callFrom =="GSMRZ1":
self.initGSM(self.portCaller, self.callPortName, self.callFrom)
else:
- initAccount(self.account)
- self.boxCaller = SHHTunnelBoxClass.SSHTunneling(self.portCaller, 50008, self.server, self.username, self.password)
+ self.initAccount(self.accCaller)
+
+ self.boxCaller = SSHTunnelBoxClass.SSHTunneling(self.portCaller, 50008, self.server, self.username, self.password)
self.boxCaller.startTunneling()
elif self.callFrom[0:4] == 'GSME':
@@ -143,8 +145,8 @@ class doTheTest:
if self.dest =="GSMRZ1":
self.initGSM(self.portDest, self.destPortName, self.dest)
else:
- initAccount(self.account)
- self.boxDest = SHHTunnelBoxClass.SSHTunneling(self.portCaller, 50008, self.server, self.username, self.password)
+ self.initAccount(self.accDest)
+ self.boxDest = SSHTunnelBoxClass.SSHTunneling(self.portDest, 50008, self.server, self.username, self.password)
self.boxDest.startTunneling()
elif self.dest[0:4] == 'GSME':
diff --git a/For Weekly Test/Advance/ControllerClass.pyc b/For Weekly Test/Advance/ControllerClass.pyc
index 9c800ba..81f4e83 100644
--- a/For Weekly Test/Advance/ControllerClass.pyc
+++ b/For Weekly Test/Advance/ControllerClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/DbClass.py b/For Weekly Test/Advance/DbClass.py
index e7d6d64..e7d6d64 100644..100755
--- a/For Weekly Test/Advance/DbClass.py
+++ b/For Weekly Test/Advance/DbClass.py
diff --git a/For Weekly Test/Advance/DbClass.pyc b/For Weekly Test/Advance/DbClass.pyc
index 6cc4ad4..f86d3b6 100644
--- a/For Weekly Test/Advance/DbClass.pyc
+++ b/For Weekly Test/Advance/DbClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/GSMClass.py b/For Weekly Test/Advance/GSMClass.py
index e994814..e994814 100644..100755
--- a/For Weekly Test/Advance/GSMClass.py
+++ b/For Weekly Test/Advance/GSMClass.py
diff --git a/For Weekly Test/Advance/GSMClass.pyc b/For Weekly Test/Advance/GSMClass.pyc
index 5842f1f..b320ea6 100644
--- a/For Weekly Test/Advance/GSMClass.pyc
+++ b/For Weekly Test/Advance/GSMClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/GSMHandler.py b/For Weekly Test/Advance/GSMHandler.py
index 9c55d82..c074145 100644..100755
--- a/For Weekly Test/Advance/GSMHandler.py
+++ b/For Weekly Test/Advance/GSMHandler.py
@@ -3,7 +3,7 @@ import GSMClass
import LogFileClass
from time import sleep
import sys
-import procname
+import setproctitle
global portListen
global portAddress
@@ -259,7 +259,7 @@ def other():
##############################
-procname.setprocname('GSM Handler')
+setproctitle.setproctitle('GSM Handler')
while 1:
test = initSystem()
if test == 1:
diff --git a/For Weekly Test/Advance/LogFileClass.py b/For Weekly Test/Advance/LogFileClass.py
index cb152f4..cb152f4 100644..100755
--- a/For Weekly Test/Advance/LogFileClass.py
+++ b/For Weekly Test/Advance/LogFileClass.py
diff --git a/For Weekly Test/Advance/LogFileClass.pyc b/For Weekly Test/Advance/LogFileClass.pyc
index be680a9..6c7db7a 100644
--- a/For Weekly Test/Advance/LogFileClass.pyc
+++ b/For Weekly Test/Advance/LogFileClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/PingClass.py b/For Weekly Test/Advance/PingClass.py
index e13b32b..e13b32b 100644..100755
--- a/For Weekly Test/Advance/PingClass.py
+++ b/For Weekly Test/Advance/PingClass.py
diff --git a/For Weekly Test/Advance/PingClass.pyc b/For Weekly Test/Advance/PingClass.pyc
index e12a2a0..9a9c364 100644
--- a/For Weekly Test/Advance/PingClass.pyc
+++ b/For Weekly Test/Advance/PingClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/SIPHandler.py b/For Weekly Test/Advance/SIPHandler.py
index 1c87186..ac02836 100644..100755
--- a/For Weekly Test/Advance/SIPHandler.py
+++ b/For Weekly Test/Advance/SIPHandler.py
@@ -3,8 +3,7 @@ import string
import pjsua as pj
import ServerClass
import LogFileClass
-import procname
-
+import setproctitle
from time import sleep
def log_cb(level, str, len):
@@ -34,8 +33,8 @@ class Account(pj.AccountCallback):
class Calling(pj.CallCallback):
- def __init__(self, call=None):
- pj.CallCallback.__init__(self, call)
+ def __init__(self, call=None):
+ pj.CallCallback.__init__(self, call)
def on_state(self):
global current_call
@@ -121,7 +120,11 @@ def initState():
elif message[0:6] == 'CALLER':
state = 'CALLER'
- num = message[7:]
+ no = message[7:]
+ if sipServer == '132.230.252.228':
+ num = no[7:]
+ else:
+ num = no
def initHandler():
global sipServer
@@ -142,9 +145,8 @@ def initHandler():
lib = pj.Lib()
stop = False
-procname.setprocname('SIP Handler')
initHandler()
-
+setproctitle.setproctitle('SIP Handler')
initLogFile(sipServer)
logger.logEvent('')
diff --git a/For Weekly Test/Advance/SSHTunnelBoxClass.py b/For Weekly Test/Advance/SSHTunnelBoxClass.py
index 0447365..0447365 100644..100755
--- a/For Weekly Test/Advance/SSHTunnelBoxClass.py
+++ b/For Weekly Test/Advance/SSHTunnelBoxClass.py
diff --git a/For Weekly Test/Advance/SSHTunnelBoxClass.pyc b/For Weekly Test/Advance/SSHTunnelBoxClass.pyc
index 5d05578..0fec2fe 100644
--- a/For Weekly Test/Advance/SSHTunnelBoxClass.pyc
+++ b/For Weekly Test/Advance/SSHTunnelBoxClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/SSHTunnelClass.py b/For Weekly Test/Advance/SSHTunnelClass.py
index 12bedeb..12bedeb 100644..100755
--- a/For Weekly Test/Advance/SSHTunnelClass.py
+++ b/For Weekly Test/Advance/SSHTunnelClass.py
diff --git a/For Weekly Test/Advance/ServerClass.py b/For Weekly Test/Advance/ServerClass.py
index 93c2f8e..93c2f8e 100644..100755
--- a/For Weekly Test/Advance/ServerClass.py
+++ b/For Weekly Test/Advance/ServerClass.py
diff --git a/For Weekly Test/Advance/ServerClass.pyc b/For Weekly Test/Advance/ServerClass.pyc
index 8072cd8..320bdd0 100644
--- a/For Weekly Test/Advance/ServerClass.pyc
+++ b/For Weekly Test/Advance/ServerClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/TestProcessLog.log b/For Weekly Test/Advance/TestProcessLog.log
deleted file mode 100644
index e69de29..0000000
--- a/For Weekly Test/Advance/TestProcessLog.log
+++ /dev/null
diff --git a/For Weekly Test/Advance/gsmselftest-website.py b/For Weekly Test/Advance/gsmselftest-website.py
index d731757..d731757 100644..100755
--- a/For Weekly Test/Advance/gsmselftest-website.py
+++ b/For Weekly Test/Advance/gsmselftest-website.py
diff --git a/For Weekly Test/Advance/gsmselftest-website2.py b/For Weekly Test/Advance/gsmselftest-website2.py
index efaf355..7f70c6b 100644..100755
--- a/For Weekly Test/Advance/gsmselftest-website2.py
+++ b/For Weekly Test/Advance/gsmselftest-website2.py
@@ -47,25 +47,29 @@ def initDB(): # function for connection database
dbStatus = db.connectDB()
-def initTrueTable(x): #define and indetified error from the test results
-
+def initTrueTable(x):
initResult = trueTableClass.trueTable(x)
initResult.initTrueTable()
print '\n'
openBSC = None
+ if openBSC == True:
+ print 'openBSC working'
+ else:
+ print 'openBSC doesnt work'
+ print ''
for x in initResult.nanoBts:
name = x[0]
if x[1] == True:
openBSC = True
asterikServer = True
- print name+ ' Working'
else:
- print name+ ' not Working'
+ if x[1] == '486':
+ print name+ ' not Working'
+ else:
+ print name+ ' not Working, handler error'
- if openBSC == True:
- print 'openBSC working'
if initResult.asteriskServer == True:
- print 'asterisk server is working'
+ print 'asterik server is working'
print '\n'
if initResult.outGoingRZ == True:
@@ -78,7 +82,6 @@ def initTrueTable(x): #define and indetified error from the test results
elif initResult.incomingRZ == False:
print 'incoming call from outside RZ to GSM RZ is not working'
print '\n'
-
def doSipTest():
@@ -211,7 +214,7 @@ def withDB(x):
db.cleanTasksList()
if x == True:
- sendFinishMessage() send finish message to website and close the connection
+ sendFinishMessage() #send finish message to website and close the connection
print '\n'
@@ -396,7 +399,7 @@ else:
tried = server.openSocket(3)
if tried == 'TIMEOUT':
- closeFunction(db,server)
+ closeFunction(db,server)
test = server.receiveData(2)
if test == 'TIMEOUT':
diff --git a/For Weekly Test/Advance/gsmselftest.py b/For Weekly Test/Advance/gsmselftest.py
index 920692b..f2205e0 100644..100755
--- a/For Weekly Test/Advance/gsmselftest.py
+++ b/For Weekly Test/Advance/gsmselftest.py
@@ -52,17 +52,26 @@ def initTrueTable(x):
initResult.initTrueTable()
print '\n'
openBSC = None
+
for x in initResult.nanoBts:
name = x[0]
if x[1] == True:
openBSC = True
asterikServer = True
- #print name+ ' Working'
else:
- print name+ ' not Working'
-
+ if int(x[1]) == 486:
+ print name+ ' not Working'
+ elif int(x[1]) == 200:
+ print name+ ' Working'
+ else:
+ print name+ ' not Working, handler error'
+ print ''
if openBSC == True:
print 'openBSC working'
+ else:
+ print 'openBSC doesnt work'
+ print ''
+
if initResult.asteriskServer == True:
print 'asterik server is working'
print '\n'
@@ -77,6 +86,8 @@ def initTrueTable(x):
elif initResult.incomingRZ == False:
print 'incoming call from outside RZ to GSM RZ is not working'
print '\n'
+
+ #print initResult.outGoingRZ +'-----'+ initResult.incomingRZ
def doSipTest():
@@ -140,6 +151,7 @@ def regularTest():
regulartest = initTestClass.doTest()
regulartest.smartTest()
initTrueTable(regulartest.smartResultList)
+ #print regulartest.smartResultList
def findPort(portName): # take information in existing usb port
global connect
@@ -195,6 +207,28 @@ def initDevice(deviceName):
print '== error, no device connected =='
+def autoUpdateDevice():
+ i = 0
+ x = 0
+ while i !=10:
+ portName ='ttyUSB'+str(i) #checking usb connection
+ findPort(portName)
+ i=i+1
+ if connect == 1:
+ for listNum in GSMListPrefix:
+ if prefix == listNum[1]:
+ print 'Device Name :',listNum[0]
+ print 'IMEI :',IMEI
+ print 'Phone Number :',num
+ print 'Port Name : /dev/'+portName
+ x=x+1
+ newPortName = '/dev/'+portName
+ portClass.initUpdate(listNum[0], newPortName, num)
+ print '\n'
+
+ print '== FINISH =='
+ print 'Found '+str(x)+' devices'
+
def updateDevice(): #update port name list of device on DB
quit = False
while quit != True:
@@ -213,9 +247,7 @@ def updateDevice(): #update port name list of device on DB
print " 3. GSM Eplus"
print " 4. GSM T-Mobile"
print " 5. GSM RZ 1"
- print " 6. GSM RZ 2"
- print " 7. GSM RZ 3"
- print " 8. Back to menu"
+ print " 6. Back to menu"
print ""
print "your choise : ",
input = sys.stdin.readline().rstrip("\r\n")
@@ -232,33 +264,11 @@ def updateDevice(): #update port name list of device on DB
initDevice('GSMExt.Tm')
elif input == '5':
initDevice('GSMRZ1')
- elif input == '6':
- initDevice('GSMRZ2')
- elif input == '7':
- initDevice('GSMRZ3')
else:
- print 'please choose between 1-8'
+ print 'please choose between 1-6'
+
if input == 'a': #automatic configuration
- i = 0
- x = 0
- while i !=10:
- portName ='ttyUSB'+str(i) #checking usb connection
- findPort(portName)
- i=i+1
- if connect == 1:
- for listNum in GSMListPrefix:
- if prefix == listNum[1]:
- print 'Device Name :',listNum[0]
- print 'IMEI :',IMEI
- print 'Phone Number :',num
- print 'Port Name : /dev/'+portName
- x=x+1
- newPortName = '/dev/'+portName
- portClass.initUpdate(listNum[0], newPortName, num)
- print '\n'
-
- print '== FINISH =='
- print 'Found '+str(x)+' devices'
+ autoUpdateDevice()
if input == "q":
break
@@ -342,9 +352,8 @@ else:
i = i+1
db.cleanTasksList()
-
-
print '\n'
+
initTrueTable(resultsList) # fetch result list and make adjustment about the result
else:
print "--- No job at all ---"
diff --git a/For Weekly Test/Advance/help.txt b/For Weekly Test/Advance/help.txt
index 96807ca..96807ca 100644..100755
--- a/For Weekly Test/Advance/help.txt
+++ b/For Weekly Test/Advance/help.txt
diff --git a/For Weekly Test/Advance/initTestClass.py b/For Weekly Test/Advance/initTestClass.py
index b91e07d..ed0c666 100644..100755
--- a/For Weekly Test/Advance/initTestClass.py
+++ b/For Weekly Test/Advance/initTestClass.py
@@ -116,13 +116,16 @@ class doTest:
makeTest = ControllerClass.doTheTest(callFrom, callPortName, accCaller, callTo, destPortName, destNo, accDest)
makeTest.FuncTest()
self.result = str(makeTest.testResult)
+
+ print callFrom, callTo, makeTest.testResult
else:
self.result = 100
else:
self.result = 100
+ #sleep(4)
self.killProc() # kill all the handler
self.db.closeDBConn()
- #sleep(5)
+ #sleep(1)
else:
self.result = 500
else:
@@ -133,7 +136,7 @@ class doTest:
return self.result
- def isThere(keyword,lists):
+ def isThere(self,keyword,lists):
x = 0
for item in lists:
@@ -150,6 +153,7 @@ class doTest:
gsmRZList = list()
sipList = list()
destList = list()
+ rem = list()
self.db.closeDBConn()
for lists in deviceLists: #define category of the device
@@ -168,8 +172,10 @@ class doTest:
i = random.randint(0, len(gsmRZList)-1)
callTo = gsmRZList[i]
self.initTest('unisip',callTo)
+
gsmRZList.remove(callTo)
destList.remove(callTo)
+
self.smartResultList.append(['unisip', callTo, self.result])
@@ -184,6 +190,7 @@ class doTest:
callTo = destList[i]
self.initTest(callFrom,callTo)
+
destList.remove(callTo)
destList.remove(callFrom)
gsmRZList.remove(callFrom)
@@ -193,16 +200,34 @@ class doTest:
i = random.randint(0, len(gsmRZList)-1) #
callTo = gsmRZList[i]
self.initTest('landline',callTo)
+
- if isThere(callTo,destList) == 1: # Checking whether caller at gsmrz list in the destination list, if yes delete it.
+ if self.isThere(callTo,destList) == 1: # Checking whether caller at gsmrz list in the destination list, if yes delete it.
destList.remove(callTo)
- self.smartResultList.append(['landline', callTo, self.result])
+ self.smartResultList.append(['landline', callTo, self.result])
for callTo in destList:
callFrom = 'sip'
self.initTest(callFrom,callTo)
-
- self.smartResultList.append([callFrom, callTo, self.result])
+ self.smartResultList.append([callFrom, callTo, self.result])
+
+ #retry to call in success test to make sure tests are valid
+ for dest in self.smartResultList:
+ if int(dest[2]) == 486:
+ self.initTest('sip', dest[1])
+ self.smartResultList.append(['sip', dest[1], self.result])
+ rem.append(dest)
+
+ caller = dest[0] # to test nanobts if the test come from RZ GSM but fehler
+ if caller[0:5] == 'GSMRZ':
+ self.initTest('sip', dest[0])
+ self.smartResultList.append(['sip', dest[1], self.result])
+ rem.append(dest)
+
+ for remov in rem:
+ for x in self.smartResultList:
+ if x == remov:
+ self.smartResultList.remove(x)
return self.smartResultList
diff --git a/For Weekly Test/Advance/initTestClass.pyc b/For Weekly Test/Advance/initTestClass.pyc
index 210495e..366d8af 100644
--- a/For Weekly Test/Advance/initTestClass.pyc
+++ b/For Weekly Test/Advance/initTestClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/procname-0.2/Makefile b/For Weekly Test/Advance/procname-0.2/Makefile
deleted file mode 100644
index fc72918..0000000
--- a/For Weekly Test/Advance/procname-0.2/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-PYTHON?=python
-TESTFLAGS=-p -v
-TESTOPTS=
-SETUPFLAGS=
-GCC=gcc
-VER=2.7
-DESTDIR=.
-
-all: build
-
-build:
- $(GCC) -c -fpic procnamemodule.c -DHAVE_CONFIG_H -I/usr/include/python$(VER) -I/usr/lib/python$(VER)/config
- $(GCC) -shared procnamemodule.o -o $(DESTDIR)/procname.so
diff --git a/For Weekly Test/Advance/procname-0.2/procname.so b/For Weekly Test/Advance/procname-0.2/procname.so
deleted file mode 100755
index 52af108..0000000
--- a/For Weekly Test/Advance/procname-0.2/procname.so
+++ /dev/null
Binary files differ
diff --git a/For Weekly Test/Advance/procname-0.2/procnamemodule.c b/For Weekly Test/Advance/procname-0.2/procnamemodule.c
deleted file mode 100644
index 8906656..0000000
--- a/For Weekly Test/Advance/procname-0.2/procnamemodule.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Copyright (C) 2008 Eugene A. Lisitsky
-
- The procname library for Python.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include <Python.h>
-#include <sys/prctl.h>
-
-PyDoc_STRVAR(procname__doc__, "Module for setting/getting process name");
-
-static PyObject *
-procname_check(PyObject *self, PyObject *args) { return Py_BuildValue("i", 1);
-};
-
-
-static PyObject *
-procname_getprocname(PyObject *self, PyObject *args) { int argc;
- char **argv;
- Py_GetArgcArgv(&argc, &argv);
- return Py_BuildValue("s", argv[0]);
-};
-
-
-static PyObject *
-procname_setprocname(PyObject *self, PyObject *args) { int argc;
- char **argv;
- char *name;
- if (!PyArg_ParseTuple(args, "s", &name))
- return NULL;
- Py_GetArgcArgv(&argc, &argv);
- strncpy(argv[0], name , strlen(name));
- memset(&argv[0][strlen(name)], '\0', strlen(&argv[0][strlen(name)]));
- prctl (15 /* PR_SET_NAME */, name, 0, 0, 0);
- Py_INCREF(Py_None);
- return Py_None;
-};
-
-
-static PyMethodDef procname_methods[] = { {"check", procname_check, METH_VARARGS, "Test func"},
- {"getprocname", procname_getprocname, METH_VARARGS,
- "Get procname.\nReturns name (string)"},
- {"setprocname", procname_setprocname, METH_VARARGS,
- "Set procname.\n name (string) -> new process name.\nReturns None."},
- {NULL, NULL, 0, NULL}
-};
-
-PyMODINIT_FUNC
-initprocname(void) { (void) Py_InitModule3("procname", procname_methods, procname__doc__);
-}
-
diff --git a/For Weekly Test/Advance/procname-0.2/procnamemodule.o b/For Weekly Test/Advance/procname-0.2/procnamemodule.o
deleted file mode 100644
index 02ae164..0000000
--- a/For Weekly Test/Advance/procname-0.2/procnamemodule.o
+++ /dev/null
Binary files differ
diff --git a/For Weekly Test/Advance/procname-0.2/test.py b/For Weekly Test/Advance/procname-0.2/test.py
deleted file mode 100644
index 91f5c3e..0000000
--- a/For Weekly Test/Advance/procname-0.2/test.py
+++ /dev/null
@@ -1,10 +0,0 @@
-import procname
-
-print procname.getprocname()
-#set process name
-procname.setprocname('SIP Handler')
-print procname.getprocname()
-while True:
- i = 0
-
-
diff --git a/For Weekly Test/Advance/procname-0.2/test2.py b/For Weekly Test/Advance/procname-0.2/test2.py
deleted file mode 100644
index db31cf9..0000000
--- a/For Weekly Test/Advance/procname-0.2/test2.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import procname
-
-print procname.getprocname()
-#set process name
-procname.setprocname('GSM Handler')
-print procname.getprocname()
-while True:
- i = 0
-
diff --git a/For Weekly Test/Advance/procname.so b/For Weekly Test/Advance/procname.so
deleted file mode 100755
index 52af108..0000000
--- a/For Weekly Test/Advance/procname.so
+++ /dev/null
Binary files differ
diff --git a/For Weekly Test/Advance/procnamemodule.c b/For Weekly Test/Advance/procnamemodule.c
deleted file mode 100644
index 8906656..0000000
--- a/For Weekly Test/Advance/procnamemodule.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Copyright (C) 2008 Eugene A. Lisitsky
-
- The procname library for Python.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include <Python.h>
-#include <sys/prctl.h>
-
-PyDoc_STRVAR(procname__doc__, "Module for setting/getting process name");
-
-static PyObject *
-procname_check(PyObject *self, PyObject *args) { return Py_BuildValue("i", 1);
-};
-
-
-static PyObject *
-procname_getprocname(PyObject *self, PyObject *args) { int argc;
- char **argv;
- Py_GetArgcArgv(&argc, &argv);
- return Py_BuildValue("s", argv[0]);
-};
-
-
-static PyObject *
-procname_setprocname(PyObject *self, PyObject *args) { int argc;
- char **argv;
- char *name;
- if (!PyArg_ParseTuple(args, "s", &name))
- return NULL;
- Py_GetArgcArgv(&argc, &argv);
- strncpy(argv[0], name , strlen(name));
- memset(&argv[0][strlen(name)], '\0', strlen(&argv[0][strlen(name)]));
- prctl (15 /* PR_SET_NAME */, name, 0, 0, 0);
- Py_INCREF(Py_None);
- return Py_None;
-};
-
-
-static PyMethodDef procname_methods[] = { {"check", procname_check, METH_VARARGS, "Test func"},
- {"getprocname", procname_getprocname, METH_VARARGS,
- "Get procname.\nReturns name (string)"},
- {"setprocname", procname_setprocname, METH_VARARGS,
- "Set procname.\n name (string) -> new process name.\nReturns None."},
- {NULL, NULL, 0, NULL}
-};
-
-PyMODINIT_FUNC
-initprocname(void) { (void) Py_InitModule3("procname", procname_methods, procname__doc__);
-}
-
diff --git a/For Weekly Test/Advance/procnamemodule.o b/For Weekly Test/Advance/procnamemodule.o
deleted file mode 100644
index 02ae164..0000000
--- a/For Weekly Test/Advance/procnamemodule.o
+++ /dev/null
Binary files differ
diff --git a/For Weekly Test/Advance/trueTableClass.py b/For Weekly Test/Advance/trueTableClass.py
index 88b3d81..74d2bd0 100644..100755
--- a/For Weekly Test/Advance/trueTableClass.py
+++ b/For Weekly Test/Advance/trueTableClass.py
@@ -24,40 +24,40 @@ class trueTable:
for devLists in deviceLists: #define category of the external devices
device = devLists[0]
- if device[0:5] == 'GSMRZ' or device[0:5] == 'GSMEx' or device == 'landline':
+ if device[0:5] == 'GSMEx' or device == 'landline':
externalRZList.append(device) # fetch into the list
self.db.closeDBConn()
lists = self.resultsList
- #externalRZList = ['GSMExt.Tm','GSMExt.O2','GSMExt.Voda','GSMExt.Eplus','landline'] # should fetch this from DB or mix between external GSM and SIP side.
- #fetch list from DB
self.nanoBts = list()
gsmResultList = list()
-
+ print externalRZList
i= 1
- for x in lists:
- call=x[0]
- dest=x[1]
+ for w in lists:
+ call=w[0]
+ dest=w[1]
+
+
+ if call[0:5]=='GSMRZ':
+ if i <= int(call[5:]):
+ i = int(call[5:])
+ if dest[0:5]=='GSMRZ':
- if call[0:5]=='GSMRZ':
- for y in lists:
- caller = y[0]
- desti=y[1]
-
- if i <= call[5:]:
- i = call[5:]
- i = int(i)+1#also can get from length of the GSMRZ found in DB,maybe its more easy to use it
+ if i <= int(dest[5:]):
+ i = int(dest[5:])
+ i = i+1
for x in lists: # to find nanoBts, asterik server and open BSC status regarding result test for GSM RZ
call=x[0]
dest=x[1]
result=x[2]
stop = False
j=1
-
- if call[0:5]=='GSMRZ' or dest[0:5]=='GSMRZ':
+
+ if call[0:5]=='GSMRZ' or dest[0:5]=='GSMRZ':
while stop != True:
- if j != int(i):
+ if j != i:
key = 'GSMRZ'+str(j)
if key == call or key == dest:
+ stop = True
if result == '200':
self.asteriskServer = True #set status of asterik server as working
if len(self.nanoBts) == 0:
@@ -89,15 +89,19 @@ class trueTable:
if call == z:
self.incomingRZ = False
self.nanoBts.append(['nanoBts '+str(j),False])
- else: # find how to solve this!!!
- print "handler error"
+ if result == '998' and key == dest: # find how to solve this!!!
+ print 'GSMRZ'+str(j)+ " handler error"
+
+ if result == '999' and key == call: # find how to solve this!!!
+ print 'GSMRZ'+str(j)+ " handler error"
+ print ''
j = j+1
- elif j == int(i):
+ elif j == i:
stop = True
- if call[0:5]=='GSMEx': # looking for calling from GSMexternal
+ if call[0:5]=='GSMEx': # looking for calling from GSMexternal
found = False
if len(self.nanoBts) ==0:
self.nanoBts.append([call,result])
@@ -110,7 +114,7 @@ class trueTable:
if found != True:
self.nanoBts.append([call,result])
- if dest[0:5]=='GSMEx': # looking for destination call to GSMexternal
+ if dest[0:5]=='GSMEx': # looking for destination call to GSMexternal
found = False
if len(self.nanoBts) ==0:
self.nanoBts.append([dest,result])
@@ -123,4 +127,6 @@ class trueTable:
if found != True:
self.nanoBts.append([dest,result])
+ print self.incomingRZ
+ print self.outGoingRZ
diff --git a/For Weekly Test/Advance/trueTableClass.pyc b/For Weekly Test/Advance/trueTableClass.pyc
index 04e3784..81a6512 100644
--- a/For Weekly Test/Advance/trueTableClass.pyc
+++ b/For Weekly Test/Advance/trueTableClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/usbDetectClass.py b/For Weekly Test/Advance/usbDetectClass.py
index 19ed52b..19ed52b 100644..100755
--- a/For Weekly Test/Advance/usbDetectClass.py
+++ b/For Weekly Test/Advance/usbDetectClass.py
diff --git a/For Weekly Test/Advance/usbDetectClass.pyc b/For Weekly Test/Advance/usbDetectClass.pyc
index e7cef7a..3e56735 100644
--- a/For Weekly Test/Advance/usbDetectClass.pyc
+++ b/For Weekly Test/Advance/usbDetectClass.pyc
Binary files differ
diff --git a/For Weekly Test/Advance/procname-0.2/kill.py b/For Weekly Test/kill.py
index 54ab6bc..e41f802 100644
--- a/For Weekly Test/Advance/procname-0.2/kill.py
+++ b/For Weekly Test/kill.py
@@ -6,8 +6,7 @@ import os
def killProc():
# define process name of the Handler
- procName1 = 'GSM Handler'
- procName2 = 'SIP Handler'
+ procName1 = 'foo'
#procName = 'SIP Handler'
p = subprocess.Popen(['ps', '-A'], stdout=subprocess.PIPE)
out, err = p.communicate()
@@ -17,10 +16,6 @@ def killProc():
if procName1 in line:
pid = int(line.split(None, 1)[0])
os.kill(pid, signal.SIGKILL)
- for line in out.splitlines():
- if procName2 in line:
- pid = int(line.split(None, 1)[0])
- os.kill(pid, signal.SIGKILL)
killProc()
diff --git a/For Weekly Test/testingfile.py b/For Weekly Test/testingfile.py
index 6844a08..3975ac9 100644
--- a/For Weekly Test/testingfile.py
+++ b/For Weekly Test/testingfile.py
@@ -1,3 +1,6 @@
import setproctitle
setproctitle.setproctitle("foo")
print setproctitle.getproctitle()
+
+while True:
+ i = 1+1