Commit 02051f1c authored by knopp's avatar knopp

Merge branch 'develop' into enhancement-10-harmony

Conflicts:
	openair1/SCHED/phy_mac_stub.c
	openair1/SCHED/phy_procedures_lte_eNb.c
	targets/RT/USER/lte-softmodem.c
parents 56a8f49c da4e5fa7
...@@ -32,8 +32,6 @@ job1: ...@@ -32,8 +32,6 @@ job1:
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR
- cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml - cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml
- exce_log=`egrep -i 'warning|error|critical|exception' $NFS_TEST_RESULTS_DIR/log/python_autotest.log ` - exce_log=`egrep -i 'warning|error|critical|exception' $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log |cat `
- if [ -n "$exce_log" ]; then echo -e "\e[31mThere are errors in $NFS_TEST_RESULTS_DIR/log/python_autotest.log. Please check the logs\e[0m" ; fi - if [ -n "$exce_log" ]; then echo -e "\e[31mThere are errors in $NFS_TEST_RESULTS_DIR/log/python_autotest.log. Please check the logs\e[0m" ; fi
- exce_log=`egrep -i 'warning|error|critical|exception' $NFS_TEST_RESULTS_DIR/log/python_autotest_cleanup.log `
- if [ -n "$exce_log" ]; then echo -e "\e[31mThere are errors in $NFS_TEST_RESULTS_DIR/log/python_autotest_cleanup.log. Please check the logs\e[0m" ; fi
...@@ -1513,7 +1513,7 @@ if (${RF_BOARD} STREQUAL "OAI_USRP") ...@@ -1513,7 +1513,7 @@ if (${RF_BOARD} STREQUAL "OAI_USRP")
include_directories(${LIBBOOST_INCLUDE_DIR}) include_directories(${LIBBOOST_INCLUDE_DIR})
endif (${RF_BOARD} STREQUAL "OAI_USRP") endif (${RF_BOARD} STREQUAL "OAI_USRP")
pkg_search_module(OPENPGM openpgm-5.1) pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
if(NOT ${OPENPGM_FOUND}) if(NOT ${OPENPGM_FOUND})
message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built") message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
else() else()
...@@ -1619,7 +1619,7 @@ add_executable(lte-softmodem ...@@ -1619,7 +1619,7 @@ add_executable(lte-softmodem
${T_SOURCE} ${T_SOURCE}
) )
target_link_libraries (lte-softmodem target_link_libraries (lte-softmodem -ldl
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB} RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group ) -Wl,--end-group )
...@@ -1645,8 +1645,8 @@ add_executable(lte-softmodem-nos1 ...@@ -1645,8 +1645,8 @@ add_executable(lte-softmodem-nos1
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c ${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
#${OPENAIR2_DIR}/RRC/NAS/nas_config.c # enable if you want rrc to mount ip interface ${OPENAIR2_DIR}/RRC/NAS/nas_config.c
#${OPENAIR2_DIR}/RRC/NAS/rb_config.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${HW_SOURCE} ${HW_SOURCE}
${TRANSPORT_SOURCE} ${TRANSPORT_SOURCE}
...@@ -1928,6 +1928,11 @@ foreach( d ${DirDefs} ) ...@@ -1928,6 +1928,11 @@ foreach( d ${DirDefs} )
list(APPEND itti_compiler_options "-I${d}") list(APPEND itti_compiler_options "-I${d}")
endforeach() endforeach()
# castxml doesn't work with c11 (gcc 5 default)
# force castxml and clang compilation with gnu89 standard
# we can't use cXX standard as pthread_rwlock_t is gnu standard
list(APPEND itti_compiler_options "-std=gnu89")
set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h) set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h)
add_custom_command ( add_custom_command (
OUTPUT ${OPENAIR_BIN_DIR}/messages.xml OUTPUT ${OPENAIR_BIN_DIR}/messages.xml
......
...@@ -12,10 +12,12 @@ Obj.# Case# Test# Description ...@@ -12,10 +12,12 @@ Obj.# Case# Test# Description
01 01 11 Build lte-softmodem_noS1.EXMIMO.Rel10 01 01 11 Build lte-softmodem_noS1.EXMIMO.Rel10
01 01 12 Build lte-softmodem_noS1.BLADERF.Rel10 01 01 12 Build lte-softmodem_noS1.BLADERF.Rel10
01 01 13 Build lte-softmodem_noS1.ETHERNET.Rel10 01 01 13 Build lte-softmodem_noS1.ETHERNET.Rel10
01 01 14 Build lte-softmodem_noS1.LMSSDR.Rel10
01 01 20 Build lte-softmodem.USRP.Rel10 01 01 20 Build lte-softmodem.USRP.Rel10
01 01 21 Build lte-softmodem.EXMIMO.Rel10 01 01 21 Build lte-softmodem.EXMIMO.Rel10
01 01 22 Build lte-softmodem.BLADERF.Rel10 01 01 22 Build lte-softmodem.BLADERF.Rel10
01 01 23 Build lte-softmodem.ETHERNET.Rel10 01 01 23 Build lte-softmodem.ETHERNET.Rel10
01 01 24 Build lte-softmodem.LMSSDR.Rel10
01 01 30 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.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_encrypt_eia1.Rel10 secu_kenb.Rel10 aes128_ctr_encrypt.Rel10 aes128_ctr_decrypt.Rel10 secu_knas_encrypt_eea2.Rel10
...@@ -24,7 +26,7 @@ Obj.# Case# Test# Description ...@@ -24,7 +26,7 @@ Obj.# Case# Test# Description
01 01 40 Build RRH Gateway for USRP (Rel 10) 01 01 40 Build RRH Gateway for USRP (Rel 10)
01 01 41 Build RRH Gateway for EXMIMO (Rel 10) 01 01 41 Build RRH Gateway for EXMIMO (Rel 10)
01 01 42 Build RRH Gateway for BLADERF (Rel 10) 01 01 42 Build RRH Gateway for BLADERF (Rel 10)
01 01 43 Build RRH Gateway for LMSSDR (Rel 10)
01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation 01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation
...@@ -98,18 +100,24 @@ Obj.# Case# Test# Description ...@@ -98,18 +100,24 @@ Obj.# Case# Test# Description
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX, 2TX/2RX 01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX, 2TX/2RX
01 55 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 01 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX 01 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX 01 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX 01 55 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX 01 55 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX 01 55 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 06 Band 7 FDD 5MHz UL Throughput for 300 sec for 2TX/2RX 01 55 06 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 07 Band 7 FDD 10MHz UL Throughput for 300 sec for 2TX/2RX 01 55 07 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 08 Band 7 FDD 20MHz UL Throughput for 300 sec for 2TX/2RX 01 55 08 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 09 Band 7 FDD 5MHz DL Throughput for 300 sec for 2TX/2RX 01 55 09 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 10 Band 7 FDD 10MHz DL Throughput for 300 sec for 2TX/2RX 01 55 10 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 11 Band 7 FDD 20MHz DL Throughput for 300 sec for 2TX/2RX 01 55 11 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 12 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 13 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 14 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 15 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 16 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 17 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
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 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 56 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 01 56 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
...@@ -128,12 +136,19 @@ Obj.# Case# Test# Description ...@@ -128,12 +136,19 @@ Obj.# Case# Test# Description
01 57 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX 01 57 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX 01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX
01 58 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 01 58 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX 01 58 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX 01 58 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX 01 58 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX 01 58 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX 01 58 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 06 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 07 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 08 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
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 59 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
...@@ -206,19 +221,25 @@ Obj.# Case# Test# Description ...@@ -206,19 +221,25 @@ Obj.# Case# Test# Description
01 85 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX 01 85 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
02 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Sony Experia M4 COTS UE for TX/1RX 02 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Sony Experia M4 COTS UE for TX/1RX
02 55 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 02 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX 02 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX 02 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX 02 55 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX 02 55 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX 02 55 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 06 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 07 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 08 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 64 lte-softmodem-noS1 tests 01 64 lte-softmodem-noS1 tests
02 Functional test case 02 Functional test case
03 Non-Functional test case 03 Autotests specific to OAI UE
04 Failure test case 04 Failure test case
...@@ -228,6 +249,4 @@ Obj.# Case# Test# Description ...@@ -228,6 +249,4 @@ Obj.# Case# Test# Description
#TODO: Add test cases for 10,20 MHz #TODO: Add test cases for 10,20 MHz
#TODO: Add test cases for TDD/FDD #TODO: Add test cases for TDD/FDD
#TODO: Test and compile seperately for Rel8/Rel10 #TODO: Test and compile seperately for Rel8/Rel10
#TODO: Case03.py eMBMS test case #TODO: Case03.py eMBMS test case
\ No newline at end of file
...@@ -312,13 +312,13 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd ...@@ -312,13 +312,13 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd
# \parm programList list of programs that must be terminated before execution of any test case # \parm programList list of programs that must be terminated before execution of any test case
# \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box # \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box
# \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml) # \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml)
def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop): def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo):
cmd = 'killall -9 -q -r ' + programList cmd = 'killall -9 -q -r ' + programList
result = oai.send(cmd, True) result = oai.send(cmd, True)
print "Killing old programs..." + result print "Killing old programs..." + result
programArray = programList.split() programArray = programList.split()
programListJoin = '|'.join(programArray) programListJoin = '|'.join(programArray)
cmd = " ( date ;echo \"Starting cleaning old programs.. \" ; dmesg|tail ; echo \"Current disk space.. \" ; df -h )>& $HOME/.oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync" cmd = " ( date ;echo \"Starting cleaning old programs.. \" ; dmesg|tail ; echo \"Current disk space.. \" ; df -h )>& " + logdir + "/oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync"
result=oai.send_recv(cmd) result=oai.send_recv(cmd)
cmd = cleanupOldProgramsScript + ' ' + '\''+programListJoin+'\'' cmd = cleanupOldProgramsScript + ' ' + '\''+programListJoin+'\''
#result = oai.send_recv(cmd) #result = oai.send_recv(cmd)
...@@ -326,8 +326,14 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop): ...@@ -326,8 +326,14 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop):
result = oai.send_expect_false(cmd, 'Match found', False) result = oai.send_expect_false(cmd, 'Match found', False)
print "Looking for old programs..." + result print "Looking for old programs..." + result
res=oai.send_recv(CleanUpAluLteBox, True) res=oai.send_recv(CleanUpAluLteBox, True)
cmd = "( " + ExmimoRfStop + " ) >> $HOME/.oai_test_setup_cleanup.log.`hostname` ; sync " cmd= " echo \"Starting EXmimoRF Stop... \" >> " + logdir + "/oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync ";
oai.send_recv(cmd)
cmd = "( " + "cd " + logdirOAI5GRepo + " ; source oaienv ; " + ExmimoRfStop + " ) >> " + logdir + "/oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync "
print "cleanoldprograms cmd = " + cmd
res=oai.send_recv(cmd, False, timeout=600) res=oai.send_recv(cmd, False, timeout=600)
cmd= " echo \"Stopping EXmimoRF Stop... \" >> " + logdir + "/oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync ";
oai.send_recv(cmd)
#res = oai.send_recv(ExmimoRfStop, False) #res = oai.send_recv(ExmimoRfStop, False)
cmd = " ( date ;echo \"Finished cleaning old programs.. \" ; dmesg | tail)>> $HOME/.oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync" cmd = " ( date ;echo \"Finished cleaning old programs.. \" ; dmesg | tail)>> $HOME/.oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync"
res=oai.send_recv(cmd) res=oai.send_recv(cmd)
...@@ -775,7 +781,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , ...@@ -775,7 +781,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
task_eNB = task_eNB + 'array_exec_pid+=($!) \n' task_eNB = task_eNB + 'array_exec_pid+=($!) \n'
task_eNB = task_eNB + 'echo eNB_traffic_exec PID = $! \n' task_eNB = task_eNB + 'echo eNB_traffic_exec PID = $! \n'
task_eNB = task_eNB + ' (date; sudo rm -f ' + logfile_pcap_tmp_eNB + ' ; sudo -E tshark -i any -s 65535 -a duration:' + str(timeout_cmd-10)+ ' -w ' + logfile_pcap_tmp_eNB+ ' ; sudo -E chown ' + user + ' ' + logfile_pcap_tmp_eNB + ' ; zip -j -9 ' + logfile_pcap_zip_eNB + ' ' + logfile_pcap_tmp_eNB + ' ) > ' + logfile_tshark_eNB + ' 2>&1 & \n ' task_eNB = task_eNB + ' (date; sudo rm -f ' + logfile_pcap_tmp_eNB + ' ; sudo -E tshark -i lo -s 65535 -a duration:' + str(timeout_cmd-10)+ ' -w ' + logfile_pcap_tmp_eNB+ ' ; sudo -E chown ' + user + ' ' + logfile_pcap_tmp_eNB + ' ; zip -j -9 ' + logfile_pcap_zip_eNB + ' ' + logfile_pcap_tmp_eNB + ' ) > ' + logfile_tshark_eNB + ' 2>&1 & \n '
task_eNB = task_eNB + 'array_exec_pid+=($!) \n' task_eNB = task_eNB + 'array_exec_pid+=($!) \n'
task_eNB = task_eNB + 'echo eNB_tshark_exec PID = $! \n' task_eNB = task_eNB + 'echo eNB_tshark_exec PID = $! \n'
#terminate the eNB test case after timeout_cmd seconds #terminate the eNB test case after timeout_cmd seconds
...@@ -934,9 +940,9 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , ...@@ -934,9 +940,9 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
t.join() t.join()
#Now we get the log files from remote machines on the local machine #Now we get the log files from remote machines on the local machine
if RRHMachine != '': if RRHMachine != '':
cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC, oai_RRH] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop) cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC, oai_RRH] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop, [logdir_eNB, logdir_UE, logdir_EPC, logdir_RRH], logdirOAI5GRepo)
else: else:
cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop) cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop, [logdir_eNB, logdir_UE, logdir_EPC], logdirOAI5GRepo)
logfile_UE_stop_script_out = logdir_UE + '/UE_stop_script_out' + '_' + str(run) + '_.log' logfile_UE_stop_script_out = logdir_UE + '/UE_stop_script_out' + '_' + str(run) + '_.log'
logfile_UE_stop_script = logdir_local_testcase + '/UE_stop_script' + '_' + str(run) + '_.log' logfile_UE_stop_script = logdir_local_testcase + '/UE_stop_script' + '_' + str(run) + '_.log'
...@@ -999,7 +1005,21 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , ...@@ -999,7 +1005,21 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
run_result_string = ' RUN_'+str(run) + ' = PASS' run_result_string = ' RUN_'+str(run) + ' = PASS'
else: else:
run_result_string = ' RUN_'+str(run) + ' = FAIL' run_result_string = ' RUN_'+str(run) + ' = FAIL'
#If there is assertion, we mark the test case as failure as most likely eNB crashed
cmd = "grep -ilr \"assertion\" " + logdir_local_testcase + " | cat "
cmd_out = subprocess.check_output ([cmd], shell=True)
if len(cmd_out) !=0 :
run_result=0
run_result_string = ' RUN_'+str(run) + ' = FAIL(Assert)'
#If there is thread busy error, we mark the test case as failure as most likely eNB crashed
cmd = "grep -ilr \"thread busy\" " + logdir_local_testcase + " | cat "
cmd_out = subprocess.check_output ([cmd], shell=True)
if len(cmd_out) !=0:
run_result=0
run_result_string = ' RUN_'+str(run) + ' = FAIL(Thread_Busy)'
run_result_string = run_result_string + tput_run_string run_result_string = run_result_string + tput_run_string
test_result=test_result & run_result test_result=test_result & run_result
...@@ -1065,7 +1085,7 @@ def search_test_case_group(testcasename, testcasegroup, test_case_exclude): ...@@ -1065,7 +1085,7 @@ def search_test_case_group(testcasename, testcasegroup, test_case_exclude):
# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml) # \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml)
# \param ExmimoRfStop command to stop EXMIMO Card # \param ExmimoRfStop command to stop EXMIMO Card
class oaiCleanOldProgramThread (threading.Thread): class oaiCleanOldProgramThread (threading.Thread):
def __init__(self, threadID, threadname, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop): def __init__(self, threadID, threadname, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo):
threading.Thread.__init__(self) threading.Thread.__init__(self)
self.threadID = threadID self.threadID = threadID
self.threadname = threadname self.threadname = threadname
...@@ -1073,9 +1093,11 @@ class oaiCleanOldProgramThread (threading.Thread): ...@@ -1073,9 +1093,11 @@ class oaiCleanOldProgramThread (threading.Thread):
self.CleanUpOldProgs = CleanUpOldProgs self.CleanUpOldProgs = CleanUpOldProgs
self.CleanUpAluLteBox = CleanUpAluLteBox self.CleanUpAluLteBox = CleanUpAluLteBox
self.ExmimoRfStop = ExmimoRfStop self.ExmimoRfStop = ExmimoRfStop
self.logdir = logdir
self.logdirOAI5GRepo = logdirOAI5GRepo
def run(self): def run(self):
try: try:
cleanOldPrograms(self.oai, self.CleanUpOldProgs, self.CleanUpAluLteBox, self.ExmimoRfStop) cleanOldPrograms(self.oai, self.CleanUpOldProgs, self.CleanUpAluLteBox, self.ExmimoRfStop, self.logdir, self.logdirOAI5GRepo)
except Exception, e: except Exception, e:
error='' error=''
error = error + ' In class oaiCleanOldProgramThread, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) error = error + ' In class oaiCleanOldProgramThread, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
...@@ -1090,15 +1112,20 @@ class oaiCleanOldProgramThread (threading.Thread): ...@@ -1090,15 +1112,20 @@ class oaiCleanOldProgramThread (threading.Thread):
# \param CleanUpOldProgs list of programs which must be terminated before running a test case (specified in test_case_list.xml) # \param CleanUpOldProgs list of programs which must be terminated before running a test case (specified in test_case_list.xml)
# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml) # \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml)
# \param ExmimoRfStop command to stop EXMIMO Card # \param ExmimoRfStop command to stop EXMIMO Card
def cleanOldProgramsAllMachines(oai_list, CleanOldProgs, CleanUpAluLteBox, ExmimoRfStop): def cleanOldProgramsAllMachines(oai_list, CleanOldProgs, CleanUpAluLteBox, ExmimoRfStop, logdir_list, logdirOAI5GRepo):
threadId=0 threadId=0
threadList=[] threadList=[]
index=0
if len(oai_list)!=len(logdir_list) :
logdir_list=[logdir[0]]*len(oai_list)
for oai in oai_list: for oai in oai_list:
threadName="cleanup_thread_"+str(threadId) threadName="cleanup_thread_"+str(threadId)
thread=oaiCleanOldProgramThread(threadId, threadName, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) thread=oaiCleanOldProgramThread(threadId, threadName, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop, logdir_list[index],logdirOAI5GRepo)
threadList.append(thread) threadList.append(thread)
thread.start() thread.start()
threadId = threadId + 1 threadId = threadId + 1
index = index+1
for t in threadList: for t in threadList:
t.join() t.join()
...@@ -1360,7 +1387,7 @@ if localshell == 0: ...@@ -1360,7 +1387,7 @@ if localshell == 0:
print "Sudo permissions..." + result print "Sudo permissions..." + result
print '\nCleaning Older running programs : ' + CleanUpOldProgs print '\nCleaning Older running programs : ' + CleanUpOldProgs
cleanOldPrograms(oai_list[index], CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) cleanOldPrograms(oai_list[index], CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop, '$HOME', '/tmp')
#result = oai_list[index].send('mount ' + NFSResultsDir, True) #result = oai_list[index].send('mount ' + NFSResultsDir, True)
#print "Mounting NFS Share " + NFSResultsDir + "..." + result #print "Mounting NFS Share " + NFSResultsDir + "..." + result
...@@ -1489,7 +1516,7 @@ if (out != '') : ...@@ -1489,7 +1516,7 @@ if (out != '') :
print "Exiting now..." print "Exiting now..."
sys.exit(1) sys.exit(1)
cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop, '$HOME' , logdirOAI5GRepo)
if cleanUpRemoteMachines == True: if cleanUpRemoteMachines == True:
sys.exit(0) sys.exit(0)
......
This diff is collapsed.
...@@ -39,14 +39,26 @@ timeout=${args[0]} ...@@ -39,14 +39,26 @@ timeout=${args[0]}
iface=${args[1]} iface=${args[1]}
iperf_args=(${args[@]:2}) iperf_args=(${args[@]:2})
ip_client=`echo "$iperf_args" | sed -ne 's/.*\-c[ ]*\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/p'`
#array=${1:-1} #array=${1:-1}
echo "args = ${args[@]}" echo "args = ${args[@]}"
echo "timeout = $timeout" echo "timeout = $timeout"
echo "iface = $iface" echo "iface = $iface"
echo "iperf_args = ${iperf_args[@]}" echo "iperf_args = ${iperf_args[@]}"
echo "ip_client = $ip_client"
sleep $timeout sleep $timeout
echo " Waiting for IP Address..."
while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5 while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5
if [ -n "$ip_client" ]; then
echo "Waiting for route to be setup before iperf makes connection..."
var=`route -n | grep $ip_client`
if ["$var" != "" ] ; then break; fi
fi
sleep 5
iperf ${iperf_args[@]} iperf ${iperf_args[@]}
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
# brief OAI automated build tool that can be used to install, compile, run OAI. # brief OAI automated build tool that can be used to install, compile, run OAI.
# author Navid Nikaein, Lionel GAUTHIER, Laurent Thomas # author Navid Nikaein, Lionel GAUTHIER, Laurent Thomas
set -e
################################ ################################
# include helper functions # include helper functions
...@@ -59,6 +60,7 @@ RUN_GROUP=0 ...@@ -59,6 +60,7 @@ RUN_GROUP=0
TEST_CASE_GROUP="" TEST_CASE_GROUP=""
BUILD_DOXYGEN=0 BUILD_DOXYGEN=0
T_TRACER="False" T_TRACER="False"
DISABLE_HARDWARE_DEPENDENCY="False"
trap handle_ctrl_c INT trap handle_ctrl_c INT
function print_help() { function print_help() {
...@@ -131,6 +133,8 @@ Options ...@@ -131,6 +133,8 @@ Options
Disables CPU Affinity between UHD/TX/RX Threads (Valid only when deadline scheduler is disabled). By defaulT, CPU Affinity is enabled when not using deadline scheduler. It is enabled only with >2 CPUs. For eNB, CPU_0-> Device library (UHD), CPU_1->TX Threads, CPU_2...CPU_MAX->Rx Threads. For UE, CPU_0->Device Library(UHD), CPU_1..CPU_MAX -> All the UE threads Disables CPU Affinity between UHD/TX/RX Threads (Valid only when deadline scheduler is disabled). By defaulT, CPU Affinity is enabled when not using deadline scheduler. It is enabled only with >2 CPUs. For eNB, CPU_0-> Device library (UHD), CPU_1->TX Threads, CPU_2...CPU_MAX->Rx Threads. For UE, CPU_0->Device Library(UHD), CPU_1..CPU_MAX -> All the UE threads
--T-tracer --T-tracer
Enables the T tracer. Enables the T tracer.
--disable-hardware-dependency
Disable HW dependency during installation
Usage (first build): Usage (first build):
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files
...@@ -277,6 +281,10 @@ function main() { ...@@ -277,6 +281,10 @@ function main() {
T_TRACER="True" T_TRACER="True"
echo_info "Enabling the T tracer" echo_info "Enabling the T tracer"
shift 1;; shift 1;;
--disable-hardware-dependency)
echo_info "Disabling hardware dependency for compiling software"
DISABLE_HARDWARE_DEPENDENCY="True"
shift 1;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
...@@ -383,10 +391,16 @@ function main() { ...@@ -383,10 +391,16 @@ function main() {
if [ "$HW" == "OAI_USRP" ] ; then if [ "$HW" == "OAI_USRP" ] ; then
echo_info "installing packages for USRP support" echo_info "installing packages for USRP support"
check_install_usrp_uhd_driver check_install_usrp_uhd_driver
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
install_usrp_uhd_driver
fi
fi fi
if [ "$HW" == "OAI_BLADERF" ] ; then if [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BLADERF support" echo_info "installing packages for BLADERF support"
check_install_bladerf_driver check_install_bladerf_driver
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
flash_firmware_bladerf
fi
fi fi
fi fi
......
...@@ -67,7 +67,45 @@ echo_warning() { cecho "$*" $yellow ;} ...@@ -67,7 +67,45 @@ echo_warning() { cecho "$*" $yellow ;}
echo_success() { cecho "$*" $green ;} echo_success() { cecho "$*" $green ;}
echo_info() { cecho "$*" $blue ;} echo_info() { cecho "$*" $blue ;}
########################
# distribution helpers #
########################
# This function return a string to identify the distribution we are running
# If we can't check the distribution, it returns "Unknown"
# This function return always true as exit code by design
# Examples:
# Ubuntu16.04
# Debian8.5
get_distribution_release() {
local distributor
if distributor=$(lsb_release -si 2>/dev/null) ; then
echo $distributor$(lsb_release -sr)
else
echo Unknown
fi
}
check_supported_distribution() {
local distribution=$(get_distribution_release)
case "$distribution" in
"Ubuntu16.04") return 0 ;;
"Ubuntu14.04") return 0 ;;
esac
return 1
}
##################
# Error handlers #
##################
handler_EXIT() {
local exit_code=$?
[ "$exit_code" -eq 0 ] || echo_error "build have failed"
exit $exit_code
}
trap handler_EXIT EXIT
########################### ###########################
# Cleaners # Cleaners
...@@ -109,6 +147,7 @@ clean_all_files() { ...@@ -109,6 +147,7 @@ clean_all_files() {
compilations() { compilations() {
cd $OPENAIR_DIR/cmake_targets/$1/build cd $OPENAIR_DIR/cmake_targets/$1/build
set +e
{ {
rm -f $3 rm -f $3
if [ "$VERBOSE_COMPILE" == "1" ]; then if [ "$VERBOSE_COMPILE" == "1" ]; then
...@@ -118,12 +157,14 @@ compilations() { ...@@ -118,12 +157,14 @@ compilations() {
fi fi
} > $dlog/$2.$REL.txt 2>&1 } > $dlog/$2.$REL.txt 2>&1
set -e
echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt" echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt"
if [ -s $3 ] ; then if [ -s $3 ] ; then
cp $3 $4 cp $3 $4
echo_success "$2 compiled" echo_success "$2 compiled"
else else
echo_error "$2 compilation failed" echo_error "$2 compilation failed"
exit 1
fi fi
} }
...@@ -186,23 +227,36 @@ install_gnutls_from_source(){ ...@@ -186,23 +227,36 @@ install_gnutls_from_source(){
check_install_usrp_uhd_driver(){ check_install_usrp_uhd_driver(){
#first we remove old installation #first we remove old installation
$SUDO apt-get remove uhd libuhd-dev libuhd003 uhd-host -y $SUDO apt-get remove -y uhd || true
$SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y
v=$(lsb_release -cs) v=$(lsb_release -cs)
$SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
#The new USRP repository #The new USRP repository
$SUDO add-apt-repository ppa:ettusresearch/uhd -y $SUDO add-apt-repository ppa:ettusresearch/uhd -y
$SUDO apt-get update $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 python python-tk libboost-all-dev libusb-1.0-0-dev
$SUDO apt-get -y install libuhd-dev libuhd003 uhd-host $SUDO apt-get -y install libuhd-dev libuhd003
}
install_usrp_uhd_driver() {
# We move uhd-host apart because it depends on linux kernel version
# On newer kernels, it fails to install
$SUDO apt-get -y install uhd-host
$SUDO uhd_images_downloader $SUDO uhd_images_downloader
} }
check_install_bladerf_driver(){ check_install_bladerf_driver(){
$SUDO add-apt-repository -y ppa:bladerf/bladerf if [ "$(get_distribution_release)" == "Ubuntu14.04" ] ; then
$SUDO apt-get update $SUDO add-apt-repository -y ppa:bladerf/bladerf
$SUDO apt-get update
fi
$SUDO apt-get install -y bladerf libbladerf-dev $SUDO apt-get install -y bladerf libbladerf-dev
$SUDO apt-get install -y bladerf-firmware-fx3 $SUDO apt-get install -y bladerf-firmware-fx3
$SUDO apt-get install -y bladerf-fpga-hostedx40 $SUDO apt-get install -y bladerf-fpga-hostedx40
$SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img }
flash_firmware_bladerf() {
$SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
} }
check_install_additional_tools (){ check_install_additional_tools (){
...@@ -228,12 +282,15 @@ check_install_additional_tools (){ ...@@ -228,12 +282,15 @@ check_install_additional_tools (){
ctags \ ctags \
ntpdate \ ntpdate \
iperf3 \ iperf3 \
android-tools-adb android-tools-adb \
wvdial \
python-numpy \
sshpass
$SUDO pip install paramiko $SUDO pip install paramiko
$SUDO pip install pyroute2 $SUDO pip install pyroute2
$SUDO rm -fr /opt/ssh $SUDO rm -fr /opt/ssh
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh $SUDO GIT_SSL_NO_VERIFY=true git clone https://gist.github.com/2190472.git /opt/ssh
log_netiface=$OPENAIR_DIR/cmake_targets/log/netiface_install_log.txt log_netiface=$OPENAIR_DIR/cmake_targets/log/netiface_install_log.txt
echo_info "Installing Netinterfaces package. The logfile for installation is in $log_netiface" echo_info "Installing Netinterfaces package. The logfile for installation is in $log_netiface"
...@@ -248,8 +305,26 @@ check_install_additional_tools (){ ...@@ -248,8 +305,26 @@ check_install_additional_tools (){
} }