From 03595b40a2c028ed5d2768aeb61716cb0a86dbec Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sat, 28 Nov 2015 22:18:07 +0100 Subject: [PATCH 01/19] added files for autotest framework --- cmake_targets/autotests/openair.py | 234 +++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 cmake_targets/autotests/openair.py diff --git a/cmake_targets/autotests/openair.py b/cmake_targets/autotests/openair.py new file mode 100644 index 0000000000..1606bcaf6a --- /dev/null +++ b/cmake_targets/autotests/openair.py @@ -0,0 +1,234 @@ +#****************************************************************************** + +# Eurecom OpenAirInterface +# Copyright(c) 1999 - 2013 Eurecom + +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. + +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. + +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". + +# Contact Information +# Openair Admin: openair_admin@eurecom.fr +# Openair Tech : openair_tech@eurecom.fr +# Forums : http://forums.eurecom.fsr/openairinterface +# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France + +#***************************************************************************** + +# \file openair.py +# \brief class that define the oaisim class and its attributes +# \author Navid Nikaein +# \date 2013 +# \version 0.1 +# @ingroup _test + +import pexpect +import pxssh +import time +import os +import array +import shutil +import subprocess +# import call + +from core import * + +SHELL = '/bin/bash' + +class openair(core): + def __init__(self, hostname, address): + self.error = '% ' + self.hostname = hostname + self.address = address + self.localhost = None + core.__init__(self) + + @property + def localhost(self): + if self.localhost : + return self.localhost + elif self.hostname in ['localhost', '127.0.0.7', '::1'] : + self.localhost = self.hostname + return self.localhost + + @localhost.setter + def localhost(self,localhost): + self.localhost = localhost + + def shcmd(self,cmd,sudo=False): + + if sudo: + cmd = "sudo %s" % command + + proc = subprocess.Popen(command, shell=True, + stdout = subprocess.PIPE, + stderr = subprocess.PIPE) + + stdout, stderr = proc.communicate() + return (stdout, stderr) + + def connect(self, username, password, prompt='PEXPECT_OAI'): + self.prompt1 = prompt + self.prompt2 = prompt + self.password = '' + # WE do not store the password when sending commands for secuirity reasons. The password might be accidentally logged in such cases. + #The password is used only to make ssh connections. In case user wants to run programs with sudo, then he/she needs to add following line in /etc/sudoers + # your_user_name ALL=(ALL:ALL) NOPASSWD: ALL + try: + if not username: + username = root + if not password: + password = username + self.oai = pxssh.pxssh() + self.oai.login(self.address,username,password) + self.oai.sendline('PS1='+self.prompt1) + self.oai.PROMPT='PEXPECT_OAI' + # need to look for twice the string of the prompt + self.oai.prompt() + self.oai.prompt() + self.oai.sendline('uptime') + self.oai.prompt() + print self.oai.before + + except Error, val : + print "Error: can't connect to"+username+"@"+self.address + + def connect2(self, username, password, prompt='$'): + self.prompt1 = prompt + self.prompt2 = prompt + self.password = password + 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 connect_localshell(self, prompt='$'): + self.prompt1 = prompt + self.prompt2 = prompt + + while 1: + try: + # start a shell and use the current environment + self.oai = pexpect.spawn('bash --norc --noprofile') + + index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=40) + if index == 0 : + return 'Ok' + else : + sys.exit(1) + + 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') +# self.cancel() + + def kill(self, user, pw): + try: + if user == 'root' : + os.system('pkill oaisim') + os.system('pkill cc1') + time.sleep(1) + os.system('pkill oaisim') + else : + os.system('echo '+pw+' | sudo -S pkill oaisim') + os.system('echo '+pw+' | sudo -S pkill cc1') + time.sleep(1) + os.system('echo '+pw+' | sudo -S pkill oaisim') + except Error, val: + print "Error:", val + + def rm_driver(self,oai,user, pw): + try: + if user == 'root' : + #oai.send_nowait('rmmod nasmesh;') + os.system('rmmod nasmesh;') + else : + oai.send_nowait('echo '+pw+ ' | sudo -S rmmod nasmesh;') + #os.system('echo '+pw+ ' | sudo -S rmmod nasmesh;') + except Error, val: + print "Error removing oai network driver module:", val + + def driver(self,oai,user,pw): + #pwd = oai.send_recv('pwd') + oai.send('cd $OPENAIR_TARGETS;') + oai.send('cd SIMU/USER;') + try: + if user == 'root' : + oai.send_nowait('insmod ./nasmesh.ko;') + else : + oai.send('echo '+pw+ ' | sudo -S insmod ./nasmesh.ko;') + + except Error, val: + print "Error inserting oai network driver module:", val + + def cleandir (self, logdir,debug) : + + for filename in os.listdir(logdir): + filepath = os.path.join(logdir, filename) + if debug == 2 : + print 'logdir is ' + logdir + print 'filepath is ' + filepath + try: + shutil.rmtree(filepath) + except OSError: + os.remove(filepath) + #print 'Could not remove the filepath'+ filepath + ' with error ' + OSError + + def create_dir(self,dirname,debug) : + if not os.path.exists(dirname) : + try: + os.makedirs(dirname,0755) + except OSError: + # There was an error on creation, so make sure we know about it + raise + def cpu_freq(self): + freq=0 + proc = subprocess.Popen(["cat","/proc/cpuinfo"], + stdout=subprocess.PIPE) + out, err = proc.communicate() + + for line in out.split("\n"): + if "cpu MHz" in line: + freq = float(line.split(":")[1]) + break + + return freq From e070050d13daffde25d7f73b53c04b8cb18713e4 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sat, 28 Nov 2015 22:18:17 +0100 Subject: [PATCH 02/19] added files for autotest framework --- cmake_targets/autotests/core.py | 349 ++++++++++++++++++++++++++++++++ cmake_targets/autotests/log.py | 206 +++++++++++++++++++ 2 files changed, 555 insertions(+) create mode 100644 cmake_targets/autotests/core.py create mode 100644 cmake_targets/autotests/log.py diff --git a/cmake_targets/autotests/core.py b/cmake_targets/autotests/core.py new file mode 100644 index 0000000000..c899069f89 --- /dev/null +++ b/cmake_targets/autotests/core.py @@ -0,0 +1,349 @@ +#****************************************************************************** + +# Eurecom OpenAirInterface +# Copyright(c) 1999 - 2013 Eurecom + +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. + +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. + +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". + +# Contact Information +# Openair Admin: openair_admin@eurecom.fr +# Openair Tech : openair_tech@eurecom.fr +# Forums : http://forums.eurecom.fsr/openairinterface +# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France + +#***************************************************************************** + +# \file core.py +# \brief OAI core testing class that provides various primitives to send/recv cmd to openair class searching for patterns and process the responses and tag the test case as passed/failed/skipped +# \author Navid Nikaein +# \date 2013 +# \version 0.1 +# @ingroup _test + + +import pexpect +import time +import re +import string +import sys +import os + +import openair +import log + +class core: + def __init__(self): + self.send_cr = 1 + self.expect_echo = 0 + self.expect_response = 1 + self.flag_errors = 1 + self.log = None + + def clean(self, obj): + if type(obj) is str: + return obj + else: + return repr(obj) + + def mark(self, marker): + if self.log: + print >> self.log, "\n\n{" + marker + "}\n\n" + + def expected(self, expected, got): + return "================================= Failure ===================================\n"+\ + "_________________________________ Expected __________________________________\n"+\ + "--->" + expected + "<-\n" +\ + "_________________________________ Received __________________________________\n"+\ + "--->" + got + "<-\n" +\ + "=============================================================================\n" + + def unexpected(self, notexpected, got): + return "================================= Failure ===================================\n"+\ + "__________________________ not expect to find _______________________________\n"+\ + "---> " + self.clean(notexpected) + "\n" +\ + "_________________________________ Received___________________________________\n"+\ + "---> " + self.clean(got) + "\n" +\ + "=============================================================================\n" + + def failed(self, command, expect,debug): + time.sleep(2) + ret = "================================= Failure =================================\n" + ret +="_________________________________ Sent ____________________________________\n" + ret +="---> " + command + "\n" + ret +="______________________________Searching for _______________________________\n" + ret +="---> " + self.clean(expect) + "\n" + if debug >= 1 : + ret +="________________________________ Received _________________________________\n" + ret +="---> " + self.clean(self.oai.before) + "\n" + ret +="_______________________________ Remaining _________________________________\n" + ret +="---> " + self.clean(self.oai.after) + "\n" + ret +="===========================================================================\n" + return ret + + def err(self, command): + return "============================ Error received ================================\n"+\ + "__________________________________ Sent ____________________________________\n"+\ + '---> ' + command + "\n"+\ + "_________________________________ Error was ________________________________\n"+\ + "---> " + self.oai.before + "\n" +\ + "============================================================================\n" + + + def wait_quiet(self, timeout=0.5): + while 1: + try: + self.oai.expect(['..*'], timeout=0.5) + except pexpect.TIMEOUT, e: + return +# print '[Flushing ' + self.oai.after + ']' + + # **************************Send***************************** + # 1) send a command and return, do not wait + # ************************************************************ + def send_nowait(self, command, sudo=False): + rsp1 = self.prompt1 + rsp2 = self.prompt2 + if sudo == True: + command = 'echo \'' + self.password + '\' | sudo -S -E ' + command + + self.wait_quiet() + if self.send_cr: + log.stats['cmd'] += 1 + self.oai.sendline(command) + else: + self.oai.send(command) + + + # **************************Send***************************** + # 1) send a command + # 2) wait for a return prompt. Don't capture the response. + # 3) Check for error or timeout. + # ************************************************************ + def send(self, command,sudo=False, timeout = 50, rsp1=None, rsp2=None,debug=0): + if not rsp1: + rsp1 = self.prompt1 + if not rsp2: + rsp2 = self.prompt2 + self.wait_quiet() + if sudo == True: + command = 'echo \'' + self.password + '\' | sudo -S -E ' + command + if self.send_cr: + log.stats['cmd'] += 1 + self.oai.sendline(command) + else: + 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)) + else: + return 'OK' + else: + raise log.err(self.failed(command, rsp1 + ' or ' + rsp2,debug)) + + # **************************send_recv************************* + # 1) send a command + # 2) wait for either rsp1 or rsp2 is found (normally prompts) + # 3) return everything seen before that + # ************************************************************ + def send_recv(self, command, sudo=False, timeout=100, rsp1=None, rsp2=None,debug=0): + if not rsp1: + rsp1 = self.prompt1 + if not rsp2: + rsp2 = self.prompt2 + self.wait_quiet() + if sudo == True: + command = 'echo \'' + self.password + '\' | sudo -S -E ' + command + if self.send_cr: + log.stats['cmd'] += 1 + 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 : + return self.oai.before + else: + raise log.err(self.failed(command, rsp1 + ' or ' + rsp2,debug)) + + + # **************************send_expect************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern in the response + # 3) raise an error if not found + # ************************************************************** + def send_expect(self, command, expect, sudo=False, delay = 50, rsp1=None, rsp2=None,debug=0): + if debug : + print command + print expect + print delay + rsp = self.send_recv(command, sudo, delay, rsp1, rsp2) + #print rsp + if (rsp.find(expect) != -1): + return 'Ok' + + raise log.err(self.failed(command, expect,debug)) + + + # **************************send_expect_re************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern defined by a regular expression in the response + # 3) return a error if raise_err flag is set and re not found, otherwise return 'Ok' + # ***************************************************************** + def send_expect_re(self, command, expect, sudo=False, raise_err=1, delay = 50, rsp1=None, rsp2=None,debug=0): + rsp = self.send_recv(command, sudo, delay, rsp1, rsp2) +# print rsp + match = re.compile(expect).search(rsp) + if match: + return match + if raise_err: + raise log.err(self.failed(command, expect,debug)) + else : + return None + + # **************************send_expect************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern defined by a re in the response + # 3) return ok if not found + # ************************************************************** + def send_expect_false(self, command, expect, sudo=False, delay = 5, rsp1=None, rsp2=None,debug=0): + rsp = self.send_recv(command, sudo, delay, rsp1, rsp2) + # print rsp + if (rsp.find(expect) == -1): + return 'OK' + + raise log.err(self.failed(command, expect,debug)) + + + # **************************send_wait************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern in the response + # 3) retry for a numretries if not found + # 4) return an error if not found after the numtries + # 3) return the response if found + # ************************************************************** + def send_wait(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0): + timer = 0 + for i in range(numretries): + rsp = self.send_recv(command, sudo, 10, rsp1, rsp2) + if (rsp.find(expect) != -1): + return rsp; + time.sleep(2) + timer = timer+2 + raise log.err(self.failed(command, expect,debug)) + + # **************************send_wait_re************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern defined by a re in the response + # 3) retry for a numretries if not found + # 4) return an error if not found after the numtries + # 3) return the response if found + # ************************************************************** + def send_wait_re(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0): + timer = 0 + for i in range(numretries): + rsp = self.send_recv(command,sudo) + if re.compile(expect).search(rsp): +# print "Found in",i,"attempts" + return rsp; + time.sleep(2) + timer = timer+2 + raise log.err(self.failed(command, expect,debug)) + + # **************************send_wait_false************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expect pattern in the response + # 3) return the response if not found + # 4) return an error if the pattern found after the numtries + # ************************************************************** + def send_wait_false(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0): + timer = 1 + for i in range(numretries): + rsp = self.send_recv(command,sudo) + if (rsp.find(expect) == -1): + return rsp; + time.sleep(2) + timer = timer+2 + raise log.err(self.failed(command, expect,debug)) + + # **************************send_wait_false************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expect pattern defined by a re in the response + # 3) return the response if not found + # 4) return an error if the pattern found after the numtries + # ************************************************************** + def send_wait_false_re(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0): + timer = 0 + for i in range(numretries): + rsp = self.send_recv(command,sudo) + if not re.compile(expect).search(rsp): + return rsp; + time.sleep(2) + timer = timer+2 + raise log.err(self.failed(command, expect,debug)) + + # **************************find************************* + # 1) find an exact pattern in a given string + # 2) raise an error if not found + # ************************************************************** + def find(self, string, pattern): + word = string.replace(pattern,'*','\*') + words = string.replace(word,' ','\s*') + if re.search(words,string): + pass + else: + raise log.err(string) + + + # **************************find_false************************** + # 1) find an exact pattern in a given string + # 2) raise an error if found + # ************************************************************** + def find_false(self, string, pattern): + if string.find(pattern) != -1: + raise log.err(string) + + # **************************find_re************************* + # 1) find an exact re pattern in a given string + # 2) raise an error if not found + # ************************************************************** + def find_re(self, string, pattern): + if not re.compile(pattern).search(string): + raise log.err(string) + + # **************************find_false_re************************* + # 1) find an exact re pattern in a given string + # 2) raise an error if found + # ************************************************************** + def find_false_re(self, string, pattern): + if re.compile(pattern).search(string): + raise log.err(string) + diff --git a/cmake_targets/autotests/log.py b/cmake_targets/autotests/log.py new file mode 100644 index 0000000000..0b4baff3e9 --- /dev/null +++ b/cmake_targets/autotests/log.py @@ -0,0 +1,206 @@ +#****************************************************************************** + +# Eurecom OpenAirInterface +# Copyright(c) 1999 - 2013 Eurecom + +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. + +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. + +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". + +# Contact Information +# Openair Admin: openair_admin@eurecom.fr +# Openair Tech : openair_tech@eurecom.fr +# Forums : http://forums.eurecom.fsr/openairinterface +# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France + +#***************************************************************************** + +# \file log.py +# \brief provides primitives and defines how the logs and statistics are generated +# \author Navid Nikaein +# \date 2013 +# \version 0.1 +# @ingroup _test + +import sys +import re +import time +import datetime +import array +import xml.etree.ElementTree as ET + + +debug = False +docfile = '' +start_time = time.time() +testcase_starttime = start_time +debug = 0 +stats = {'passed':0, 'failed':0, 'skipped':0, 'internal_errors':0, 'cmd':0} + +# xml result (jUnit like) +xUnitTestsuites = ET.Element( 'testsuites' ) +xUnitTestsuite = ET.SubElement( xUnitTestsuites, 'testsuite' ) +xUnitTestsuite.set( 'name', 'OAI' ) +xUnitTestsuite.set( 'timestamp', datetime.datetime.fromtimestamp(start_time).strftime('%Y-%m-%dT%H:%M:%S') ) +xUnitTestsuite.set( 'hostname', 'localhost' ) +#xUnitSystemOut = ET.SubElement( xUnitTestsuite, 'system-out' ) + +class bcolors: + header = '\033[95m' + okblue = '\033[94m' + okgreen = '\033[92m' + warning = '\033[93m' + fail = '\033[91m' + normal = '\033[0m' + + def __init__(self): + if not sys.stdout.isatty(): + self.disable() + + def disable(self): + self.header = '' + self.okblue = '' + self.okgreen = '' + self.warning = '' + self.fail = '' + self.normal = '' + +class err(Exception): + def __init__(self, value): + self.value = value + def __str__(self): + return repr(self.value) + +def writefile(logfile, message): + F_testlog = open(logfile, 'a') + F_testlog.write(message + '\n') + F_testlog.close() + + +def sleep(seconds): + time.sleep(seconds) + +def start(): + """Start the timer for the following testcase.""" + global testcase_starttime + testcase_starttime = time.time() + +def set_debug_level(level): + debug = level + +def statistics(logfile): + global start_time + + #if stats['passed'] == 0: + # print "no test executed...exiting" + # sys.exit() + + total_tests = stats['passed'] + stats['failed'] + stats['skipped'] + total_ex_tests = stats['passed'] + stats['failed'] + elapsed_time = time.gmtime(time.time() - start_time) + print '\n' + log_record('info', '===============================================') + log_record('info', 'Total tests performed ' + repr(total_tests)) + log_record('info', 'Tests passed ' + repr(stats['passed'])) + log_record('info', 'Tests failed ' + repr(stats['failed'])) + log_record('info', 'Tests skipped ' + repr(stats['skipped'])) + log_record('info', '') + log_record('info', 'Total commands sent ' + repr(stats['cmd'])) + log_record('info', 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time)) + log_record('info', '===============================================') + log_record('info', 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%') + log_record('info', '===============================================') + + writefile(logfile, '\n=====================Results===================') + writefile(logfile, 'Total tests performed ' + repr(total_tests)) + writefile(logfile, 'Tests passed ' + repr(stats['passed'])) + writefile(logfile, 'Tests failed ' + repr(stats['failed'])) + writefile(logfile, 'Tests skipped ' + repr(stats['skipped'])) + writefile(logfile, '') + writefile(logfile, 'Total commands sent ' + repr(stats['cmd'])) + writefile(logfile, 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time)) + writefile(logfile, '===============================================') + writefile(logfile, 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%') + writefile(logfile, '===============================================\n') + + xUnitTestsuite.set( 'tests', repr(total_tests) ) + xUnitTestsuite.set( 'failures', repr(stats['failed']) ) + xUnitTestsuite.set( 'skipped', repr(stats['skipped']) ) + xUnitTestsuite.set( 'errors', '0' ) + time_delta = datetime.datetime.now() - datetime.datetime.fromtimestamp(start_time) + xUnitTestsuite.set( 'time', repr(time_delta.total_seconds()) ) + writefile( logfile + '.xml', ET.tostring( xUnitTestsuites, encoding="utf-8", method="xml" ) ) + +def log_record(level, message): + ts = time.strftime('%d %b %Y %H:%M') + message = ts + ' [' + level + '] ' + message + if level == 'passed' : + print bcolors.okgreen + message + bcolors.normal + elif level == 'failed' : + print bcolors.fail + message + bcolors.normal + elif level == 'skipped' : + print bcolors.warning + message + bcolors.normal + else : + print message + +def fail(case, testnum, testname, conf, message, diag, output,trace): +# report(case, testnum, testname, conf, 'failed', output, diag, message) + report(case, testnum, testname, conf, 'failed', output, diag) + log_record('failed', case + testnum + ' : ' + testname + ' ('+ conf+')') + if message : + log_record('failed', "Output follows:\n" + message ) + if trace : + log_record('failed', "trace file can be found in " + trace + "\n" ) + stats['failed'] += 1 + +def failquiet(case, testnum, testname, conf): + log_record('failed', case + testnum + ' :' + testname + ' ('+ conf+')') + stats['failed'] += 1 + +def ok(case, testnum, testname, conf, message, output): + report(case, testnum, testname, conf, 'passed', output) + log_record('passed', case + testnum + ' : ' + testname + ' ('+ conf+')') + if message : + print bcolors.okgreen + message + bcolors.normal + stats['passed'] += 1 + + +def skip(case, testnum, testname, conf, message=None, diag=None, output=None): + log_record('skipped', case + testnum + ' :' + testname + ' ('+ conf+')') + report(case, testnum, testname, conf, 'skipped', output, diag) + if message : + log_record('skipped', "Output follows:\n" + message ) + if diag : + log_record('skipped', "Diagnostic: \n" + diag ) + stats['skipped'] += 1 + + +def report(case, test, name, conf, status, output, diag=None, desc=None): + writefile (output, '[' +status+ '] ' + case + test + ' : ' + name + ' ('+ conf+')') + if diag : + writefile (output, '-------> ' + diag) + if desc: + writefile(output, desc) + #log_record('report', + case + test + ' documented') + e = ET.SubElement( xUnitTestsuite, 'testcase' ) + e.set( 'name', case + '_' + test + '_' + name ) + e.set( 'classname', 'shellscript' ) + e.set( 'time', repr( time.time() - testcase_starttime ) ) + if status == 'failed': + e = ET.SubElement( e, 'failure' ) + e.set( 'message', 'failed' ) + e.text = diag + if status == 'skipped': + e = ET.SubElement( e, 'skipped' ) From d897ea3e753de0f6f48ae0caf0704a9264cd07bf Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sun, 29 Nov 2015 20:04:26 +0100 Subject: [PATCH 03/19] improved logging in build helper and fixed a minor bug in installation --- cmake_targets/tools/build_helper | 67 ++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index d58d7018ed..004c83f0b8 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -111,7 +111,12 @@ compilations() { cd $OPENAIR_DIR/cmake_targets/$1/build { rm -f $3 - make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE + if [ "$VERBOSE_COMPILE" == "1" ]; then + make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE + else + make -j`nproc` $2 + fi + } > $dlog/$2.$REL.txt 2>&1 echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt" if [ -s $3 ] ; then @@ -158,22 +163,33 @@ install_gnutls_from_source(){ check_install_usrp_uhd_driver(){ + log_file=$OPENAIR_DIR/cmake_targets/log/check_install_usrp_uhd_driver_log.txt + echo_info "\nIn function: check_install_usrp_uhd_driver(). Installing USRP Drivers : The logfile for the installation is located here: $log_file " + ( v=$(lsb_release -cs) $SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" $SUDO apt-get update $SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev $SUDO apt-get -y install -t `lsb_release -cs` uhd --force-yes + ) >& $log_file } check_install_bladerf_driver(){ + log_file=$OPENAIR_DIR/cmake_targets/log/check_install_bladerf_driver_log.txt + echo_info "\nIn function: check_install_bladerf_driver(). Install BLADERF drivers : The logfile for the installation is located here: $log_file " + ( $SUDO add-apt-repository -y ppa:bladerf/bladerf $SUDO apt-get update $SUDO apt-get install -y bladerf libbladerf-dev - $SUDO apt-get install bladerf-firmware-fx3 - $SUDO apt-get install bladerf-fpga-hostedx40 + $SUDO apt-get install -y bladerf-firmware-fx3 + $SUDO apt-get install -y bladerf-fpga-hostedx40 bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img + ) >& $log_file } check_install_additional_tools (){ + log_file=$OPENAIR_DIR/cmake_targets/log/check_install_additional_tools_log.txt + echo_info "\nIn function: check_install_oai_software(). Installing optional OAI packages : The logfile for the installation is located here: $log_file " + ( $SUDO apt-get update $SUDO apt-get install -y \ check \ @@ -195,26 +211,30 @@ check_install_additional_tools (){ valgrind \ vlan \ ctags + ) >& $log_file } check_install_oai_software() { + log_file=$OPENAIR_DIR/cmake_targets/log/check_install_oai_software_log.txt + echo_info "\nIn function: check_install_oai_software(). Installing mandatory OAI packages : The logfile for the installation is located here: $log_file " + ( $SUDO apt-get update $SUDO apt-get install -y \ - autoconf \ + autoconf \ automake \ bison \ build-essential \ cmake \ cmake-curses-gui \ doxygen \ - doxygen-gui\ - texlive-latex-base\ + doxygen-gui \ + texlive-latex-base \ ethtool \ flex \ - gccxml \ - gdb \ - git \ + gccxml \ + gdb \ + git \ graphviz \ gtkwave \ guile-2.0-dev \ @@ -233,7 +253,7 @@ check_install_oai_software() { libgmp-dev \ libgtk-3-dev \ libidn2-0-dev \ - libidn11-dev \ + libidn11-dev \ libmysqlclient-dev \ liboctave-dev \ libpgm-5.1 \ @@ -255,10 +275,10 @@ check_install_oai_software() { openssl \ python \ subversion \ - xmlstarlet \ - python-pip \ - pydb \ - wvdial + xmlstarlet \ + python-pip \ + pydb \ + wvdial $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so if [ `lsb_release -rs` = '12.04' ] ; then install_nettle_from_source @@ -268,20 +288,25 @@ check_install_oai_software() { fi $SUDO pip install paramiko $SUDO pip install pyroute2 + ) > $log_file 2>&1 install_asn1c_from_source } install_asn1c_from_source(){ + asn1_install_dir=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt + echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_dir " + ( + rm -rf /tmp/asn1c-r1516 mkdir -p /tmp/asn1c-r1516 cd /tmp/asn1c-r1516 - rm -rf /tmp/asn1c-r1516/* - svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516 > /tmp/log_compile_asn1c - patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0 >> /tmp/log_compile_asn1c - patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 >> /tmp/log_compile_asn1c - patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0 >> /tmp/log_compile_asn1c + svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516 + patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0 + patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 + patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0 ./configure - make > /tmp/log_compile_asn1c 2>&1 - $SUDO make install + make -j`nproc` + $SUDO make install + ) > $asn1_install_dir 2>&1 } ################################################# From 34b61a1a5332cd7d20ae6054ab74b30ffe16022c Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sun, 29 Nov 2015 22:52:49 +0100 Subject: [PATCH 04/19] updated test case architecture for parallel/faster execution --- cmake_targets/autotests/README.txt | 55 ++- .../autotests/run_exec_autotests.bash | 246 ++++++---- cmake_targets/autotests/test_case_list.xml | 462 ++++++++++++------ cmake_targets/tools/test_helper | 18 +- 4 files changed, 518 insertions(+), 263 deletions(-) diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt index 25f0c499bb..166db2990e 100644 --- a/cmake_targets/autotests/README.txt +++ b/cmake_targets/autotests/README.txt @@ -6,41 +6,50 @@ Obj.# Case# Test# Description 01 pre-commit test case 01 01 Build OAI 01 01 01 Build oaisim.Rel8 -01 01 02 Build oaisim.Rel8 + network device driver(nasmesh_fix) -01 01 03 Build (lte-softmodem.Rel8.EXMIMO + lte-softmodem.Rel10.EXMIMO + lte-softmodem.Rel10.USRP) -01 01 04 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10 +01 01 02 Build oaisim.Rel10 +01 01 03 Build oaisim_noS1.Rel10 +01 01 10 Build lte-softmodem_noS1.USRP.Rel10 +01 01 11 Build lte-softmodem_noS1.EXMIMO.Rel10 +01 01 12 Build lte-softmodem_noS1.BLADERF.Rel10 +01 01 13 Build lte-softmodem_noS1.ETHERNET.Rel10 +01 01 20 Build lte-softmodem.USRP.Rel10 +01 01 21 Build lte-softmodem.EXMIMO.Rel10 +01 01 22 Build lte-softmodem.BLADERF.Rel10 +01 01 23 Build lte-softmodem.ETHERNET.Rel10 + +01 01 30 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10 secu_knas_encrypt_eia1.Rel10 secu_kenb.Rel10 aes128_ctr_encrypt.Rel10 aes128_ctr_decrypt.Rel10 secu_knas_encrypt_eea2.Rel10 secu_knas.Rel10 secu_knas_encrypt_eea1.Rel10 kdf.Rel10 aes128_cmac_encrypt.Rel10 secu_knas_encrypt_eia2.Rel10) -01 01 06 Build oaisim.Rel8 + ITTI -01 01 07 Build oaisim.Rel10 -01 01 08 Build oaisim.Rel10 + ITTI -01 01 20 Build Nasmesh -01 01 30 Build RRH Gateway + +01 01 40 Build RRH Gateway for USRP (Rel 10) +01 01 41 Build RRH Gateway for EXMIMO (Rel 10) +01 01 42 Build RRH Gateway for BLADERF (Rel 10) -01 02 Run OAISIM Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2,5,6), and check the operation -01 02 00 Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit -01 02 01 Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors -01 02 02 Run OAISIM Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit -01 02 03 Run OAISIM Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors -01 02 04 Run OAI Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE, + +01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2,5,6), and check the operation +01 02 00 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit +01 02 01 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors +01 02 02 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit +01 02 03 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors +01 02 04 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE, and for check for no packet losses -01 02 05 Run OAI Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE, +01 02 05 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE, and check for no packet losses -01 03 Run OAISIM Rel10 (FDD + 5MHz/10MHz/20MHz + TM 1,2,5,6), and check the operation -01 03 00 Run OAISIM Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit -01 03 01 Run OAISIM Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors -01 03 02 Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit -01 03 03 Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors -01 03 04 Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE, +01 03 Run OAISIM-NOS1 Rel10 (FDD + 5MHz/10MHz/20MHz + TM 1,2,5,6), and check the operation +01 03 00 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit +01 03 01 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors +01 03 02 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit +01 03 03 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors +01 03 04 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE, and for check for no packet losses -01 03 05 Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE, +01 03 05 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE, and check for no packet losses -01 04 MBSFN Tests +01 04 OAISIM-NOS1 MBSFN Tests 01 04 00 Check if eMBMS procedure is not finished completely, make sure that the SIB13/MCCH have been correclty received by UEs 01 04 01 Check if eMBMS multicast/broadcast data is received, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs 01 04 02 Check for eMBMS multicast/broadcast data received in fdd mode, make sure that the SIB13/MCCH/MTCH have been correctly diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash index 7bde09d863..84d1801adf 100755 --- a/cmake_targets/autotests/run_exec_autotests.bash +++ b/cmake_targets/autotests/run_exec_autotests.bash @@ -43,8 +43,8 @@ function test_compile() { xUnit_start test_case_name=$1 - log_dir=$tdir/log - log_file=$tdir/log/test.$1.txt + log_dir=$tdir/log/$test_case_name + log_file=$log_dir/test.$1.log.txt compile_prog=$2 compile_args=$3 pre_exec_file=$4 @@ -57,11 +57,18 @@ function test_compile() { class=${12} compile_prog_out=${13} tags=${14} - build_dir=$tdir/$1/build - exec_file=$build_dir/$6 + xmlfile_testcase=$log_dir/test.$1.xml + #build_dir=$tdir/$1/build + #exec_file=$build_dir/$6 + #compile_prog_out=`eval "echo $compile_prog_out"` + #echo "compile_prog_out = $compile_prog_out" + read -a compile_prog_out_array <<< "$compile_prog_out" + #Temporary log file where execution log is stored. temp_exec_log=$log_dir/temp_log.txt + rm -fr $log_dir + mkdir -p $log_dir @@ -77,44 +84,77 @@ function test_compile() { compile_prog_array=() read -a compile_prog_array <<<"$compile_prog" - tags_array=() - read -a tags_array <<<"$tags" + #tags_array=() + #read -a tags_array <<<"$tags" - pre_compile_prog_array=() - readarray -t pre_compile_prog_array <<< "$pre_compile_prog" + #pre_compile_prog_array=() + #readarray -t pre_compile_prog_array <<< "$pre_compile_prog" + result=1 + result_string="" for (( run_index=1; run_index <= $nruns; run_index++ )) do - tags_array_index=0 - for pre_compile_prog_array_index in "${pre_compile_prog_array[@]}" - do + + #tags_array_index=0 + #for pre_compile_prog_array_index in "${pre_compile_prog_array[@]}" + #do - for compile_prog_array_index in "${compile_prog_array[@]}" - do - echo "Compiling test case $test_case_name.$compile_prog_array_index.${tags_array[$tags_array_index]} Log file = $log_file" - echo "" >> $log_file - rm -fr $build_dir - mkdir -p $build_dir - cd $build_dir + #for compile_prog_array_index in "${compile_prog_array[@]}" + #do + echo "Compiling test case $test_case_name.${tags} Log file = $log_file" + date=`date` + echo ", Date = $date " >> $log_file + #rm -fr $build_dir + #mkdir -p $build_dir + cd $log_dir { - eval $pre_compile_prog_array_index - cmake .. - #rm -fv $exec_file - make -j`nproc` $compile_prog_array_index $compile_args + compile_log_dir=`eval echo \"$OPENAIR_DIR/cmake_targets/log/\"` + echo "Removing compilation log files in $compile_log_dir" + rm -frv $compile_log_dir + echo "Executing $compile_prog $compile_prog_args ...." + eval $compile_prog $compile_prog_args + echo "Copying compilation log files to test case log directory: $log_dir" + cp -fvr $OPENAIR_DIR/cmake_targets/log/ $log_dir/compile_log }>> $log_file 2>&1 echo "" >> $log_file 2>&1 if [ "$class" == "compilation" ]; then - if [ -s "$compile_prog_array_index" ] || [ -s "$compile_prog_out" ] ; then - echo_success "$test_case_name.$compile_prog_array_index.${tags_array[$tags_array_index]} compiled" - xUnit_success "compilation" "$test_case_name.$compile_prog_array_index.${tags_array[$tags_array_index]}" "PASS" "$run_index" - else - echo_error "$test_case_name.$exec_prog.${tags_array[$tags_array_index]} compilation failed" - xUnit_fail "compilation" "$test_case_name.$compile_prog_array_index.${tags_array[$tags_array_index]}" "FAIL" "$run_index" + for compile_prog_out_index in ${compile_prog_out_array[@]} + do + if [ -s "$compile_prog_out_index" ]; then + let "result = result&1" + + echo_success "$test_case_name.${tags} RUN = $run_index $compile_prog_out_index = compiled" + + else + let "result = result&0" + + echo_error "$test_case_name.${tags} RUN = $run_index $compile_prog_out_index failed" + + fi + done #end of for loop compile_prog_out_index + if [ "$result" == "1" ]; then + result_string=$result_string" Run_$run_index = PASS" + else + result_string=$result_string" Run_$run_index = FAIL" fi + fi - let "tags_array_index++" - done # End of for loop compile_prog_array - done # End of for loop (pre_compile_prog_array_index) + #let "tags_array_index++" + #done # End of for loop compile_prog_array + #done # End of for loop (pre_compile_prog_array_index) done #End of for loop (run_index) + + + #If for for some reason upper for loop does not execute, we fail the test case completely + if [ "$result_string" == "" ]; then + result=0 + fi + if [ "$result" == "1" ]; then + echo_success "$test_case_name.${tags} PASSED" + xUnit_success "compilation" "$test_case_name.$tags" "PASS" "$result_string" "$xmlfile_testcase" + else + echo_success "$test_case_name.${tags} FAILED" + xUnit_success "compilation" "$test_case_name.$tags" "FAIL" "$result_string" "$xmlfile_testcase" + fi } @@ -138,8 +178,8 @@ function test_compile() { function test_compile_and_run() { xUnit_start test_case_name=$1 - log_dir=$tdir/log - log_file=$tdir/log/test.$1.txt + log_dir=$tdir/log/$test_case_name + log_file=$log_dir/test.$1.log.txt compile_prog=$2 compile_args=$3 pre_exec_file=$4 @@ -155,11 +195,18 @@ function test_compile_and_run() { tags=${14} mypassword=${15} build_dir=$tdir/$1/build - exec_file=$build_dir/$6 - + #exec_file=$build_dir/$6 + xmlfile_testcase=$log_dir/test.$1.xml #Temporary log file where execution log is stored. temp_exec_log=$log_dir/temp_log.txt + rm -fr $log_dir + mkdir -p $log_dir + + rm -fr $OPENAIR_DIR/cmake_targets/log + + echo "" > $temp_exec_log + echo "" > $log_file #echo "log_dir = $log_dir" #echo "log_file = $log_file" #echo "exec_file = $exec_file" @@ -169,64 +216,67 @@ function test_compile_and_run() { #echo "nruns = $nruns" echo "class = $class" - compile_prog_array=() - read -a compile_prog_array <<<"$compile_prog" + #compile_prog_array=() + #read -a compile_prog_array <<<"$compile_prog" tags_array=() read -a tags_array <<<"$tags" main_exec_args_array=() readarray -t main_exec_args_array <<< "$exec_args" + + + #for search_expr in "${compile_prog_array[@]}" + #do + echo "Compiling test case $test_case_name Log file = $log_file" + echo "" >> $log_file - for search_expr in "${compile_prog_array[@]}" - do - echo "Compiling test case $test_case_name.$search_expr Log file = $log_file" - echo "" >> $log_file + #rm -fr $build_dir + #mkdir -p $build_dir - rm -fr $build_dir - mkdir -p $build_dir - - cd $build_dir + cd $log_dir { - eval $pre_compile_prog - cmake .. + #eval $pre_compile_prog + #cmake .. #rm -fv $exec_file - make -j`nproc` $search_expr $compile_args + echo "Executing $compile_prog $compile_args" >> $log_file + eval "$compile_prog $compile_args" + echo "Copying compilation log files to test case log directory: $log_dir" + cp -fvr $OPENAIR_DIR/cmake_targets/log/ $log_dir/compile_log }>> $log_file 2>&1 echo "" >> $log_file 2>&1 - if [ "$class" == "compilation" ]; then - if [ -s "$search_expr" ] ; then - echo_success "$test_case_name $search_expr compiled" - xUnit_success "compilation" "$test_name.$search_expr" "PASS" 1 - else - echo_error "$test_case_name $exec_prog compilation failed" - xUnit_fail "compilation" "$test_name.$search_expr" "FAIL" 1 - fi - fi - done + #done #process the test case if it is that of execution if [ "$class" == "execution" ]; then tags_array_index=0 for main_exec_args_array_index in "${main_exec_args_array[@]}" do - for (( run_index=1; run_index <= $nruns; run_index++ )) + global_result=1 + result_string="" + + for (( run_index=1; run_index <= $nruns; run_index++ )) do - echo "Executing test case $test_case_name.$main_exec.${tags_array[$tags_array_index]}, Run Index = $run_index, Log file = $log_file" + temp_exec_log=$log_dir/test.$test_case_name.${tags_array[$tags_array_index]}.run_$run_index + echo "" > $temp_exec_log - echo "-----------------------------------------------------------------------------" >> $log_file 2>&1 - echo "" >> $log_file 2>&1 - + echo "Executing test case $test_case_name.${tags_array[$tags_array_index]}, Run Index = $run_index, Execution Log file = $temp_exec_log" + + echo "-----------------------------------------------------------------------------" >> $temp_exec_log 2>&1 + echo "" >> $temp_exec_log 2>&1 + if [ -n "$pre_exec_file" ]; then - { eval " echo '$mypassword' |sudo -S -E $pre_exec_file $pre_exec_args " ; }>> $log_file 2>&1 + { echo " Executing $pre_exec_file $pre_exec_args " + eval " echo '$mypassword' |sudo -S -E $pre_exec_file $pre_exec_args " ; }>> $temp_exec_log 2>&1 fi - echo "Executing $exec_file $main_exec_args_array_index " - echo "Executing $exec_file $main_exec_args_array_index " >> $log_file - { eval "$exec_file $main_exec_args_array_index" ;} > $temp_exec_log 2>&1 + echo "Executing $main_exec $main_exec_args_array_index " + echo "Executing $main_exec $main_exec_args_array_index " >> $temp_exec_log + { eval "$main_exec $main_exec_args_array_index" ;} >> $temp_exec_log 2>&1 + echo "" >> $temp_exec_log 2>&1 cat $temp_exec_log >> $log_file 2>&1 - echo "" >> $log_file 2>&1 + result=1 for search_expr in "${search_expr_array[@]}" @@ -243,39 +293,50 @@ function test_compile_and_run() { let "result = result & 1" fi done + + #If we find a negative search result then there is crash of program and test case is failed even if above condition is true + search_result=`grep -iE "$search_expr_negative" $temp_exec_log` + if [ -n "$search_result" ]; then + result=0 + fi + let "global_result = global_result & result" #echo "result = $result" - - test_case_result="" + + #this is a result of this run + #test_case_result="" if [ "$result" -eq "0" ]; then - test_case_result="FAIL" + result_string=$result_string" Run_$run_index =FAIL" + echo_error "$test_case_name.${tags_array[$tags_array_index]} RUN = $run_index Result = FAIL" fi if [ "$result" -eq "1" ]; then - test_case_result="PASS" + result_string=$result_string" Run_$run_index =PASS" + echo_success "$test_case_name.${tags_array[$tags_array_index]} RUN = $run_index Result = PASS" fi - #If we find a negative search result then there is crash of program and test case is failed even if above condition is true - - search_result=`grep -iE "$search_expr_negative" $temp_exec_log` - if [ -n "$search_result" ]; then - test_case_result="FAIL" - fi - - if [ "$test_case_result" == "FAIL" ]; then - echo_error "execution $test_case_name.$compile_prog.${tags_array[$tags_array_index]} FAIL $run_index" - xUnit_fail "execution" "$test_case_name.$compile_prog.${tags_array[$tags_array_index]}" "FAIL" "$run_index" - fi - - if [ "$test_case_result" == "PASS" ]; then - echo_success "execution $test_case_name.$compile_prog.${tags_array[$tags_array_index]} PASS $run_index" - xUnit_success "execution" "$test_case_name.$compile_prog.${tags_array[$tags_array_index]}" "PASS" "$run_index" - fi - - done + done #End of for loop (nindex) + + echo " Result String = $result_string" + + if [ "$result_string" == "" ]; then + echo_error "execution $test_case_name.$compile_prog.${tags_array[$tags_array_index]} Run_Result = \"$result_string\" Result = FAIL" + xUnit_success "execution" "$test_case_name.${tags_array[$tags_array_index]}" "FAIL" "$result_string" "$xmlfile_testcase" + else + if [ "$global_result" == "0" ]; then + echo_error "execution $test_case_name.${tags_array[$tags_array_index]} Run_Result = \"$result_string\" Result = FAIL" + xUnit_fail "execution" "$test_case_name.${tags_array[$tags_array_index]}" "FAIL" "$result_string" "$xmlfile_testcase" + fi + + if [ "$global_result" == "1" ]; then + echo_success "execution $test_case_name.${tags_array[$tags_array_index]} Run_Result = \"$result_string\" Result = PASS " + xUnit_success "execution" "$test_case_name.${tags_array[$tags_array_index]}" "PASS" "$result_string" "$xmlfile_testcase" + fi + fi + let "tags_array_index++" - done # End of for loop (nindex) + done fi rm -fr $build_dir } @@ -376,6 +437,8 @@ for search_expr in "${test_case_array[@]}" echo "Description = $desc" echo "pre_compile_prog = $pre_compile_prog" echo "compile_prog = $compile_prog" + echo "compile_prog_args = $compile_prog_args" + echo "compile_prog_out = $compile_prog_out" echo "pre_exec = $pre_exec" echo "pre_exec_args = $pre_exec_args" echo "main_exec = $main_exec" @@ -385,6 +448,7 @@ for search_expr in "${test_case_array[@]}" echo "nruns = $nruns" #eval $pre_exec + compile_prog_out=`eval echo \"$compile_prog_out\"` search_array_true=() diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index f402b38f26..650b62ab12 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -13,138 +13,300 @@ compilation Build oaisim.Rel8 - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim -r Rel8 + $OPENAIR_DIR/cmake_targets/oaisim_build_oai/build/oaisim + $OPENAIR_DIR/cmake_targets/at_commands/build/at_nas_ue + $OPENAIR_DIR/cmake_targets/nas_sim_tools/build/usim + $OPENAIR_DIR/cmake_targets/nas_sim_tools/build/nvram - 1 + oaisim.Rel8 + 2 - + compilation - Build oaisim.Rel8 + network device driver(nasmesh_fix) + Build oaisim.Rel10 - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim -r Rel10 + $OPENAIR_DIR/cmake_targets/oaisim_build_oai/build/oaisim + $OPENAIR_DIR/cmake_targets/at_commands/build/at_nas_ue + $OPENAIR_DIR/cmake_targets/nas_sim_tools/build/usim + $OPENAIR_DIR/cmake_targets/nas_sim_tools/build/nvram - + + oaisim.Rel10 1 compilation - Build lte-softmodem EXMIMO.Rel8 + EXMIMO.Rel10 + USRP.Rel10 - cp -vf ../CMakeLists.txt.Rel8 ../CMakeLists.txt - cp -vf ../CMakeLists.txt.Rel10 ../CMakeLists.txt - cp -vf ../CMakeLists.txt.USRP ../CMakeLists.txt - lte-softmodem - + Build oaisim_noS1.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim -r Rel10 --noS1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/CMakeFiles/oai_nw_drv/oai_nw_drv.ko + oaisim_noS1.Rel10 1 - + - + compilation - Build phy unitary simulators + secuirity unitary tests + Build lte_softmodem_noS1.USRP.Rel10 - dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim test_secu_knas_encrypt_eia1 test_secu_kenb test_aes128_ctr_encrypt test_aes128_ctr_decrypt test_secu_knas_encrypt_eea2 test_secu_knas test_secu_knas_encrypt_eea1 test_kdf test_aes128_cmac_encrypt test_secu_knas_encrypt_eia2 - + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -r Rel10 --noS1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + lte-softmodem_noS1.USRP.Rel10 1 - + - + compilation - Build oaisim.Rel8 + ITTI + Build lte_softmodem_noS1.EXMIMO.Rel10 - oaisim - + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -r Rel10 --noS1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/openair_rf/openair_rf.ko + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/updatefw + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/oarf_config_exmimo.oct + lte-softmodem_noS1.EXMIMO.Rel10 1 - + - + compilation - Build oaisim_nos1.Rel10 + Build lte_softmodem_noS1.BLADERF.Rel10 - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w BLADERF -r Rel10 --noS1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + lte-softmodem_noS1.EXMIMO.Rel10 1 - - - + + + compilation - Build oaisim.Rel10 + ITTI + Build lte_softmodem_noS1.ETHERNET.Rel10 - oaisim - + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w ETHERNET -r Rel10 --noS1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + lte-softmodem_noS1.ETHERNET.Rel10 1 - - + + + + compilation - Build Nasmesh + Build lte_softmodem.USRP.Rel10 - nasmesh - - CMakeFiles/nasmesh/nasmesh.ko + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -r Rel10 + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + lte-softmodem.USRP.Rel10 1 - + + + compilation + Build lte_softmodem.EXMIMO.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -r Rel10 + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/CMakeFiles/openair_rf/openair_rf.ko + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/updatefw + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/oarf_config_exmimo.oct + + + + + + + lte-softmodemEXMIMO.Rel10 + 1 + + + + compilation + Build lte_softmodem.BLADERF.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w BLADERF -r Rel10 + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + + + + + + + lte-softmodem.EXMIMO.Rel10 + 1 + + + + compilation + Build lte_softmodem.ETHERNET.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w ETHERNET -r Rel10 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem + + + + + + + lte-softmodem.ETHERNET.Rel10 + 1 + compilation - Build RRH Gateway + Build phy unitary simulators + secuirity unitary tests - rrh_gw - + $OPENAIR_DIR/cmake_targets/build_oai + --phy_simulators --core_simulators + $OPENAIR_DIR/cmake_targets/lte-simulators/build/dlsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/ulsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/pucchsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/prachsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/pdcchsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/pbchsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/mbmssim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eia1 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_kenb + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_ctr_encrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_ctr_decrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eea2 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eea1 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_kdf + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_cmac_encrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eia2 + unitary-sim.Rel10 + 1 + + + + + compilation + Build RRH Gateway + + $OPENAIR_DIR/cmake_targets/build_oai + --RRH -w USRP + $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw + + + + + + + RRH.USRP.Rel10 + 1 + + + + compilation + Build RRH Gateway + + $OPENAIR_DIR/cmake_targets/build_oai + --RRH -w EXMIMO + $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw + $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw + $OPENAIR_DIR/cmake_targets/rrh_gw/build/CMakeFiles/openair_rf/openair_rf.ko + $OPENAIR_DIR/cmake_targets/rrh_gw/build/updatefw + $OPENAIR_DIR/cmake_targets/rrh_gw/build/oarf_config_exmimo.oct + + + + + + + RRH.EXMIMO.Rel10 + 1 + + + + compilation + Build RRH Gateway + + $OPENAIR_DIR/cmake_targets/build_oai + --RRH -w BLADERF + $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw + + + + + + + RRH.USRP.Rel10 1 @@ -153,11 +315,11 @@ execution Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 @@ -170,7 +332,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 oaisim_noS1.tdd.5MHz.TM5 oaisim_noS1.tdd.10MHz.TM5 oaisim_noS1.tdd.20MHz.TM5 oaisim_noS1.tdd.5MHz.TM6 oaisim_noS1.tdd.10MHz.TM6 oaisim_noS1.tdd.20MHz.TM6 "Received RRCConnectionReconfigurationComplete from UE 0" segmentation fault|assertion|exiting|fatal 3 @@ -180,11 +342,11 @@ execution Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -a @@ -197,7 +359,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -a - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 oaisim_noS1.tdd.5MHz.TM5 oaisim_noS1.tdd.10MHz.TM5 oaisim_noS1.tdd.20MHz.TM5 oaisim_noS1.tdd.5MHz.TM6 oaisim_noS1.tdd.10MHz.TM6 oaisim_noS1.tdd.20MHz.TM6 "Received RRCConnectionReconfigurationComplete from UE 0" segmentation fault|assertion|exiting|fatal 3 @@ -207,11 +369,11 @@ execution Run OAISIM Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 @@ -224,7 +386,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 oaisim_noS1.tdd.5MHz.TM5 oaisim_noS1.tdd.10MHz.TM5 oaisim_noS1.tdd.20MHz.TM5 oaisim_noS1.tdd.5MHz.TM6 oaisim_noS1.tdd.10MHz.TM6 oaisim_noS1.tdd.20MHz.TM6 "Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2" segmentation fault|assertion|exiting|fatal 3 @@ -234,11 +396,11 @@ execution Run OAISIM Rel10 TDD, 1 eNB + 3 UEs (5 MHz) in PHY_ABSTRACTION mode and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -a @@ -251,7 +413,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -a - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 tdd.20MHz.TM2 oaisim_noS1.tdd.5MHz.TM5 oaisim_noS1.tdd.10MHz.TM5 oaisim_noS1.tdd.20MHz.TM5 oaisim_noS1.tdd.5MHz.TM6 oaisim_noS1.tdd.10MHz.TM6 oaisim_noS1.tdd.20MHz.TM6 "Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2" segmentation fault|assertion|exiting|fatal 3 @@ -261,11 +423,11 @@ execution Run OAI Rel10 TDD, 1 eNB + 1 UE (5 MHz) without abstraction mode, send ping from from eNB to UE, and check that there is no packet losses - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -c26 @@ -278,7 +440,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -c26 - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 oaisim_noS1.tdd.5MHz.TM5 oaisim_noS1.tdd.10MHz.TM5 oaisim_noS1.tdd.20MHz.TM5 oaisim_noS1.tdd.5MHz.TM6 oaisim_noS1.tdd.10MHz.TM6 oaisim_noS1.tdd.20MHz.TM6 "DL and UL loss rate below 10" segmentation fault|assertion|exiting|fatal 3 @@ -288,11 +450,11 @@ execution Run OAI Rel10 TDD, 1 eNB + 1 UE (5 MHz) in PHY_ABSTRACTION mode, send ping from from eNB to UE, and check that there is no packet losses - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -c26 -a @@ -305,7 +467,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -c26 -a - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 oaisim_noS1.tdd.5MHz.TM5 oaisim_noS1.tdd.10MHz.TM5 tdd.20MHz.TM5 oaisim_noS1.tdd.5MHz.TM6 oaisim_noS1.tdd.10MHz.TM6 oaisim_noS1.tdd.20MHz.TM6 "DL and UL loss rate below 10" segmentation fault|assertion|exiting|fatal 3 @@ -315,11 +477,11 @@ execution Run OAISIM Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -F @@ -332,7 +494,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -F - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 oaisim_noS1.FDD.5MHz.TM5 oaisim_noS1.FDD.10MHz.TM5 oaisim_noS1.FDD.20MHz.TM5 oaisim_noS1.FDD.5MHz.TM6 oaisim_noS1.FDD.10MHz.TM6 oaisim_noS1.FDD.20MHz.TM6 "Received RRCConnectionReconfigurationComplete from UE 0" segmentation fault|assertion|exiting|fatal 3 @@ -342,11 +504,11 @@ execution Run OAISIM Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -F -a @@ -359,7 +521,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -F -a - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 oaisim_noS1.FDD.5MHz.TM5 oaisim_noS1.FDD.10MHz.TM5 oaisim_noS1.FDD.20MHz.TM5 oaisim_noS1.FDD.5MHz.TM6 oaisim_noS1.FDD.10MHz.TM6 oaisim_noS1.FDD.20MHz.TM6 "Received RRCConnectionReconfigurationComplete from UE 0" segmentation fault|assertion|exiting|fatal 3 @@ -369,11 +531,11 @@ execution Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -F @@ -386,7 +548,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -F - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 oaisim_noS1.FDD.5MHz.TM5 oaisim_noS1.FDD.10MHz.TM5 oaisim_noS1.FDD.20MHz.TM5 oaisim_noS1.FDD.5MHz.TM6 oaisim_noS1.FDD.10MHz.TM6 oaisim_noS1.FDD.20MHz.TM6 "Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2" segmentation fault|assertion|exiting|fatal 3 @@ -396,11 +558,11 @@ execution Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -F -a @@ -413,7 +575,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -F -a - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 oaisim_noS1.FDD.5MHz.TM5 oaisim_noS1.FDD.10MHz.TM5 oaisim_noS1.FDD.20MHz.TM5 oaisim_noS1.FDD.5MHz.TM6 oaisim_noS1.FDD.10MHz.TM6 oaisim_noS1.FDD.20MHz.TM6 "Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2" segmentation fault|assertion|exiting|fatal 3 @@ -423,11 +585,11 @@ execution Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE, and for check for no packet losses - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -F -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -F -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -F -c26 @@ -440,7 +602,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -F -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -F -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -F -c26 - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 oaisim_noS1.FDD.5MHz.TM5 oaisim_noS1.FDD.10MHz.TM5 oaisim_noS1.FDD.20MHz.TM5 oaisim_noS1.FDD.5MHz.TM6 oaisim_noS1.FDD.10MHz.TM6 oaisim_noS1.FDD.20MHz.TM6 "DL and UL loss rate below 10" segmentation fault|assertion|exiting|fatal 3 @@ -450,11 +612,11 @@ execution Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE, and check for no packet losses - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -F -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -F -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -F -c26 -a @@ -467,7 +629,7 @@ -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -F -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -F -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -F -c26 -a - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 oaisim_noS1.FDD.5MHz.TM5 oaisim_noS1.FDD.10MHz.TM5 oaisim_noS1.FDD.20MHz.TM5 oaisim_noS1.FDD.5MHz.TM6 oaisim_noS1.FDD.10MHz.TM6 oaisim_noS1.FDD.20MHz.TM6 "DL and UL loss rate below 10" segmentation fault|assertion|exiting|fatal 3 @@ -477,14 +639,15 @@ execution Check if eMBMS procedure is not finished completely, make sure that the SIB13/MCCH have been correclty received by UEs - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -l7 -x 1 -Q3 -n 100 -b1 -u1 "Found MBSFNAreaConfiguration from eNB 0" segmentation fault|assertion|exiting|fatal + oaisim_noS1.eMBMS 3 @@ -492,14 +655,15 @@ execution Check if eMBMS multicast/broadcast data is received, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -l7 -x 1 -T mscbr -Q3 -n 100 -b1 -u1 "Received a multicast packet" segmentation fault|assertion|exiting|fatal + oaisim_noS1.eMBMS 3 @@ -507,14 +671,15 @@ execution Check for eMBMS multicast/broadcast data received in fdd mode, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -l7 -F -T mscbr -x 1 -Q3 -n 100 -b1 -u1 "Received a multicast packet" segmentation fault|assertion|exiting|fatal + oaisim_noS1.eMBMS 3 @@ -522,14 +687,15 @@ execution Check for eMBMS multicast/broadcast DF relaying working properly in fdd mode, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -l7 -c43 -F -T mbvbr -Q4 -j1 -n120 "MTCH for sync area 1" segmentation fault|assertion|exiting|fatal + oaisim_noS1.eMBMS 3 @@ -537,14 +703,15 @@ execution test_aes128_cmac_encrypt - test_aes128_cmac_encrypt - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_aes128_cmac_encrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_cmac_encrypt --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_aes128_cmac_encrypt 3 @@ -552,14 +719,15 @@ execution test_aes128_ctr_decrypt - test_aes128_ctr_decrypt - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_aes128_ctr_decrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_ctr_decrypt --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_aes128_ctr_decrypt 3 @@ -567,14 +735,15 @@ execution test_aes128_ctr_encrypt - test_aes128_ctr_encrypt - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_aes128_ctr_encrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_ctr_encrypt --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_aes128_ctr_encrypt 3 @@ -582,14 +751,15 @@ execution test_secu_kenb - test_secu_kenb - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_secu_kenb + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_kenb --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_kenb 3 @@ -597,14 +767,15 @@ execution test_secu_knas - test_secu_knas - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_secu_knas + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas 3 @@ -612,14 +783,15 @@ execution test_secu_knas_encrypt_eea1 - test_secu_knas_encrypt_eea1 - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_secu_knas_encrypt_eea1 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eea1 --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas_encrypt_eea1 3 @@ -627,14 +799,15 @@ execution test_secu_knas_encrypt_eea2 - test_secu_knas_encrypt_eea2 - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_secu_knas_encrypt_eea2 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eea2 --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas_encrypt_eea2 3 @@ -642,14 +815,15 @@ execution test_secu_knas_encrypt_eia1 - test_secu_knas_encrypt_eia1 - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_secu_knas_encrypt_eia1 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eia1 --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas_encrypt_eia1 3 @@ -657,14 +831,15 @@ execution test_secu_knas_encrypt_eia2 - test_secu_knas_encrypt_eia2 - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_secu_knas_encrypt_eia2 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eia1 --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas_encrypt_eia2 3 @@ -672,14 +847,15 @@ execution test_kdf - test_kdf - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators - test_kdf + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_kdf --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_kdf 3 @@ -698,11 +874,11 @@ (TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)), - dlsim - + $OPENAIR_DIR/cmake_targets/build_oai + --phy_simulators - dlsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/dlsim -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -L -m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O70 -m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -L @@ -714,7 +890,7 @@ -m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -L -m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O70 -L -m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O70 -L - test1 test5 test6 test6b test7 test7b test10 test10b test11 TM2_test1 TM2_test1b + dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.TM2_test1 dlsim.TM2_test1b "passed" segmentation fault|assertion|exiting|fatal 1 @@ -729,18 +905,18 @@ (Test 5, 20 MHz, FDD (MCS 5), AWGN, 6dB (70%)), (Test 6, 20 MHz, FDD (MCS 16), AWGN, 12 dB (70%)) - ulsim - + $OPENAIR_DIR/cmake_targets/build_oai + --phy_simulators - ulsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/ulsim -B25 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 -L -B25 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 -L -B50 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 -L -B50 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 -L -B100 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 -L -B100 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 -L - test1 test2 test3 test4 test5 test6 + ulsim.test1 ulsim.test2 ulsim.test3 ulsim.test4 ulsim.test5 ulsim.test6 "passed" segmentation fault|assertion|exiting|fatal 1 diff --git a/cmake_targets/tools/test_helper b/cmake_targets/tools/test_helper index 35752e9d20..e60fb8c720 100644 --- a/cmake_targets/tools/test_helper +++ b/cmake_targets/tools/test_helper @@ -24,15 +24,18 @@ xUnit_start() { # \param $1 classname # \param $2 testcase name # \param $3 testcase result -# \param $4 run index +# \param $4 run result +# \param $5 XML file local to test case for storing its own results xUnit_fail() { class=$1 test_case=$2 result=$3 - run_index=$4 + run_result=$4 + xmlfile_testcase=$5 currtime=$(date +%s.%N) time=$(echo "$currtime - $XUNIT_START" | bc -l) - xml="" + xml="" + echo -e $xml > $xmlfile_testcase XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml" XUNIT_FAILED=$((XUNIT_FAILED+1)) } @@ -43,15 +46,18 @@ xUnit_fail() { # \param $1 classname # \param $2 testcase name # \param $3 testcase result -# \param $4 run index +# \param $4 run result +# \param $5 XML file local to test case for storing its own results xUnit_success() { class=$1 test_case=$2 result=$3 - run_index=$4 + run_result=$4 + xmlfile_testcase=$5 currtime=$(date +%s.%N) time=$(echo "$currtime - $XUNIT_START" | bc -l) - xml="" + xml="" + echo -e $xml > $xmlfile_testcase XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml" XUNIT_SUCCESS=$((XUNIT_SUCCESS+1)) } From 2a9a915961488bbcf5ede0daa879b2e96d7bd076 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Mon, 30 Nov 2015 18:55:16 +0100 Subject: [PATCH 05/19] updates for parallel execution to test case framework --- cmake_targets/autotests/openair.py | 8 +- .../autotests/run_exec_lte-softmodem_tests.py | 106 +++++++++++++----- cmake_targets/autotests/test_case_list.xml | 7 +- 3 files changed, 85 insertions(+), 36 deletions(-) diff --git a/cmake_targets/autotests/openair.py b/cmake_targets/autotests/openair.py index 1606bcaf6a..598edaf169 100644 --- a/cmake_targets/autotests/openair.py +++ b/cmake_targets/autotests/openair.py @@ -164,15 +164,15 @@ class openair(core): def kill(self, user, pw): try: if user == 'root' : - os.system('pkill oaisim') + os.system('pkill oaisim oaisim_nos1') os.system('pkill cc1') time.sleep(1) - os.system('pkill oaisim') + os.system('pkill oaisim oaisim_nos1') else : - os.system('echo '+pw+' | sudo -S pkill oaisim') + os.system('echo '+pw+' | sudo -S pkill oaisim oaisim_nos1') os.system('echo '+pw+' | sudo -S pkill cc1') time.sleep(1) - os.system('echo '+pw+' | sudo -S pkill oaisim') + os.system('echo '+pw+' | sudo -S pkill oaisim oaisim_nos1') except Error, val: print "Error:", val diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py index f66f8206c0..a81fb49d03 100644 --- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py +++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py @@ -211,47 +211,98 @@ class oaiThread (threading.Thread): print "result = " + result print "Exiting " + self.name -#This class runs test cases with class oaisim_noS1, compilatation -class testCaseThread_generic(threading.thread): - def __init__(self, threadID, name, oai, machine, logdirOAI5GRepo, oai5GRepoDirRemote, testcasename,oldprogramList, CleanupAluLteBox, username, password, timeout): +#This class runs test cases with class execution, compilatation +class testCaseThread_generic (threading.Thread): + def __init__(self, threadID, name, machine, logdirOAI5GRepo, testcasename,oldprogramList, CleanupAluLteBox, password, timeout): threading.Thread.__init__(self) self.threaID = threadID self.name = name - self.oai = oai self.testcasename = testcasename self.timeout = timeout self.machine = machine - self.oai5GRepoDirRemote = oai5GRepoDirRemote self.logdirOAI5GRepo = logdirOAI5GRepo - self.username = username - self.password = password + self.oldprogramList = oldprogramList + self.CleanupAluLteBox = CleanupAluLteBox + self.password=password def run(self): try: mypassword='' #addsudo = 'echo \'' + mypassword + '\' | sudo -S -E ' addpass = 'echo \'' + mypassword + '\' | ' user = getpass.getuser() - print "Starting test case : " + self.testcasename + " On machine " + machineName + print "Starting test case : " + self.testcasename + " On machine " + self.machine + oai = openair('localdomain',machine) + oai.connect(user, self.password) cleanOldPrograms(oai, oldprogramList, CleanUpAluLteBox) - logdir_local_testcase = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename - logdir_local_base = logdirOAI5GRepo+'/cmake_targets/autotests/log/' - logdir_remote_testcase = oai5GRepoDirRemote + '/cmake_targets/autotests/log' + self.testcasename + logdir_local = os.environ.get('OPENAIR_DIR') + logdir_local_testcase = logdir_local +'/cmake_targets/autotests/log/'+ self.testcasename + logdir_local_base = logdir_local +'/cmake_targets/autotests/log/' + logdir_remote_testcase = self.logdirOAI5GRepo + '/cmake_targets/autotests/log' + self.testcasename + logdir_remote = self.logdirOAI5GRepo + '/cmake_targets/autotests/log' + logfile_task_testcasename = logdir_local_testcase + '/test_task' + '_' + testcasename + '_.log' + logfile_task_testcasename_out = logdir_remote + '/test_task_out' + '_' + str(run) + '_.log' os.removedirs(logdir_testcase) os.mkdir (logdir_testcase) - cmd = "( cd " + self.oai5GRepoDirRemote + " \n " + cmd = "( cd " + self.logdirOAI5GRepo + " \n " cmd = cmd + "source oaienv \n" - cmd = cmd + "python run_test_case_generic -d " + self.oai5GRepoDirRemote + " -g " + "\"" + self.testcasename + "\"" - cmd = cmd + " ) " - - #Now we copy all the remote - ssh = SSHSession(self.machine , username=username, key_file=None, passsword=password) + cmd = cmd + "$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotets.bash --run-group \"" + "self.testcasename +\" " + cmd = cmd + " ) >& " + logfile_task_testcasename_out + " ; " + " mv " + logfile_task_testcasename_out + logdir_remote_testcase + + write_file(logfile_task_testcasename, cmd, mode="w") + #Now we copy all the remote files + ssh = SSHSession(self.machine , username=user, key_file=None, password=password) ssh.get_all(logdir_remote_testcase , logdir_local_base) - print "Finishing test case : " + self.testcasename + " On machine " + machineName + print "Finishing test case : " + self.testcasename + " On machine " + machineName + cleanOldPrograms(oai, oldprogramList, CleanUpAluLteBox) + oai.kill() + oai.disconnect() + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n threadID = ' + self.threaID + '\n testcasename = ' + self.testcasename + '\n timeout = ' + self.timeout + '\n machine = ' + self.machine + '\n logdirOAI5GRepo = ' + self.logdirOAI5GRepo + '\n' + error = error + traceback.format_exc() def addsudo (cmd, password=""): cmd = 'echo \'' + password + '\' | sudo -S -E bash -c \' ' + cmd + '\' ' return cmd + +def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, password, CleanupAluLteBox,timeout): + try: + mypassword=password + MachineListFree=[] + while MachineListFree.__len__() == 0 : + MachineListBusy=[] + #first we need to find the list of free machines that we could run our test case + if threadListGeneric.__len__() ==0 : + #This means no thread is started yet + MachineListFree = MachineList + else : + for param in threadListGeneric : + thread_id = param["thread_id"] + machine = param["Machine"] + testcasename = param["testcasename"] + thread_id.join(1) + if thread_id.isAlive == True: + MachineListBusy.append(machine) + else : + threadListGeneric.remove(param) + #Now we check if there is at least one free machine + MachineListFree = MachineList + for machine in MachineListBusy: + MachineListFree.remove(machine) + machine = MachineListFree[0] + thread = testCaseThread_generic(1,"Generic Thread", machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, password, timeout) + param={"thread_id":thread, "Machine":machine, "testcasename":testcasename} + thread.start() + threadListGeneric.append(param) + return threadListGeneric + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n testcasename = ' + testcasename + '\n logdirOAI5GRepo = ' + logdirOAI5GRepo + '\n MachineList = ' + MachineList + '\n timeout = ' + timeout + '\n' + error = error + traceback.format_exc() + #Function to handle test case class : lte-softmodem def handle_testcaseclass_softmodem (testcase, oldprogramList, oai_list, logdirOAI5GRepo , logdirOpenaircnRepo, MachineList, password, CleanUpAluLteBox): @@ -603,6 +654,7 @@ def search_test_case_group(testcasename, testcasegroup): #thread1 = myThread(1, "Thread-1", 1) +threadListGeneric=[] debug = 0 pw ='' i = 0 @@ -714,6 +766,7 @@ GitOAI5GRepoBranch = xmlRoot.findtext('GitOAI5GRepoBranch',default='') GitOpenaircnRepoBranch = xmlRoot.findtext('GitOpenair-cnRepoBranch',default='') CleanUpOldProgs = xmlRoot.findtext('CleanUpOldProgs',default='') CleanUpAluLteBox = xmlRoot.findtext('CleanUpAluLteBox',default='') +Timeout_execution = int (xmlRoot.findtext('Timeout_execution')) print "MachineList = " + MachineList print "GitOpenair-cnRepo = " + GitOpenaircnRepo @@ -725,7 +778,7 @@ cmd = "git show-ref --heads -s "+ GitOAI5GRepoBranch GitOAI5GHeadVersion = subprocess.check_output ([cmd], shell=True) print "GitOAI5GHeadVersion = " + GitOAI5GHeadVersion print "CleanUpOldProgs = " + CleanUpOldProgs - +print "Timeout_execution = " + str(Timeout_execution) MachineList = MachineList.split() @@ -897,6 +950,7 @@ for index in oai_list: sys.exit(1) + #Now we wait for all the threads to complete index = 0 for t in threads_init_setup: @@ -922,7 +976,7 @@ for t in threads_init_setup: #Now we process all the test cases - +threadListGeneric=[] testcaseList=xmlRoot.findall('testCase') #print testcaseList for testcase in testcaseList: @@ -939,19 +993,17 @@ for testcase in testcaseList: index_EPCMachine = MachineList.index(EPCMachine) print "testcasename = " + testcasename + " class = " + testcaseclass handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, oai_list, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, pw, CleanUpAluLteBox ) - - elif testcaseclass == 'compilation' : - continue - handle_testcaseclass_compilation (testcase) - elif testcaseclass == 'execution' : - continue - handle_testcaseclass_oaisim (testcase) + elif (testcaseclass == 'compilation'): + handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, pw, CleanupAluLteBox,Timeout_execution) + elif (testcaseclass == 'execution'): + handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, pw, CleanupAluLteBox,Timeout_execution) else : print "Unknown test case class: " + testcaseclass sys.exit() print "Exiting the test cases execution now..." + sys.exit() diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 650b62ab12..2cd1438a8a 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -8,7 +8,7 @@ feature-17-test_framework oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* hss hss_sim configure_cots_bandrich_ue* wvdial* /opt/ltebox/tools/stop_ltebox - + 1800 compilation Build oaisim.Rel8 @@ -26,7 +26,7 @@ oaisim.Rel8 - 2 + 1 @@ -928,7 +928,6 @@ calisson stevens amerique - oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox* 60 /tmp targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" @@ -1000,7 +999,6 @@ calisson stevens nano - oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox* 60 /tmp targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" @@ -1079,7 +1077,6 @@ calisson stevens calisson - oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox* 60 /tmp targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" From 25b3eeb440dbbc14e88e656434acfce324b8e473 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Tue, 1 Dec 2015 19:09:37 +0100 Subject: [PATCH 06/19] updated sudo detection --- .../autotests/run_exec_autotests.bash | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash index 84d1801adf..7955defa63 100755 --- a/cmake_targets/autotests/run_exec_autotests.bash +++ b/cmake_targets/autotests/run_exec_autotests.bash @@ -354,16 +354,20 @@ Options This help -g | --run-group Run test cases in a group. For example, ./run_exec_autotests "0101* 010102" +-p + Use password for logging ' } function main () { RUN_GROUP=0 +SET_PASSWORD=0 +passwd="" test_case_group="" test_case_group_array=() test_case_array=() echo_info "Note that the user should be sudoer for executing certain commands, for example loading kernel modules" -read -s -p "Enter Password: " mypassword + until [ -z "$1" ] do @@ -373,6 +377,10 @@ until [ -z "$1" ] test_case_group=$2 echo_info "Will execute test cases only in group $test_case_group" shift 2;; + -p) + SET_PASSWORD=1 + passwd=$2 + shift 2;; -h | --help) print_help exit 1;; @@ -383,6 +391,20 @@ until [ -z "$1" ] esac done +if [ "$SET_PASSWORD" == "1" ]; then + mypassword=$passwd +else + read -s -p "Enter Password: " mypassword +fi + +tmpfile=`mktemp` +echo \'$passwd\' | sudo -S -v >& $tmpfile +tstsudo=`cat $tmpfile` +if [ "$tstsudo" != "" ]; then + echo "User might not have sudo privileges. Exiting" +fi +echo "tstsudo = $tstsudo" +rm -fr $tmpfile xml_conf="$OPENAIR_DIR/cmake_targets/autotests/test_case_list.xml" From 4d000a6e8e79cd28a29b2abafe74f12830027193 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Tue, 1 Dec 2015 19:53:15 +0100 Subject: [PATCH 07/19] update for sudo check --- cmake_targets/autotests/run_exec_autotests.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash index 7955defa63..40160d73ac 100755 --- a/cmake_targets/autotests/run_exec_autotests.bash +++ b/cmake_targets/autotests/run_exec_autotests.bash @@ -398,10 +398,12 @@ else fi tmpfile=`mktemp` -echo \'$passwd\' | sudo -S -v >& $tmpfile +echo \'$passwd\' | sudo echo $HOME >& $tmpfile tstsudo=`cat $tmpfile` -if [ "$tstsudo" != "" ]; then +if [ "$tstsudo" != "$HOME" ]; then echo "User might not have sudo privileges. Exiting" + echo "tstsudo = $tstsudo" + exit fi echo "tstsudo = $tstsudo" rm -fr $tmpfile From 6e1e41db8a60025acde12dca21fbbe8dca249f18 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Wed, 2 Dec 2015 13:40:39 +0100 Subject: [PATCH 08/19] updated to remove SSE4.2 flags as they are not used --- cmake_targets/CMakeLists.txt | 7 ++----- cmake_targets/tools/build_helper | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 8ba602c25d..d7a656e61c 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -133,9 +133,6 @@ else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") if (CPUINFO MATCHES "avx2") set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mavx2") endif() - if (CPUINFO MATCHES "sse4_2") - set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.2") - endif() if (CPUINFO MATCHES "sse4_1") set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.1") endif() @@ -149,8 +146,8 @@ set(C_FLAGS_PROCESSOR " ${C_FLAGS_PROCESSOR} ${CFLAGS_PROCESSOR_USER}") Message("C_FLAGS_PROCESSOR is ${C_FLAGS_PROCESSOR}") if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86") - if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.2")) ) - Message(FATAL_ERROR "For x86 Architecture, you must have following flags: -mssse3 -msse4.1 -msse4.2. The current detected flags are: ${C_FLAGS_PROCESSOR}. You can pass the flags manually in build script, for example: ./build_oai --cflags_processor \"-mssse3 -msse4.1 -msse4.2\" ") + if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) ) + Message(FATAL_ERROR "For x86 Architecture, you must have following flags: -mssse3 -msse4.1. The current detected flags are: ${C_FLAGS_PROCESSOR}. You can pass the flags manually in build script, for example: ./build_oai --cflags_processor \"-mssse3 -msse4.1\" ") endif() endif() diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 004c83f0b8..c82b79499c 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -210,7 +210,8 @@ check_install_additional_tools (){ unzip \ valgrind \ vlan \ - ctags + ctags \ + ntpdate ) >& $log_file } From 0aeb77ce9861a909aea2a46f719b060ad5eab1cf Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Thu, 3 Dec 2015 20:54:47 +0100 Subject: [PATCH 09/19] updates to test framework + bugfixes --- cmake_targets/autotests/openair.py | 60 ++-- .../autotests/run_exec_autotests.bash | 6 +- .../autotests/run_exec_lte-softmodem_tests.py | 270 ++++++++++++------ cmake_targets/autotests/test_case_list.xml | 5 +- 4 files changed, 230 insertions(+), 111 deletions(-) diff --git a/cmake_targets/autotests/openair.py b/cmake_targets/autotests/openair.py index 598edaf169..e0acf31cb8 100644 --- a/cmake_targets/autotests/openair.py +++ b/cmake_targets/autotests/openair.py @@ -41,6 +41,8 @@ import os import array import shutil import subprocess +import sys +import traceback # import call from core import * @@ -102,8 +104,12 @@ class openair(core): self.oai.prompt() print self.oai.before - except Error, val : - print "Error: can't connect to"+username+"@"+self.address + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) def connect2(self, username, password, prompt='$'): self.prompt1 = prompt @@ -133,9 +139,12 @@ class openair(core): sys.exit(1) return 'Ok' - except Exception, val: - time.sleep(5) - print "Error:", val + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) def connect_localshell(self, prompt='$'): self.prompt1 = prompt @@ -152,9 +161,12 @@ class openair(core): else : sys.exit(1) - except Exception, val: - time.sleep(5) - print "Error:", val + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) def disconnect(self): print 'disconnecting the ssh connection to ' + self.address + '\n' @@ -173,8 +185,12 @@ class openair(core): os.system('echo '+pw+' | sudo -S pkill cc1') time.sleep(1) os.system('echo '+pw+' | sudo -S pkill oaisim oaisim_nos1') - except Error, val: - print "Error:", val + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) def rm_driver(self,oai,user, pw): try: @@ -184,8 +200,12 @@ class openair(core): else : oai.send_nowait('echo '+pw+ ' | sudo -S rmmod nasmesh;') #os.system('echo '+pw+ ' | sudo -S rmmod nasmesh;') - except Error, val: - print "Error removing oai network driver module:", val + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) def driver(self,oai,user,pw): #pwd = oai.send_recv('pwd') @@ -197,8 +217,12 @@ class openair(core): else : oai.send('echo '+pw+ ' | sudo -S insmod ./nasmesh.ko;') - except Error, val: - print "Error inserting oai network driver module:", val + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) def cleandir (self, logdir,debug) : @@ -209,8 +233,12 @@ class openair(core): print 'filepath is ' + filepath try: shutil.rmtree(filepath) - except OSError: - os.remove(filepath) + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) #print 'Could not remove the filepath'+ filepath + ' with error ' + OSError def create_dir(self,dirname,debug) : diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash index 40160d73ac..2eea43082d 100755 --- a/cmake_targets/autotests/run_exec_autotests.bash +++ b/cmake_targets/autotests/run_exec_autotests.bash @@ -107,6 +107,7 @@ function test_compile() { #mkdir -p $build_dir cd $log_dir { + uname -a compile_log_dir=`eval echo \"$OPENAIR_DIR/cmake_targets/log/\"` echo "Removing compilation log files in $compile_log_dir" rm -frv $compile_log_dir @@ -236,6 +237,7 @@ function test_compile_and_run() { cd $log_dir { + uname -a #eval $pre_compile_prog #cmake .. #rm -fv $exec_file @@ -272,7 +274,7 @@ function test_compile_and_run() { fi echo "Executing $main_exec $main_exec_args_array_index " echo "Executing $main_exec $main_exec_args_array_index " >> $temp_exec_log - { eval "$main_exec $main_exec_args_array_index" ;} >> $temp_exec_log 2>&1 + { uname -a ; eval "$main_exec $main_exec_args_array_index" ;} >> $temp_exec_log 2>&1 echo "" >> $temp_exec_log 2>&1 cat $temp_exec_log >> $log_file 2>&1 @@ -504,6 +506,8 @@ for search_expr in "${test_case_array[@]}" } +uname -a + main "$@" xUnit_write "$results_file" diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py index a81fb49d03..3ae3758402 100644 --- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py +++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py @@ -61,7 +61,8 @@ from openair import * import paramiko import ssh from ssh import SSHSession - +import subprocess +import commands def write_file(filename, string, mode="w"): text_file = open(filename, mode) @@ -107,6 +108,7 @@ def sftp_module (username, password, hostname, ports, paramList,logfile): error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) error = error + '\n username = ' + username + '\n hostname = ' + hostname + '\n localfile = ' + localD + '\n remotefile = ' + remoteD + '\n operation = ' + operation + '\nlogfile = ' + logfile + '\n ports = ' + str(ports) + '\n' error = error + traceback.format_exc() + print error sftp.close() transport.close() @@ -195,27 +197,38 @@ class myThread (threading.Thread): class oaiThread (threading.Thread): - def __init__(self, threadID, name, oai, cmd, sudo, timeout): + def __init__(self, threadID, threadname, machine, username, password, cmd, sudo, timeout): threading.Thread.__init__(self) self.threadID = threadID - self.name = name - #self.counter = counter - self.oai = oai + self.threadname = threadname + self.machine = machine + self.username = username + self.password = password self.cmd = cmd self.sudo = sudo self.timeout = timeout - self.machineName = machineName def run(self): - print "Starting " + self.name - result = self.oai.send_recv(self.cmd, self.sudo, self.timeout) - print "result = " + result - print "Exiting " + self.name + try: + oai = openair('localdomain',self.machine) + oai.connect(user, self.password) + print "Starting " + self.threadname + "on machine " + self.machine + result = oai.send_recv(self.cmd, self.sudo, self.timeout) + print "result = " + result + print "Exiting " + self.threadname + oai.disconnect() + except Exception, e: + error='' + error = error + ' In class oaiThread, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n threadID = ' + str(self.threadID) + '\n threadname = ' + self.threadname + '\n timeout = ' + self.timeout + '\n machine = ' + self.machine + '\n cmd = ' + self.cmd + '\n timeout = ' + str(self.timeout) + '\n' + error = error + traceback.format_exc() + print error + #This class runs test cases with class execution, compilatation class testCaseThread_generic (threading.Thread): def __init__(self, threadID, name, machine, logdirOAI5GRepo, testcasename,oldprogramList, CleanupAluLteBox, password, timeout): threading.Thread.__init__(self) - self.threaID = threadID + self.threadID = threadID self.name = name self.testcasename = testcasename self.timeout = timeout @@ -231,36 +244,51 @@ class testCaseThread_generic (threading.Thread): addpass = 'echo \'' + mypassword + '\' | ' user = getpass.getuser() print "Starting test case : " + self.testcasename + " On machine " + self.machine - oai = openair('localdomain',machine) + oai = openair('localdomain',self.machine) oai.connect(user, self.password) - cleanOldPrograms(oai, oldprogramList, CleanUpAluLteBox) + cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox) logdir_local = os.environ.get('OPENAIR_DIR') logdir_local_testcase = logdir_local +'/cmake_targets/autotests/log/'+ self.testcasename logdir_local_base = logdir_local +'/cmake_targets/autotests/log/' - logdir_remote_testcase = self.logdirOAI5GRepo + '/cmake_targets/autotests/log' + self.testcasename - logdir_remote = self.logdirOAI5GRepo + '/cmake_targets/autotests/log' - logfile_task_testcasename = logdir_local_testcase + '/test_task' + '_' + testcasename + '_.log' - logfile_task_testcasename_out = logdir_remote + '/test_task_out' + '_' + str(run) + '_.log' - os.removedirs(logdir_testcase) - os.mkdir (logdir_testcase) - cmd = "( cd " + self.logdirOAI5GRepo + " \n " + logdir_remote_testcase = self.logdirOAI5GRepo + '/cmake_targets/autotests/log/' + self.testcasename + logdir_remote = self.logdirOAI5GRepo + '/cmake_targets/autotests/log/' + logfile_task_testcasename = logdir_local_testcase + '/test_task' + '_' + self.testcasename + '_.log' + logfile_task_testcasename_out = logdir_remote + '/test_task_out' + '_' + self.testcasename + '_.log' + #print "logdir_local_testcase = " + logdir_local_testcase + #print "logdir_remote_testcase = " + logdir_remote_testcase + #if os.path.exists(logdir_local_testcase) == True : + # os.removedirs(logdir_local_testcase) + #os.mkdir(logdir_local_testcase) + os.system("rm -fr " + logdir_local_testcase ) + os.system("mkdir -p " + logdir_local_testcase) + cmd = "mkdir -p " + logdir_remote_testcase + res = oai.send_recv(cmd, False, self.timeout) + print "res = " + res + + cmd = "( cd " + self.logdirOAI5GRepo + " \n " cmd = cmd + "source oaienv \n" - cmd = cmd + "$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotets.bash --run-group \"" + "self.testcasename +\" " - cmd = cmd + " ) >& " + logfile_task_testcasename_out + " ; " + " mv " + logfile_task_testcasename_out + logdir_remote_testcase - + cmd = cmd + "$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash --run-group \"" + self.testcasename + "\" -p \'\'" + cmd = cmd + " ) >& " + logfile_task_testcasename_out + " ; " + "mkdir -p " + logdir_remote_testcase + "; mv " + logfile_task_testcasename_out + " " +logdir_remote_testcase + + #print "cmd = " + cmd + res = oai.send_recv(cmd, False, self.timeout) + #print "res = " + res + print "ThreadID = " + str(self.threadID) + "ThreadName: " + self.name + " testcasename: " + self.testcasename + "Execution Result = " + res write_file(logfile_task_testcasename, cmd, mode="w") #Now we copy all the remote files - ssh = SSHSession(self.machine , username=user, key_file=None, password=password) + ssh = SSHSession(self.machine , username=user, key_file=None, password=self.password) ssh.get_all(logdir_remote_testcase , logdir_local_base) - print "Finishing test case : " + self.testcasename + " On machine " + machineName - cleanOldPrograms(oai, oldprogramList, CleanUpAluLteBox) - oai.kill() + print "Finishing test case : " + self.testcasename + " On machine " + self.machine + cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox) + #oai.kill(user,mypassword) oai.disconnect() except Exception, e: error='' - error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) - error = error + '\n threadID = ' + self.threaID + '\n testcasename = ' + self.testcasename + '\n timeout = ' + self.timeout + '\n machine = ' + self.machine + '\n logdirOAI5GRepo = ' + self.logdirOAI5GRepo + '\n' + error = error + ' In Class = testCaseThread_generic, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n threadID = ' + str(self.threadID) + '\n threadName = ' + self.name + '\n testcasename = ' + self.testcasename + '\n machine = ' + self.machine + '\n logdirOAI5GRepo = ' + self.logdirOAI5GRepo + '\n' + '\n timeout = ' + str(timeout) error = error + traceback.format_exc() + print error + sys.exit() def addsudo (cmd, password=""): @@ -276,36 +304,59 @@ def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramLis #first we need to find the list of free machines that we could run our test case if threadListGeneric.__len__() ==0 : #This means no thread is started yet - MachineListFree = MachineList + MachineListFree = MachineList[:] else : for param in threadListGeneric : thread_id = param["thread_id"] machine = param["Machine"] - testcasename = param["testcasename"] + testcasenameold = param["testcasename"] thread_id.join(1) - if thread_id.isAlive == True: - MachineListBusy.append(machine) + if thread_id.isAlive() == True: + print "thread_id is alive: testcasename: " + testcasenameold + if machine not in MachineListBusy: + MachineListBusy.append(machine) else : threadListGeneric.remove(param) - #Now we check if there is at least one free machine - MachineListFree = MachineList - for machine in MachineListBusy: - MachineListFree.remove(machine) + #Now we check if there is at least one free machine + MachineListFree = MachineList[:] + for machine in MachineListBusy: + if machine in MachineListFree: + MachineListFree.remove(machine) + #print "MachineListFree = " + ','.join(MachineListFree) + #print "MachineListBusy = " + ','.join(MachineListBusy) + #print "MachineList = " + ','.join(MachineList) machine = MachineListFree[0] - thread = testCaseThread_generic(1,"Generic Thread", machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, password, timeout) + thread = testCaseThread_generic(1,"Generic Thread_"+testcasename+"_"+machine+_, machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, password, timeout) param={"thread_id":thread, "Machine":machine, "testcasename":testcasename} thread.start() threadListGeneric.append(param) return threadListGeneric except Exception, e: - error='' - error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) - error = error + '\n testcasename = ' + testcasename + '\n logdirOAI5GRepo = ' + logdirOAI5GRepo + '\n MachineList = ' + MachineList + '\n timeout = ' + timeout + '\n' - error = error + traceback.format_exc() + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n testcasename = ' + testcasename + '\n logdirOAI5GRepo = ' + logdirOAI5GRepo + '\n MachineList = ' + ','.join(MachineList) + '\n timeout = ' + str(timeout) + '\n' + error = error + traceback.format_exc() + print error + sys.exit(1) + +#Blocking wait for all threads related to generic testcase execution, class (compilation and execution) +def wait_testcaseclass_generic_threads(threadListGeneric, timeout = 1): + for param in threadListGeneric: + thread_id = param["thread_id"] + machine = param["Machine"] + testcasenameold = param["testcasename"] + thread_id.join(timeout) + if thread_id.isAlive() == True: + print "thread_id on machine: " + machine + " is still alive: testcasename: " + testcasenameold + print " Exiting now..." + sys.exit(1) + else: + print "thread_id on machine: " + machine + " is stopped: testcasename: " + testcasenameold + threadListGeneric.remove(param) + return threadListGeneric - #Function to handle test case class : lte-softmodem -def handle_testcaseclass_softmodem (testcase, oldprogramList, oai_list, logdirOAI5GRepo , logdirOpenaircnRepo, MachineList, password, CleanUpAluLteBox): +def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , logdirOpenaircnRepo, MachineList, password, CleanUpAluLteBox): #We ignore the password sent to this function for secuirity reasons for password present in log files #It is recommended to add a line in /etc/sudoers that looks something like below. The line below will run sudo without password prompt # your_user_name ALL=(ALL:ALL) NOPASSWD: ALL @@ -365,15 +416,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, oai_list, logdirOA index_eNBMachine = MachineList.index(eNBMachine) index_UEMachine = MachineList.index(UEMachine) index_EPCMachine = MachineList.index(EPCMachine) - oai_eNB = oai_list[index_eNBMachine] - oai_UE = oai_list[index_UEMachine] - - #We need to create two ssh sessions to avoid race conditions - if index_eNBMachine == index_EPCMachine: - oai_EPC = openair('localdomain', EPCMachine) - oai_EPC.connect(user,password) - else: - oai_EPC = oai_list[index_EPCMachine] + oai_eNB = openair('localdomain', eNBMachine) + oai_eNB.connect(user, password) + oai_UE = openair('localdomain', UEMachine) + oai_UE.connect(user, password) + oai_EPC = openair('localdomain', EPCMachine) + oai_EPC.connect(user, password) + cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox) cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox) cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox) @@ -515,9 +564,9 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, oai_list, logdirOA task_EPC = task_EPC + ' ) > ' + logfile_task_EPC_out + ' 2>&1 ' write_file(logfile_task_EPC, task_EPC, mode="w") - thread_EPC = oaiThread(1, "EPC_thread", oai_EPC , task_EPC, False, timeout_thread) - thread_eNB = oaiThread(2, "eNB_thread", oai_eNB , task_eNB, False, timeout_thread) - thread_UE = oaiThread(3, "UE_thread", oai_UE , task_UE, False, timeout_thread) + thread_EPC = oaiThread(1, "EPC_thread", EPCMachine, user, password , task_EPC, False, timeout_thread) + thread_eNB = oaiThread(2, "eNB_thread", eNBMachine, user, password , task_eNB, False, timeout_thread) + thread_UE = oaiThread(3, "UE_thread", UEMachine, user, password , task_UE, False, timeout_thread) threads=[] threads.append(thread_eNB) @@ -631,9 +680,12 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, oai_list, logdirOA remotefile = logdir_EPC + '/EPC_task_out' + '_' + str(run) + '_.log' paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) sftp_module (user, password, EPCMachine, ports, paramList, sftp_log) + oai_eNB.disconnect() + oai_UE.disconnect() + oai_EPC.disconnect() #We need to close the new ssh session that was created - if index_eNBMachine == index_EPCMachine: - oai_EPC.disconnect() + #if index_eNBMachine == index_EPCMachine: + # oai_EPC.disconnect() #This function searches if test case is present in list of test cases that need to be executed by user def search_test_case_group(testcasename, testcasegroup): @@ -654,7 +706,6 @@ def search_test_case_group(testcasename, testcasegroup): #thread1 = myThread(1, "Thread-1", 1) -threadListGeneric=[] debug = 0 pw ='' i = 0 @@ -677,8 +728,8 @@ if openairdir_local is None: sys.exit() locallogdir = openairdir_local + '/cmake_targets/autotests/log/' #Remove the contents of local log directory -os.system(' rm -fr ' + locallogdir + '; mkdir -p ' + locallogdir ) - +#os.system(' rm -fr ' + locallogdir + '; mkdir -p ' + locallogdir ) +flag_remove_logdir=False i=1 while i < len (sys.argv): arg=sys.argv[i] @@ -688,7 +739,9 @@ while i < len (sys.argv): debug = 2 elif arg == '-p' : prompt2 = sys.argv[i+1] - i = i +1 + i = i +1 + elif arg == '-r': + flag_remove_logdir=True elif arg == '-w' : pw = sys.argv[i+1] i = i +1 @@ -708,6 +761,7 @@ while i < len (sys.argv): print "-d: low debug level" print "-dd: high debug level" print "-p: set the prompt" + print "-r: Remove the log directory in autotests/" print "-w: set the password for ssh to localhost" print "-l: use local shell instead of ssh connection" print "-t: set the time out in second for commands" @@ -735,6 +789,12 @@ except KeyError: print "Please set the environment variable OPENAIR_TARGETS in the .bashrc" sys.exit(1) +if flag_remove_logdir == True: + print "Removing directory: " + locallogdir + os.system(' rm -fr ' + locallogdir + '; mkdir -p ' + locallogdir ) + + + paramiko_logfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/log/paramiko.log') res=os.system(' echo > ' + paramiko_logfile) paramiko.util.log_to_file(paramiko_logfile) @@ -767,7 +827,7 @@ GitOpenaircnRepoBranch = xmlRoot.findtext('GitOpenair-cnRepoBranch',default='') CleanUpOldProgs = xmlRoot.findtext('CleanUpOldProgs',default='') CleanUpAluLteBox = xmlRoot.findtext('CleanUpAluLteBox',default='') Timeout_execution = int (xmlRoot.findtext('Timeout_execution')) - +MachineListGeneric = xmlRoot.findtext('MachineListGeneric',default='') print "MachineList = " + MachineList print "GitOpenair-cnRepo = " + GitOpenaircnRepo print "GitOAI5GRepo = " + GitOAI5GRepo @@ -781,6 +841,7 @@ print "CleanUpOldProgs = " + CleanUpOldProgs print "Timeout_execution = " + str(Timeout_execution) MachineList = MachineList.split() +MachineListGeneric = MachineListGeneric.split() index=0 for machine in MachineList: @@ -909,7 +970,7 @@ for index in oai_list: #cmd = cmd + 'echo \' ' + cmd + '\' > ' + setup_script + ' 2>&1 \n ' #result = oai_list[index].send_recv(cmd, False, 300 ) write_file(setup_script, cmd, mode="w") - tempThread = oaiThread(index, 'thread_'+str(index), oai_list[index] , cmd, False, 300) + tempThread = oaiThread(index, 'thread_setup_'+str(index)+'_' + MachineList[index] , MachineList[index] , user, pw, cmd, False, 300) threads_init_setup.append(tempThread ) tempThread.start() @@ -944,12 +1005,13 @@ for index in oai_list: #print '\nCleaning Older running programs : ' + CleanUpOldProgs #cleanOldPrograms(oai_list[index], CleanUpOldProgs) - - except : - print 'There is error in one of the commands to setup the machine '+ MachineList[index] - sys.exit(1) - - + except Exception, e: + print 'There is error in one of the commands to setup the machine '+ MachineList[index] + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) #Now we wait for all the threads to complete index = 0 @@ -975,38 +1037,62 @@ for t in threads_init_setup: index = index+1 #Now we process all the test cases +#Now we check if there was error in setup files -threadListGeneric=[] +status, out = commands.getstatusoutput('grep ' + ' -il \'error\' ' + locallogdir + '/setup*') +if (out != '') : + print "There is error in setup of machines" + print "status = " + str(status) + "\n out = " + out + print sys.exit(1) + + +threadListGlobal=[] testcaseList=xmlRoot.findall('testCase') #print testcaseList for testcase in testcaseList: - testcasename = testcase.get('id') - testcaseclass = testcase.findtext('class',default='') - desc = testcase.findtext('desc',default='') - if search_test_case_group(testcasename, testcasegroup) == True: - if testcaseclass == 'lte-softmodem' : - eNBMachine = testcase.findtext('eNB',default='') - UEMachine = testcase.findtext('UE',default='') - EPCMachine = testcase.findtext('EPC',default='') - index_eNBMachine = MachineList.index(eNBMachine) - index_UEMachine = MachineList.index(UEMachine) - index_EPCMachine = MachineList.index(EPCMachine) - print "testcasename = " + testcasename + " class = " + testcaseclass - handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, oai_list, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, pw, CleanUpAluLteBox ) - elif (testcaseclass == 'compilation'): - handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, pw, CleanupAluLteBox,Timeout_execution) - elif (testcaseclass == 'execution'): - handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, pw, CleanupAluLteBox,Timeout_execution) - else : - print "Unknown test case class: " + testcaseclass - sys.exit() + try: + testcasename = testcase.get('id') + testcaseclass = testcase.findtext('class',default='') + desc = testcase.findtext('desc',default='') + #print "Machine list top level = " + ','.join(MachineList) + if search_test_case_group(testcasename, testcasegroup) == True: + if testcaseclass == 'lte-softmodem' : + eNBMachine = testcase.findtext('eNB',default='') + UEMachine = testcase.findtext('UE',default='') + EPCMachine = testcase.findtext('EPC',default='') + #index_eNBMachine = MachineList.index(eNBMachine) + #index_UEMachine = MachineList.index(UEMachine) + #index_EPCMachine = MachineList.index(EPCMachine) + if (eNBMachine not in MachineList)|(UEMachine not in MachineList)|(UEMachine not in MachineList): + print "One of the machines is not in the machine list" + print "eNBMachine : " + eNBMachine + "UEMachine : " + UEMachine + "EPCMachine : " + EPCMachine + "MachineList : " + ','.join(MachineList) + print "testcasename = " + testcasename + " class = " + testcaseclass + threadListGlobal = wait_testcaseclass_generic_threads(threadListGlobal, Timeout_execution) + handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, pw, CleanUpAluLteBox ) + elif (testcaseclass == 'compilation'): + threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, pw, CleanUpAluLteBox,Timeout_execution) + elif (testcaseclass == 'execution'): + threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, pw, CleanUpAluLteBox,Timeout_execution) + else : + print "Unknown test case class: " + testcaseclass + sys.exit() + + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n testcasename = ' + testcasename + '\n testcaseclass = ' + testcaseclass + '\n desc = ' + 'desc' + '\n' + error = error + traceback.format_exc() + print error + sys.exit(1) + print "Exiting the test cases execution now..." +for t in threadListGlobal: + t.join sys.exit() - #+ "class = "+ classx diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 2cd1438a8a..c6d0eecc41 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1,14 +1,15 @@ -amerique stevens calisson nano +stevens calisson mozart nano amerique /mnt/sradio/TEST_RESULTS https://gitlab.eurecom.fr/oai/openairinterface5g.git https://gitlab.eurecom.fr/oai/openair-cn.git feature-34-test_framework feature-17-test_framework - oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* hss hss_sim configure_cots_bandrich_ue* wvdial* + oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* hss hss_sim configure_cots_bandrich_ue* wvdial* run_exec_autotests* /opt/ltebox/tools/stop_ltebox 1800 + calisson stevens mozart nano amerique compilation Build oaisim.Rel8 From f1304ee26f22a5f249177644857a2fc795fa8313 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 4 Dec 2015 15:37:48 +0100 Subject: [PATCH 10/19] updated for completely putting UE in airplane mode --- cmake_targets/autotests/tools/configure_cots_bandrich_ue.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py index 2f959be55c..fced79f2ef 100755 --- a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py +++ b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py @@ -103,6 +103,7 @@ def start_ue () : #print 'Enter your commands below.\r\nInsert "exit" to leave the application.' timeout=60 #timeout in seconds send_command('AT', 'OK' , timeout) + send_command('AT+CFUN=1' , 'OK' , timeout) send_command('AT+CGATT=0' , 'OK' , timeout) send_command('AT+CGATT=1','OK', 300) #os.system('wvdial -C ' + bandrich_ppd_config + ' &' ) @@ -135,6 +136,7 @@ def stop_ue(): os.system('killall wvdial') send_command('AT', 'OK' , timeout) send_command('AT+CGATT=0' , 'OK' , timeout) + send_command('AT+CFUN=4' , 'OK' , timeout) for arg in sys.argv[1:]: if arg == '--start-ue' : From 3422a591a888a87b4771abd6ea3cb35f50b05700 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 4 Dec 2015 15:40:18 +0100 Subject: [PATCH 11/19] updated for additional packages for autotest framework --- cmake_targets/tools/build_helper | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index c82b79499c..a1fefec3ce 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -279,7 +279,8 @@ check_install_oai_software() { xmlstarlet \ python-pip \ pydb \ - wvdial + wvdial \ + python-numpy $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so if [ `lsb_release -rs` = '12.04' ] ; then install_nettle_from_source @@ -291,6 +292,8 @@ check_install_oai_software() { $SUDO pip install pyroute2 ) > $log_file 2>&1 install_asn1c_from_source + $SUDO rm -fr /opt/ssh + $SUDO git clone https://gist.github.com/2190472.git /opt/ssh } install_asn1c_from_source(){ From 008ccf04c774b9c548ba4a1b37ba363d7e145709 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 4 Dec 2015 15:48:57 +0100 Subject: [PATCH 12/19] updated autotest framework for lte-softmodem --- cmake_targets/autotests/README.txt | 27 ++- .../autotests/run_exec_lte-softmodem_tests.py | 222 +++++++++++------- cmake_targets/autotests/test_case_list.xml | 8 +- 3 files changed, 153 insertions(+), 104 deletions(-) diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt index 166db2990e..c3fccd9e6b 100644 --- a/cmake_targets/autotests/README.txt +++ b/cmake_targets/autotests/README.txt @@ -97,20 +97,29 @@ Obj.# Case# Test# Description 01 51 06 mbmssim (TBD) -01 55 lte-softmodem tests with ALU EPC w/ Bandrich COTS UE -01 55 00 FDD 5MHz UL Throughput for 60 sec -01 55 00 FDD 10MHz UL Throughput for 60 sec -01 55 00 FDD 20MHz UL Throughput for 60 sec -01 55 00 FDD 5MHz DL Throughput for 60 sec -01 55 00 FDD 10MHz DL Throughput for 60 sec -01 55 00 FDD 20MHz DL Throughput for 60 sec +01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 1TX/2RX, 2TX/1RX 2TX/2RX +01 55 00 Band 7 FDD 5MHz UL Throughput for 60 sec for 1TX/1RX +01 55 00 Band 7 FDD 10MHz UL Throughput for 60 sec +01 55 00 Band 7 FDD 20MHz UL Throughput for 60 sec +01 55 00 Band 7 FDD 5MHz DL Throughput for 60 sec +01 55 00 Band 7 FDD 10MHz DL Throughput for 60 sec +01 55 00 Band 7 FDD 20MHz DL Throughput for 60 sec -01 56 lte-softmodem tests with OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE +01 56 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE -01 57 lte-softmodem tests with OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE +01 57 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE +01 58 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 1TX/2RX, 2TX/1RX 2TX/2RX + +01 59 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE + +01 61 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE + +01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE +01 62 lte-softmodem tests with EXMIMO RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE +01 63 lte-softmodem tests with EXMIMO RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE 01 58 lte-softmodem-noS1 tests diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py index 3ae3758402..66953fda18 100644 --- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py +++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py @@ -49,6 +49,8 @@ import math #from time import clock import xml.etree.ElementTree as ET import re +import numpy as np + import log import case01 import case02 @@ -59,16 +61,100 @@ import case05 from openair import * import paramiko -import ssh -from ssh import SSHSession + import subprocess import commands +sys.path.append('/opt/ssh') + +import ssh +from ssh import SSHSession def write_file(filename, string, mode="w"): text_file = open(filename, mode) text_file.write(string) text_file.close() +#$1 name of file (assuming created with iperf -s -u .... +#$2 minimum throughput +#$3 maximum throughput +#$4 average throughput +#$5 minimum duration of throughput +#The throughput values found in file must be higher than values from from 2,3,4,5 +#The function returns True if throughput conditions are saisfied else it returns fails + +def tput_test(filename, min_tput, max_tput, average, min_duration): + if os.path.exists(filename): + with open (filename, "r") as myfile: + data=myfile.read() + p=re.compile('(\d*.\d*) Mbits/sec') + array=p.findall(data) + array = [ float(x) for x in array ] + duration = array.__len__() + if duration !=0: + min_list = min(array) + max_list = max(array) + average_list = np.mean(array) + else: + min_list = 0 + max_list = 0 + average_list=0 + + if (min_list >= min_tput and max_list >= max_tput and average_list >= average and duration >= min_duration): + return True + else: + return False + else: + return False + + +def try_convert_to_float(string, fail=None): + try: + return float(string) + except Exception: + return fail; + +def tput_test_search_expr (search_expr, logfile_traffic): + result=0 + if search_expr !='': + if search_expr.find('throughput_test')!= -1 : + p= re.compile('min\s*=\s*(\d*.\d*)\s*Mbits/sec') + min_tput=p.findall(search_expr) + if min_tput.__len__()==1: + min_tput = min_tput[0] + else: + min_tput = None + + p= re.compile('max\s*=\s*(\d*.\d*)\s*Mbits/sec') + max_tput=p.findall(search_expr) + if max_tput.__len__()==1: + max_tput = max_tput[0] + else: + max_tput = None + + p= re.compile('average\s*=\s*(\d*.\d*)\s*Mbits/sec') + avg_tput=p.findall(search_expr) + if avg_tput.__len__()==1: + avg_tput=avg_tput[0] + else: + avg_tput = None + + p= re.compile('duration\s*=\s*(\d*.\d*)\s*s') + duration=p.findall(search_expr) + if duration.__len__()==1: + duration = duration[0] + else: + duration = None + + min_tput = try_convert_to_float(min_tput) + max_tput = try_convert_to_float(max_tput) + avg_tput = try_convert_to_float(avg_tput) + duration = try_convert_to_float(duration) + + if (min_tput != None and max_tput != None and avg_tput != None and duration != None ): + result = tput_test(logfile_traffic, min_tput, max_tput, avg_tput, duration) + return result + + def sftp_module (username, password, hostname, ports, paramList,logfile): #localD = localfile @@ -365,13 +451,14 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , addpass = 'echo \'' + mypassword + '\' | ' user = getpass.getuser() testcasename = testcase.get('id') + testcaseclass = testcase.findtext('class',default='') timeout_cmd = testcase.findtext('TimeOut_cmd',default='') timeout_cmd = int(float(timeout_cmd)) #Timeout_thread is more than that of cmd to have room for compilation time, etc timeout_thread = timeout_cmd + 300 nruns = testcase.findtext('nruns',default='') nruns = int(float(nruns)) - + tags = testcase.findtext('tags',default='') eNBMachine = testcase.findtext('eNB',default='') eNB_config_file = testcase.findtext('eNB_config_file',default='') eNB_compile_prog = testcase.findtext('eNB_compile_prog',default='') @@ -383,6 +470,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , eNB_traffic_exec = testcase.findtext('eNB_traffic_exec',default='') eNB_traffic_exec_args = testcase.findtext('eNB_traffic_exec_args',default='') eNB_terminate_missing_procs = testcase.findtext('eNB_terminate_missing_procs',default='True') + eNB_search_expr_true = testcase.findtext('eNB_search_expr_true','') UEMachine = testcase.findtext('UE',default='') UE_config_file = testcase.findtext('UE_config_file',default='') @@ -395,6 +483,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , UE_traffic_exec = testcase.findtext('UE_traffic_exec',default='') UE_traffic_exec_args = testcase.findtext('UE_traffic_exec_args',default='') UE_terminate_missing_procs = testcase.findtext('UE_terminate_missing_procs',default='True') + UE_search_expr_true = testcase.findtext('UE_search_expr_true','') EPCMachine = testcase.findtext('EPC',default='') EPC_config_file = testcase.findtext('EPC_config_file',default='') @@ -412,6 +501,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , EPC_traffic_exec = testcase.findtext('EPC_traffic_exec',default='') EPC_traffic_exec_args = testcase.findtext('EPC_traffic_exec_args',default='') EPC_terminate_missing_procs = testcase.findtext('EPC_terminate_missing_procs',default='True') + EPC_search_expr_true = testcase.findtext('EPC_search_expr_true','') index_eNBMachine = MachineList.index(eNBMachine) index_UEMachine = MachineList.index(UEMachine) @@ -447,8 +537,12 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , #update_config_file(oai_eNB, eNB_config_file, logdirOAI5GRepo) #update_config_file(oai_UE, UE_config_file, logdirOAI5GRepo) #update_config_file(oai_EPC, EPC_config_file, logdirOpenaircnRepo) - + test_result=1 + test_result_string='' + start_time=time.time() for run in range(0,nruns): + run_result=1 + run_result_string='' logdir_eNB = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename + '/run_' + str(run) logdir_UE = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename + '/run_' + str(run) logdir_EPC = logdirOpenaircnRepo+'/TEST/autotests/log/'+ testcasename + '/run_' + str(run) @@ -587,105 +681,51 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox) cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox) - localfile = logdir_local_testcase + '/eNB_compile' + '_' + str(run) + '_.log' - remotefile = logdir_eNB + '/eNB_compile' + '_' + str(run) + '_.log' - sftp_log = os.path.expandvars(logdir_local_testcase + '/sftp_module.log') - ports = 22 - paramList = [] - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, eNBMachine, ports, localfile, remotefile, sftp_log, "get") + print "Copying files from EPCMachine : " + EPCMachine + ssh = SSHSession(EPCMachine , username=user, key_file=None, password=password) + ssh.get_all(logdir_EPC , logdir_local_testcase) - localfile = logdir_local_testcase + '/eNB_exec' + '_' + str(run) + '_.log' - remotefile = logdir_eNB + '/eNB_exec' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, eNBMachine, ports, localfile, remotefile, sftp_log, "get") + print "Copying files from eNBMachine " + eNBMachine + ssh = SSHSession(eNBMachine , username=user, key_file=None, password=password) + ssh.get_all(logdir_eNB, logdir_local_testcase) - localfile = logdir_local_testcase + '/eNB_pre_exec' + '_' + str(run) + '_.log' - remotefile = logdir_eNB + '/eNB_pre_exec' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, eNBMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/eNB_traffic' + '_' + str(run) + '_.log' - remotefile = logdir_eNB + '/eNB_traffic' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, eNBMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/eNB_task_out' + '_' + str(run) + '_.log' - remotefile = logdir_eNB + '/eNB_task_out' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - - localfile = logdir_local_testcase + '/test_case_list.xml' - remotefile = logdirOAI5GRepo+'/cmake_targets/autotests/test_case_list.xml' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - sftp_module (user, password, eNBMachine, ports, paramList, sftp_log) + print "Copying files from UEMachine : " + UEMachine + ssh = SSHSession(UEMachine , username=user, key_file=None, password=password) + ssh.get_all(logdir_UE , logdir_local_testcase) - paramList=[] - localfile = logdir_local_testcase + '/UE_compile' + '_' + str(run) + '_.log' - remotefile = logdir_UE + '/UE_compile' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, UEMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/UE_exec' + '_' + str(run) + '_.log' - remotefile = logdir_UE + '/UE_exec' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, UEMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/UE_pre_exec' + '_' + str(run) + '_.log' - remotefile = logdir_UE + '/UE_pre_exec' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, UEMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/UE_traffic' + '_' + str(run) + '_.log' - remotefile = logdir_UE + '/UE_traffic' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, UEMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/UE_task_out' + '_' + str(run) + '_.log' - remotefile = logdir_UE + '/UE_task_out' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - sftp_module (user, password, UEMachine, ports, paramList, sftp_log) + #Currently we only perform throughput tests + result = tput_test_search_expr(eNB_search_expr_true, logfile_traffic_eNB) + run_result=run_result&result + result = tput_test_search_expr(ePC_search_expr_true, logfile_traffic_ePC) + run_result=run_result&result + result = tput_test_search_expr(UE_search_expr_true, logfile_traffic_UE) + run_result=run_result&result - paramList=[] - localfile = logdir_local_testcase + '/EPC_compile' + '_' + str(run) + '_.log' - remotefile = logdir_EPC + '/EPC_compile' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, EPCMachine, ports, localfile, remotefile, sftp_log, "get") + if run_result == 1: + run_result_string = 'RUN_'+str(run) + ' = PASS' + else: + run_result_string = 'RUN_'+str(run) + ' = FAIL' - localfile = logdir_local_testcase + '/EPC_exec' + '_' + str(run) + '_.log' - remotefile = logdir_EPC + '/EPC_exec' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, EPCMachine, ports, localfile, remotefile, sftp_log, "get") + test_result=test_result & run_result + test_result_string=test_result_string + run_result_string - localfile = logdir_local_testcase + '/HSS_compile' + '_' + str(run) + '_.log' - remotefile = logdir_EPC + '/HSS_compile' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, EPCMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/HSS_exec' + '_' + str(run) + '_.log' - remotefile = logdir_EPC + '/HSS_exec' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, EPCMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/EPC_pre_exec' + '_' + str(run) + '_.log' - remotefile = logdir_EPC + '/EPC_pre_exec' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, EPCMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/EPC_traffic' + '_' + str(run) + '_.log' - remotefile = logdir_EPC + '/EPC_traffic' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - #sftp_module (user, password, EPCMachine, ports, localfile, remotefile, sftp_log, "get") - - localfile = logdir_local_testcase + '/EPC_task_out' + '_' + str(run) + '_.log' - remotefile = logdir_EPC + '/EPC_task_out' + '_' + str(run) + '_.log' - paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) - sftp_module (user, password, EPCMachine, ports, paramList, sftp_log) oai_eNB.disconnect() oai_UE.disconnect() oai_EPC.disconnect() #We need to close the new ssh session that was created #if index_eNBMachine == index_EPCMachine: # oai_EPC.disconnect() + #Now we finalize the xml file of the test case + end_time=time.time() + duration= end_time - start_time + xmlFile = logdir_local + '/cmake_targets/autotests/log/'+ testcasename + 'test.' + testcasename + '.xml' + if test_result ==0: + result='FAIL' + else: + result = 'PASS' + xml="" + write_file(xmlFile, xml, mode="w") + #This function searches if test case is present in list of test cases that need to be executed by user def search_test_case_group(testcasename, testcasegroup): diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index c6d0eecc41..ee11f25296 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -961,7 +961,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - ping 192.172.0.1 + iperf -u -c 192.172.0.1 -b 10Mbits/s -t 3000 @@ -984,12 +984,12 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - iperf -s + iperf -s -i 1 -u -f m - + throughput_test min=0.0Mbits/sec max=0.0Mbits/sec average=0.0Mbits/sec duration=0.0s True - + USRP.ALU_EPC.Bandrich.5MHz.FDD.UL 3 From 2ca52aaf7bf5a342845f8dbcb6b047a24dd2a227 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 4 Dec 2015 17:17:41 +0100 Subject: [PATCH 13/19] updated script for UE configuration --- .../autotests/run_exec_lte-softmodem_tests.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py index 66953fda18..bf5c398d15 100644 --- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py +++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py @@ -297,7 +297,7 @@ class oaiThread (threading.Thread): try: oai = openair('localdomain',self.machine) oai.connect(user, self.password) - print "Starting " + self.threadname + "on machine " + self.machine + print "Starting " + self.threadname + " on machine " + self.machine result = oai.send_recv(self.cmd, self.sudo, self.timeout) print "result = " + result print "Exiting " + self.threadname @@ -639,14 +639,14 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , task_EPC = task_EPC + '(' + HSS_compile_prog + ' ' + HSS_compile_prog_args + ' ) > ' + logfile_compile_HSS + ' 2>&1 \n' if EPC_pre_exec != "": task_EPC = task_EPC + ' ( ' + EPC_pre_exec + ' '+ EPC_pre_exec_args + ' ) > ' + logfile_pre_exec_EPC + ' 2>&1 \n' - if EPC_main_exec != "": - task_EPC = task_EPC + '(' + addsudo (EPC_main_exec + ' ' + EPC_main_exec_args, mypassword) + ' ) > ' + logfile_exec_EPC + ' 2>&1 & \n' - task_EPC = task_EPC + 'array_exec_pid+=($!) \n' - task_EPC = task_EPC + 'echo EPC_main_exec PID = $! \n' if HSS_main_exec != "": task_EPC = task_EPC + '(' + addsudo (HSS_main_exec + ' ' + HSS_main_exec_args, mypassword) + ' ) > ' + logfile_exec_HSS + ' 2>&1 & \n' task_EPC = task_EPC + 'array_exec_pid+=($!) \n' task_EPC = task_EPC + 'echo HSS_main_exec PID = $! \n' + if EPC_main_exec != "": + task_EPC = task_EPC + '(' + addsudo (EPC_main_exec + ' ' + EPC_main_exec_args, mypassword) + ' ) > ' + logfile_exec_EPC + ' 2>&1 & \n' + task_EPC = task_EPC + 'array_exec_pid+=($!) \n' + task_EPC = task_EPC + 'echo EPC_main_exec PID = $! \n' if EPC_traffic_exec != "": task_EPC = task_EPC + '(' + EPC_traffic_exec + ' ' + EPC_traffic_exec_args + ' ) > ' + logfile_traffic_EPC + ' 2>&1 & \n' task_EPC = task_EPC + 'array_exec_pid+=($!) \n' @@ -681,15 +681,15 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox) cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox) - print "Copying files from EPCMachine : " + EPCMachine + print "Copying files from EPCMachine : " + EPCMachine + "logdir_EPC = " + logdir_EPC ssh = SSHSession(EPCMachine , username=user, key_file=None, password=password) ssh.get_all(logdir_EPC , logdir_local_testcase) - print "Copying files from eNBMachine " + eNBMachine + print "Copying files from eNBMachine " + eNBMachine + "logdir_eNB = " + logdir_eNB ssh = SSHSession(eNBMachine , username=user, key_file=None, password=password) ssh.get_all(logdir_eNB, logdir_local_testcase) - print "Copying files from UEMachine : " + UEMachine + print "Copying files from UEMachine : " + UEMachine + "logdir_UE = " + logdir_UE ssh = SSHSession(UEMachine , username=user, key_file=None, password=password) ssh.get_all(logdir_UE , logdir_local_testcase) From 8438d5aa5aed1975ed50375e01eb904fe3682663 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 4 Dec 2015 18:24:40 +0100 Subject: [PATCH 14/19] update to UE config script --- cmake_targets/autotests/tools/configure_cots_bandrich_ue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py index fced79f2ef..cc5d4f706c 100755 --- a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py +++ b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py @@ -104,7 +104,7 @@ def start_ue () : timeout=60 #timeout in seconds send_command('AT', 'OK' , timeout) send_command('AT+CFUN=1' , 'OK' , timeout) - send_command('AT+CGATT=0' , 'OK' , timeout) + #send_command('AT+CGATT=0' , 'OK' , timeout) send_command('AT+CGATT=1','OK', 300) #os.system('wvdial -C ' + bandrich_ppd_config + ' &' ) @@ -135,7 +135,7 @@ def stop_ue(): timeout=60 os.system('killall wvdial') send_command('AT', 'OK' , timeout) - send_command('AT+CGATT=0' , 'OK' , timeout) + #send_command('AT+CGATT=0' , 'OK' , timeout) send_command('AT+CFUN=4' , 'OK' , timeout) for arg in sys.argv[1:]: From d1a7df866211650ccc1dee9d0da9908d31799c93 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 4 Dec 2015 19:55:26 +0100 Subject: [PATCH 15/19] update to the bandrich UE config --- cmake_targets/autotests/tools/configure_cots_bandrich_ue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py index cc5d4f706c..5800597644 100755 --- a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py +++ b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py @@ -135,7 +135,7 @@ def stop_ue(): timeout=60 os.system('killall wvdial') send_command('AT', 'OK' , timeout) - #send_command('AT+CGATT=0' , 'OK' , timeout) + send_command('AT+CGATT=0' , 'OK' , timeout) send_command('AT+CFUN=4' , 'OK' , timeout) for arg in sys.argv[1:]: From a9e65743eae4422fab72cb1116541403693f3689 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 4 Dec 2015 21:05:49 +0100 Subject: [PATCH 16/19] updated UE config script --- .../autotests/tools/configure_cots_bandrich_ue.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py index 5800597644..d117b524cd 100755 --- a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py +++ b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py @@ -15,6 +15,11 @@ import os #First we find an open port to work with serial_port='' ser=serial.Serial() +openair_dir = os.environ.get('OPENAIR_DIR') +if openair_dir == None: + print "Error getting OPENAIR_DIR environment variable" + sys.exit(1) + def find_open_port(): global serial_port, ser max_ports=100 @@ -33,7 +38,7 @@ find_open_port() print 'Using Serial port : ' + serial_port #serial_port = '/dev/ttyUSB2' -bandrich_ppd_config = '$OPENAIR_DIR/cmake_targets/autotests/tools/wdial.bandrich.conf' +bandrich_ppd_config = os.environ.get('OPENAIR_DIR') + '/cmake_targets/autotests/tools/wdial.bandrich.conf' exit_flag=0 @@ -122,6 +127,7 @@ def start_ue () : ip = IPRoute() idx = ip.link_lookup(ifname=iface)[0] os.system ('route add 192.172.0.1 ppp0') + os.system ('ping 192.172.0.1') break except Exception, e: error = ' Interface ' + iface + 'does not exist...' @@ -135,7 +141,7 @@ def stop_ue(): timeout=60 os.system('killall wvdial') send_command('AT', 'OK' , timeout) - send_command('AT+CGATT=0' , 'OK' , timeout) + #send_command('AT+CGATT=0' , 'OK' , timeout) send_command('AT+CFUN=4' , 'OK' , timeout) for arg in sys.argv[1:]: From d687b89d9d7dfc3b5e9add3872de08eb317be3ca Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 4 Dec 2015 21:19:27 +0100 Subject: [PATCH 17/19] update to the bandrich UE config --- cmake_targets/autotests/tools/configure_cots_bandrich_ue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py index d117b524cd..aa041360b7 100755 --- a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py +++ b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py @@ -141,7 +141,7 @@ def stop_ue(): timeout=60 os.system('killall wvdial') send_command('AT', 'OK' , timeout) - #send_command('AT+CGATT=0' , 'OK' , timeout) + send_command('AT+CGATT=0' , 'OK|ERROR' , timeout) send_command('AT+CFUN=4' , 'OK' , timeout) for arg in sys.argv[1:]: From 707e6798c34d40d9802d55bc5f5d7f2a72a92128 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sun, 6 Dec 2015 13:32:19 +0100 Subject: [PATCH 18/19] bugfixes to test framework --- cmake_targets/autotests/run_exec_autotests.bash | 6 +++--- cmake_targets/tools/test_helper | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash index 2eea43082d..a447ac3b93 100755 --- a/cmake_targets/autotests/run_exec_autotests.bash +++ b/cmake_targets/autotests/run_exec_autotests.bash @@ -153,8 +153,8 @@ function test_compile() { echo_success "$test_case_name.${tags} PASSED" xUnit_success "compilation" "$test_case_name.$tags" "PASS" "$result_string" "$xmlfile_testcase" else - echo_success "$test_case_name.${tags} FAILED" - xUnit_success "compilation" "$test_case_name.$tags" "FAIL" "$result_string" "$xmlfile_testcase" + echo_error "$test_case_name.${tags} FAILED" + xUnit_fail "compilation" "$test_case_name.$tags" "FAIL" "$result_string" "$xmlfile_testcase" fi } @@ -324,7 +324,7 @@ function test_compile_and_run() { if [ "$result_string" == "" ]; then echo_error "execution $test_case_name.$compile_prog.${tags_array[$tags_array_index]} Run_Result = \"$result_string\" Result = FAIL" - xUnit_success "execution" "$test_case_name.${tags_array[$tags_array_index]}" "FAIL" "$result_string" "$xmlfile_testcase" + xUnit_fail "execution" "$test_case_name.${tags_array[$tags_array_index]}" "FAIL" "$result_string" "$xmlfile_testcase" else if [ "$global_result" == "0" ]; then echo_error "execution $test_case_name.${tags_array[$tags_array_index]} Run_Result = \"$result_string\" Result = FAIL" diff --git a/cmake_targets/tools/test_helper b/cmake_targets/tools/test_helper index e60fb8c720..495c80f079 100644 --- a/cmake_targets/tools/test_helper +++ b/cmake_targets/tools/test_helper @@ -34,7 +34,7 @@ xUnit_fail() { xmlfile_testcase=$5 currtime=$(date +%s.%N) time=$(echo "$currtime - $XUNIT_START" | bc -l) - xml="" + xml="" echo -e $xml > $xmlfile_testcase XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml" XUNIT_FAILED=$((XUNIT_FAILED+1)) @@ -56,7 +56,7 @@ xUnit_success() { xmlfile_testcase=$5 currtime=$(date +%s.%N) time=$(echo "$currtime - $XUNIT_START" | bc -l) - xml="" + xml="" echo -e $xml > $xmlfile_testcase XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml" XUNIT_SUCCESS=$((XUNIT_SUCCESS+1)) From d7e31be9134b8c7e87fc0d4adef360bfe2a7e391 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sun, 6 Dec 2015 23:11:01 +0100 Subject: [PATCH 19/19] updates to autotest framework --- cmake_targets/autotests/README.txt | 6 +- .../autotests/run_exec_lte-softmodem_tests.py | 119 +++++++++++++----- cmake_targets/autotests/test_case_list.xml | 21 ++-- cmake_targets/tools/test_helper | 4 +- 4 files changed, 103 insertions(+), 47 deletions(-) diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt index c3fccd9e6b..8f6136c546 100644 --- a/cmake_targets/autotests/README.txt +++ b/cmake_targets/autotests/README.txt @@ -111,11 +111,11 @@ Obj.# Case# Test# Description 01 57 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE -01 58 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 1TX/2RX, 2TX/1RX 2TX/2RX +01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 1TX/2RX, 2TX/1RX 2TX/2RX -01 59 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE +01 59 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE -01 61 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE +01 61 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE 01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE 01 62 lte-softmodem tests with EXMIMO RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py index bf5c398d15..4bbe55e285 100644 --- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py +++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py @@ -233,10 +233,11 @@ def finalize_deploy_script (timeout_cmd, terminate_missing_procs='True'): sleep $wakeup_interval done echo "Final time step (Duration of test case) = $step " + date """ else: #We do not terminate the script if one of the processes has existed prematurely - cmd = cmd + 'sleep ' + str(timeout_cmd) + '\n' + cmd = cmd + 'sleep ' + str(timeout_cmd) + ' ; date \n' return cmd @@ -329,7 +330,7 @@ class testCaseThread_generic (threading.Thread): #addsudo = 'echo \'' + mypassword + '\' | sudo -S -E ' addpass = 'echo \'' + mypassword + '\' | ' user = getpass.getuser() - print "Starting test case : " + self.testcasename + " On machine " + self.machine + print "Starting test case : " + self.testcasename + " On machine " + self.machine + " timeout = " + str(self.timeout) oai = openair('localdomain',self.machine) oai.connect(user, self.password) cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox) @@ -349,7 +350,7 @@ class testCaseThread_generic (threading.Thread): os.system("mkdir -p " + logdir_local_testcase) cmd = "mkdir -p " + logdir_remote_testcase res = oai.send_recv(cmd, False, self.timeout) - print "res = " + res + #print "res = " + res cmd = "( cd " + self.logdirOAI5GRepo + " \n " cmd = cmd + "source oaienv \n" @@ -359,7 +360,7 @@ class testCaseThread_generic (threading.Thread): #print "cmd = " + cmd res = oai.send_recv(cmd, False, self.timeout) #print "res = " + res - print "ThreadID = " + str(self.threadID) + "ThreadName: " + self.name + " testcasename: " + self.testcasename + "Execution Result = " + res + #print "ThreadID = " + str(self.threadID) + "ThreadName: " + self.name + " testcasename: " + self.testcasename + "Execution Result = " + res write_file(logfile_task_testcasename, cmd, mode="w") #Now we copy all the remote files ssh = SSHSession(self.machine , username=user, key_file=None, password=self.password) @@ -385,8 +386,11 @@ def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramLis try: mypassword=password MachineListFree=[] + threadListNew=[] while MachineListFree.__len__() == 0 : MachineListBusy=[] + MachineListFree=[] + threadListNew=[] #first we need to find the list of free machines that we could run our test case if threadListGeneric.__len__() ==0 : #This means no thread is started yet @@ -398,25 +402,29 @@ def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramLis testcasenameold = param["testcasename"] thread_id.join(1) if thread_id.isAlive() == True: - print "thread_id is alive: testcasename: " + testcasenameold + threadListNew.append(param) + print "thread_id is alive: testcasename: " + testcasenameold + " on machine "+ machine if machine not in MachineListBusy: MachineListBusy.append(machine) else : - threadListGeneric.remove(param) + print "thread_id is finished: testcasename: " + testcasenameold + " on machine " + machine + #threadListGeneric.remove(param) + #if machine not in MachineListFree: + # MachineListFree.append(machine) #Now we check if there is at least one free machine MachineListFree = MachineList[:] for machine in MachineListBusy: if machine in MachineListFree: MachineListFree.remove(machine) - #print "MachineListFree = " + ','.join(MachineListFree) - #print "MachineListBusy = " + ','.join(MachineListBusy) - #print "MachineList = " + ','.join(MachineList) + print "MachineListFree = " + ','.join(MachineListFree) + print "MachineListBusy = " + ','.join(MachineListBusy) + print "MachineList = " + ','.join(MachineList) machine = MachineListFree[0] - thread = testCaseThread_generic(1,"Generic Thread_"+testcasename+"_"+machine+_, machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, password, timeout) + thread = testCaseThread_generic(1,"Generic Thread_"+testcasename+"_"+ "machine_", machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, password, timeout) param={"thread_id":thread, "Machine":machine, "testcasename":testcasename} thread.start() - threadListGeneric.append(param) - return threadListGeneric + threadListNew.append(param) + return threadListNew except Exception, e: error='' error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) @@ -561,14 +569,24 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , logfile_exec_eNB = logdir_eNB + '/eNB_exec' + '_' + str(run) + '_.log' logfile_pre_exec_eNB = logdir_eNB + '/eNB_pre_exec' + '_' + str(run) + '_.log' logfile_traffic_eNB = logdir_eNB + '/eNB_traffic' + '_' + str(run) + '_.log' + logfile_task_eNB_compile_out = logdir_eNB + '/eNB_task_compile_out' + '_' + str(run) + '_.log' + logfile_task_eNB_compile = logdir_local_testcase + '/eNB_task_compile' + '_' + str(run) + '_.log' logfile_task_eNB_out = logdir_eNB + '/eNB_task_out' + '_' + str(run) + '_.log' logfile_task_eNB = logdir_local_testcase + '/eNB_task' + '_' + str(run) + '_.log' - task_eNB = ' ( \n' - task_eNB = task_eNB + 'cd ' + logdirOAI5GRepo + ' ; source oaienv ; source cmake_targets/tools/build_helper \n' - task_eNB = task_eNB + 'env |grep OPENAIR \n' - task_eNB = task_eNB + update_config_file(oai_eNB, eNB_config_file, logdirOAI5GRepo, '$OPENAIR_DIR/cmake_targets/autotests/tools/search_repl.py') + '\n' + + task_eNB_compile = ' ( uname -a ; date \n' + task_eNB_compile = task_eNB_compile + 'cd ' + logdirOAI5GRepo + ' ; source oaienv ; source cmake_targets/tools/build_helper \n' + task_eNB_compile = task_eNB_compile + 'env |grep OPENAIR \n' + task_eNB_compile = task_eNB_compile + update_config_file(oai_eNB, eNB_config_file, logdirOAI5GRepo, '$OPENAIR_DIR/cmake_targets/autotests/tools/search_repl.py') + '\n' if eNB_compile_prog != "": - task_eNB = task_eNB + ' ( ' + eNB_compile_prog + ' '+ eNB_compile_prog_args + ' ) > ' + logfile_compile_eNB + ' 2>&1 \n' + task_eNB_compile = task_eNB_compile + ' ( ' + eNB_compile_prog + ' '+ eNB_compile_prog_args + ' ) > ' + logfile_compile_eNB + ' 2>&1 \n' + task_eNB_compile = task_eNB_compile + ' date ) > ' + logfile_task_eNB_compile_out + ' 2>&1 ' + write_file(logfile_task_eNB_compile, task_eNB_compile, mode="w") + + task_eNB = ' ( uname -a ; date \n' + task_eNB = task_eNB + 'cd ' + logdirOAI5GRepo + ' ; source oaienv ; source cmake_targets/tools/build_helper \n' + task_eNB = task_eNB + 'env |grep OPENAIR \n' + 'array_exec_pid=() \n' + if eNB_pre_exec != "": task_eNB = task_eNB + ' ( ' + eNB_pre_exec + ' '+ eNB_pre_exec_args + ' ) > ' + logfile_pre_exec_eNB + ' 2>&1 \n' if eNB_main_exec != "": @@ -593,15 +611,27 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , logfile_traffic_UE = logdir_UE + '/UE_traffic' + '_' + str(run) + '_.log' logfile_task_UE_out = logdir_UE + '/UE_task_out' + '_' + str(run) + '_.log' logfile_task_UE = logdir_local_testcase + '/UE_task' + '_' + str(run) + '_.log' - task_UE = ' ( \n' + logfile_task_UE_compile_out = logdir_UE + '/UE_task_compile_out' + '_' + str(run) + '_.log' + logfile_task_UE_compile = logdir_local_testcase + '/UE_task_compile' + '_' + str(run) + '_.log' + + task_UE_compile = ' ( uname -a ; date \n' + task_UE_compile = task_UE_compile + 'array_exec_pid=()' + '\n' + task_UE_compile = task_UE_compile + 'cd ' + logdirOAI5GRepo + '\n' + task_UE_compile = task_UE_compile + 'source oaienv \n' + task_UE_compile = task_UE_compile + 'source cmake_targets/tools/build_helper \n' + task_UE_compile = task_UE_compile + 'env |grep OPENAIR \n' + task_UE_compile = task_UE_compile + update_config_file(oai_UE, UE_config_file, logdirOAI5GRepo, '$OPENAIR_DIR/cmake_targets/autotests/tools/search_repl.py') + '\n' + if UE_compile_prog != "": + task_UE_compile = task_UE_compile + ' ( ' + UE_compile_prog + ' '+ UE_compile_prog_args + ' ) > ' + logfile_compile_UE + ' 2>&1 \n' + task_UE_compile = task_UE_compile + ' ) > ' + logfile_task_UE_compile_out + ' 2>&1 ' + write_file(logfile_task_UE_compile, task_UE_compile, mode="w") + + task_UE = ' ( uname -a ; date \n' task_UE = task_UE + 'array_exec_pid=()' + '\n' task_UE = task_UE + 'cd ' + logdirOAI5GRepo + '\n' task_UE = task_UE + 'source oaienv \n' task_UE = task_UE + 'source cmake_targets/tools/build_helper \n' task_UE = task_UE + 'env |grep OPENAIR \n' - task_UE = task_UE + update_config_file(oai_UE, UE_config_file, logdirOAI5GRepo, '$OPENAIR_DIR/cmake_targets/autotests/tools/search_repl.py') + '\n' - if UE_compile_prog != "": - task_UE = task_UE + ' ( ' + UE_compile_prog + ' '+ UE_compile_prog_args + ' ) > ' + logfile_compile_UE + ' 2>&1 \n' if UE_pre_exec != "": task_UE = task_UE + ' ( ' + UE_pre_exec + ' '+ UE_pre_exec_args + ' ) > ' + logfile_pre_exec_UE + ' 2>&1 \n' if UE_main_exec != "": @@ -628,15 +658,25 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , logfile_traffic_EPC = logdir_EPC + '/EPC_traffic' + '_' + str(run) + '_.log' logfile_task_EPC_out = logdir_EPC + '/EPC_task_out' + '_' + str(run) + '_.log' logfile_task_EPC = logdir_local_testcase + '/EPC_task' + '_' + str(run) + '_.log' - task_EPC = ' ( \n' + logfile_task_EPC_compile_out = logdir_EPC + '/EPC_task_compile_out' + '_' + str(run) + '_.log' + logfile_task_EPC_compile = logdir_local_testcase + '/EPC_task_compile' + '_' + str(run) + '_.log' + + task_EPC_compile = ' ( uname -a ; date \n' + task_EPC_compile = task_EPC_compile + 'array_exec_pid=()' + '\n' + task_EPC_compile = task_EPC_compile + 'cd ' + logdirOpenaircnRepo + '\n' + task_EPC_compile = task_EPC_compile + update_config_file(oai_EPC, EPC_config_file, logdirOpenaircnRepo, logdirOpenaircnRepo+'/TEST/autotests/tools/search_repl.py') + '\n' + task_EPC_compile = task_EPC_compile + 'source BUILD/TOOLS/build_helper \n' + if EPC_compile_prog != "": + task_EPC_compile = task_EPC_compile + '(' + EPC_compile_prog + ' ' + EPC_compile_prog_args + ' ) > ' + logfile_compile_EPC + ' 2>&1 \n' + if HSS_compile_prog != "": + task_EPC_compile = task_EPC_compile + '(' + HSS_compile_prog + ' ' + HSS_compile_prog_args + ' ) > ' + logfile_compile_HSS + ' 2>&1 \n' + task_EPC_compile = task_EPC_compile + ' ) > ' + logfile_task_EPC_compile_out + ' 2>&1 ' + write_file(logfile_task_EPC_compile, task_EPC_compile, mode="w") + + task_EPC = ' ( uname -a ; date \n' task_EPC = task_EPC + 'array_exec_pid=()' + '\n' task_EPC = task_EPC + 'cd ' + logdirOpenaircnRepo + '\n' - task_EPC = task_EPC + update_config_file(oai_EPC, EPC_config_file, logdirOpenaircnRepo, logdirOpenaircnRepo+'/TEST/autotests/tools/search_repl.py') + '\n' task_EPC = task_EPC + 'source BUILD/TOOLS/build_helper \n' - if EPC_compile_prog != "": - task_EPC = task_EPC + '(' + EPC_compile_prog + ' ' + EPC_compile_prog_args + ' ) > ' + logfile_compile_EPC + ' 2>&1 \n' - if HSS_compile_prog != "": - task_EPC = task_EPC + '(' + HSS_compile_prog + ' ' + HSS_compile_prog_args + ' ) > ' + logfile_compile_HSS + ' 2>&1 \n' if EPC_pre_exec != "": task_EPC = task_EPC + ' ( ' + EPC_pre_exec + ' '+ EPC_pre_exec_args + ' ) > ' + logfile_pre_exec_EPC + ' 2>&1 \n' if HSS_main_exec != "": @@ -658,6 +698,23 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , task_EPC = task_EPC + ' ) > ' + logfile_task_EPC_out + ' 2>&1 ' write_file(logfile_task_EPC, task_EPC, mode="w") + #first we compile all the programs + thread_EPC = oaiThread(1, "EPC_thread", EPCMachine, user, password , task_EPC_compile, False, timeout_thread) + thread_eNB = oaiThread(2, "eNB_thread", eNBMachine, user, password , task_eNB_compile, False, timeout_thread) + thread_UE = oaiThread(3, "UE_thread", UEMachine, user, password , task_UE_compile, False, timeout_thread) + threads=[] + threads.append(thread_eNB) + threads.append(thread_UE) + threads.append(thread_EPC) + # Start new Threads + thread_eNB.start() + thread_UE.start() + thread_EPC.start() + #Wait for all the compile threads to complete + for t in threads: + t.join() + + #Now we execute all the threads thread_EPC = oaiThread(1, "EPC_thread", EPCMachine, user, password , task_EPC, False, timeout_thread) thread_eNB = oaiThread(2, "eNB_thread", eNBMachine, user, password , task_eNB, False, timeout_thread) thread_UE = oaiThread(3, "UE_thread", UEMachine, user, password , task_UE, False, timeout_thread) @@ -683,20 +740,20 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , print "Copying files from EPCMachine : " + EPCMachine + "logdir_EPC = " + logdir_EPC ssh = SSHSession(EPCMachine , username=user, key_file=None, password=password) - ssh.get_all(logdir_EPC , logdir_local_testcase) + ssh.get_all(logdir_EPC , logdir_local + '/cmake_targets/autotests/log/'+ testcasename) print "Copying files from eNBMachine " + eNBMachine + "logdir_eNB = " + logdir_eNB ssh = SSHSession(eNBMachine , username=user, key_file=None, password=password) - ssh.get_all(logdir_eNB, logdir_local_testcase) + ssh.get_all(logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename) print "Copying files from UEMachine : " + UEMachine + "logdir_UE = " + logdir_UE ssh = SSHSession(UEMachine , username=user, key_file=None, password=password) - ssh.get_all(logdir_UE , logdir_local_testcase) + ssh.get_all(logdir_UE , logdir_local + '/cmake_targets/autotests/log/'+ testcasename) #Currently we only perform throughput tests result = tput_test_search_expr(eNB_search_expr_true, logfile_traffic_eNB) run_result=run_result&result - result = tput_test_search_expr(ePC_search_expr_true, logfile_traffic_ePC) + result = tput_test_search_expr(EPC_search_expr_true, logfile_traffic_EPC) run_result=run_result&result result = tput_test_search_expr(UE_search_expr_true, logfile_traffic_UE) run_result=run_result&result diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index ee11f25296..94dc3a35ff 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -211,7 +211,7 @@ $OPENAIR_DIR/cmake_targets/build_oai --eNB -w ETHERNET -r Rel10 - $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem @@ -280,7 +280,6 @@ $OPENAIR_DIR/cmake_targets/build_oai --RRH -w EXMIMO $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw - $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw $OPENAIR_DIR/cmake_targets/rrh_gw/build/CMakeFiles/openair_rf/openair_rf.ko $OPENAIR_DIR/cmake_targets/rrh_gw/build/updatefw $OPENAIR_DIR/cmake_targets/rrh_gw/build/oarf_config_exmimo.oct @@ -307,7 +306,7 @@ - RRH.USRP.Rel10 + RRH.BLADERF.Rel10 1 @@ -929,7 +928,7 @@ calisson stevens amerique - 60 + 180 /tmp targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\" @@ -937,15 +936,15 @@ targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 25 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" $OPENAIR_DIR/cmake_targets/build_oai - --eNB -w USRP + --eNB -w USRP -x -c $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf - iperf -s + @@ -956,12 +955,12 @@ targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"5\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"6\" $OPENAIR_DIR/cmake_targets/build_oai - --eNB -w USRP + --eNB -w USRP -x -c - $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + sleep 30 ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - iperf -u -c 192.172.0.1 -b 10Mbits/s -t 3000 + while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5; iperf -u -c 192.172.0.1 -b 10Mbits/s -t 3000 -B 192.172.0.2 @@ -984,7 +983,7 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - iperf -s -i 1 -u -f m + sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1 throughput_test min=0.0Mbits/sec max=0.0Mbits/sec average=0.0Mbits/sec duration=0.0s diff --git a/cmake_targets/tools/test_helper b/cmake_targets/tools/test_helper index 495c80f079..49a9910573 100644 --- a/cmake_targets/tools/test_helper +++ b/cmake_targets/tools/test_helper @@ -35,7 +35,7 @@ xUnit_fail() { currtime=$(date +%s.%N) time=$(echo "$currtime - $XUNIT_START" | bc -l) xml="" - echo -e $xml > $xmlfile_testcase + echo -e $xml >> $xmlfile_testcase XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml" XUNIT_FAILED=$((XUNIT_FAILED+1)) } @@ -57,7 +57,7 @@ xUnit_success() { currtime=$(date +%s.%N) time=$(echo "$currtime - $XUNIT_START" | bc -l) xml="" - echo -e $xml > $xmlfile_testcase + echo -e $xml >> $xmlfile_testcase XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml" XUNIT_SUCCESS=$((XUNIT_SUCCESS+1)) }