* few bug fixes in MAC and PHICH HARQ SF mapping

* update the pre-ci testes



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6496 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Navid Nikaein
2015-02-09 17:41:49 +00:00
parent c9800ae733
commit cd88eba8d1
17 changed files with 218 additions and 215 deletions
+12 -4
View File
@@ -143,16 +143,19 @@ class core:
self.oai.send(command)
if self.expect_echo:
#cmd = self.oai.expect([re.escape(command), pexpect.TIMEOUT], timeout=timeout);
cmd = self.oai.expect_exact([command, pexpect.TIMEOUT], timeout=timeout);
if cmd != 0:
raise log.err(self.failed(command, command,debug))
if self.expect_response:
#index = self.oai.expect([re.escape(rsp1), re.escape(rsp2),'%', pexpect.TIMEOUT], timeout=timeout)
index = self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout)
if index == 0 or index == 1:
return 'OK'
elif index == 2:
#self.oai.expect([re.escape(rsp1), re.escape(rsp2), pexpect.TIMEOUT], timeout=timeout)
self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout)
if self.flag_errors:
raise log.err(self.err(command))
@@ -177,8 +180,9 @@ class core:
self.oai.sendline(command)
else:
self.oai.send(command)
#index = self.oai.expect([re.escape(rsp1), re.escape(rsp2), pexpect.TIMEOUT], timeout=timeout);
index = self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout);
if index == 0 or index == 1:
if index == 0 or index == 1 :
return self.oai.before
else:
raise log.err(self.failed(command, rsp1 + ' or ' + rsp2,debug))
@@ -187,14 +191,18 @@ class core:
# **************************send_expect*************************
# 1) send a command, and optionally specify a the time to wait
# 2) search for an expected pattern in the response
# 3) return a error if not found
# 3) raise an error if not found
# **************************************************************
def send_expect(self, command, expect, delay = 50, rsp1=None, rsp2=None,debug=0):
if denug :
print command
print expect
print delay
rsp = self.send_recv(command, delay, rsp1, rsp2)
# print rsp
#print rsp
if (rsp.find(expect) != -1):
return 'Ok'
raise log.err(self.failed(command, expect,debug))