Commit e3a8e68e authored by Rohit Gupta's avatar Rohit Gupta

Merge branch 'feature-34-test_framework' into develop

parents ef498d78 d7e31be9
......@@ -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()
......
......@@ -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 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 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-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
......@@ -88,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 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 USRP B210 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE
01 56 lte-softmodem tests with OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
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 X310 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 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
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
......
This diff is collapsed.
#******************************************************************************
# 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' )
This diff is collapsed.
This diff is collapsed.
......@@ -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
......@@ -103,7 +108,8 @@ 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+CGATT=0' , '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 + ' &' )
......@@ -121,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...'
......@@ -134,7 +141,8 @@ 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:]:
if arg == '--start-ue' :
......
......@@ -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 \
......@@ -194,27 +210,32 @@ check_install_additional_tools (){
unzip \
valgrind \
vlan \
ctags
ctags \
ntpdate
) >& $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 +254,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 +276,11 @@ check_install_oai_software() {
openssl \
python \
subversion \
xmlstarlet \
python-pip \
pydb \
wvdial
xmlstarlet \
python-pip \
pydb \
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
......@@ -268,20 +290,27 @@ check_install_oai_software() {
fi
$SUDO pip install paramiko
$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(){
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
}
#################################################
......
......@@ -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="<testcase classname='$class' name='$test_case' run='$run_index' time='$time' RESULT='$result'></testcase>"
xml="<testcase classname='$class' name='$test_case' Run_result='$run_result' time='$time s' RESULT='$result'></testcase>"
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="<testcase classname='$class' name='$test_case' run='$run_index' time='$time' RESULT='$result'></testcase>"
xml="<testcase classname='$class' name='$test_case' Run_result='$run_result' time='$time s' RESULT='$result'></testcase>"
echo -e $xml >> $xmlfile_testcase
XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml"
XUNIT_SUCCESS=$((XUNIT_SUCCESS+1))
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment