* add some functions for terminal localizations

* fix few issues with the pre-ci tests



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6253 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Navid Nikaein
2014-12-11 17:39:37 +00:00
parent 80eca142cb
commit ee3d40640c
33 changed files with 1067 additions and 425 deletions
+2 -2
View File
@@ -170,13 +170,13 @@ def execute(oai, user, pw, host, logfile,logdir,debug):
try:
test = '06'
name = 'Run oai.rel8.itti.abs.rrc'
diag = 'RRC procedure is not finished completely, check the eNB config file (default is enb.sfr.sud.conf), in addition to the execution logs and trace BCCH, CCCH, and DCCH channels'
diag = 'RRC procedure is not finished completely, check the eNB config file (default is enb.band7.generic.conf), in addition to the execution logs and trace BCCH, CCCH, and DCCH channels'
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
log_name = logdir + '/log_' + host + case + test + '_' + str(i) + str(j)
itti_name = log_name + '.log'
trace_name = log_name + '.txt'
conf = '-a -l7 -A AWGN --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.exmimo2.conf -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name
conf = '-a -l7 -A AWGN --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.conf -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name
tee = ' 2>&1 | tee -a ' + trace_name
command = './oaisim.rel8.itti.' + host + ' ' + conf
oai.send('echo ' + command + ' > ' + trace_name + ';')
+2 -2
View File
@@ -189,13 +189,13 @@ def execute(oai, user, pw, host, logfile,logdir,debug):
# try:
# test = '09'
# name = 'Run oai.rel10.itti.phy.eMBMS.MCCH'
# diag = 'eMBMS procedure is not finished completely, check the eNB config file (enb.sfr.sud.conf), and make sure that the SIB13/MCCH have been correclty received by UEs'
# diag = 'eMBMS procedure is not finished completely, check the eNB config file (enb.band7.generic.conf), and make sure that the SIB13/MCCH have been correclty received by UEs'
# for i in range(NUM_UE) :
# for j in range(NUM_eNB) :
# log_name = logdir + '/log_' + host + case + test + '_' + str(i) + str(j)
# itti_name = log_name + '.log'
# trace_name = log_name + '.txt'
# conf = '-A AWGN -l7 -x 1 -Q3 --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.sfr.sud.conf -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name
# conf = '-A AWGN -l7 -x 1 -Q3 --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.conf -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name
# tee = ' 2>&1 | tee -a ' + trace_name
# command = './oaisim.rel10.itti.' + host + ' ' + conf
# oai.send('echo ' + command + ' > ' + trace_name + ';')
+32
View File
@@ -101,7 +101,39 @@ class openair(core):
except Error, val :
print "Error: can't connect to"+username+"@"+self.address
def connect2(self, username, password, prompt='$'):
self.prompt1 = prompt
self.prompt2 = prompt
while 1:
try:
if not username:
username = root
if not password:
password = username
self.oai = pexpect.spawn('ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -o "ConnectionAttempts=1" ' \
+ username + '@' + self.address)
index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=40)
if index == 0 :
return 'Ok'
else :
index = self.oai.expect(['password:', pexpect.TIMEOUT], timeout=40)
if index == 0 :
self.oai.sendline(password)
index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=10)
if index != 0:
print 'ERROR! could not login with SSH.'
print 'Expected ' + self.prompt1 + ', received >>>>' + self.oai.before + '<<<<'
sys.exit(1)
return 'Ok'
except Exception, val:
time.sleep(5)
print "Error:", val
def disconnect(self):
print 'disconnecting the ssh connection to ' + self.address + '\n'
self.oai.send('exit')
+3 -1
View File
@@ -111,7 +111,9 @@ try:
print "username: " + user
#print "password: " + pw
oai.connect(user,pw)
# issues in ubuntu 12.04
# oai.connect(user,pw)
oai.connect2(user,pw)
#oai.get_shell()
except :
print 'Fail to connect to the local host'