Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
openairinterface5G
Commits
7aefb248
Commit
7aefb248
authored
Mar 16, 2016
by
Rohit Gupta
Browse files
Merge branch 'develop' into feature-38-bladerf
parents
dded63e6
21e50bc8
Changes
164
Hide whitespace changes
Inline
Side-by-side
cmake_targets/CMakeLists.txt
View file @
7aefb248
...
...
@@ -42,6 +42,10 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
project
(
OpenAirInterface
)
add_subdirectory
(
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lms7002m lms7002m
)
add_subdirectory
(
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR lmsSDR
)
add_subdirectory
(
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/Si5351C Si5351C
)
###########################################
# macros to define options as there is numerous options in oai
################################################
...
...
@@ -159,7 +163,7 @@ set(CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
C_FLAGS_PROCESSOR
}
"
"
${
CMAKE_CXX_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-std=c++11
"
)
...
...
@@ -172,41 +176,65 @@ add_definitions(-DCMAKER)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS
}
-g -DMALLOC_CHECK_=3"
)
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS
}
-g -DMALLOC_CHECK_=3 -O2"
)
# Below has been put in comment because does not work with
# SVN authentication.
#
#find_package(Subversion)
#if(SUBVERSION_FOUND)
# Subversion_WC_INFO(${OPENAIR_DIR} openair)
# set (FIRMWARE_VERSION "${openair_WC_REVISION} - ${openair_WC_LAST_CHANGED_DATE}")
# Subversion_WC_LOG(${OPENAIR_DIR} Project)
#else()
# set (FIRMWARE_VERSION "No svn information")
#endif()
#add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
set
(
GIT_BRANCH
"UNKNOWN"
)
set
(
GIT_COMMIT_HASH
"UNKNOWN"
)
set
(
GIT_COMMIT_DATE
"UNKNOWN"
)
find_package
(
Git
)
if
(
GIT_FOUND
)
message
(
"git found:
${
GIT_EXECUTABLE
}
"
)
# Get the current working branch
execute_process
(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest abbreviated commit hash of the working branch
execute_process
(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest commit date of the working branch
execute_process
(
COMMAND git log -1 --format=%cd
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
OUTPUT_VARIABLE GIT_COMMIT_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif
()
# Below is a hard-coded info
set
(
FIRMWARE_VERSION
"No svn information"
)
add_definitions
(
"-DFIRMWARE_VERSION=
\"
${
FIRMWARE_VERSION
}
\"
"
)
add_definitions
(
"-DPACKAGE_VERSION=
\"
${
FIRMWARE_VERSION
}
\"
"
)
add_definitions
(
"-DPACKAGE_BUGREPORT=
\"
O
pen
A
ir
Interface web site
\"
"
)
add_definitions
(
"-DPACKAGE_VERSION=
\"
Branch:
${
GIT_BRANCH
}
Abrev. Hash:
${
GIT_COMMIT_HASH
}
Date:
${
GIT_COMMIT_DATE
}
\"
"
)
add_definitions
(
"-DPACKAGE_BUGREPORT=
\"
o
pen
a
ir
4g-devel@lists.eurecom.fr
\"
"
)
# Debug related options
#########################################
add_boolean_option
(
MSG_PRINT False
"print debug messages"
)
add_boolean_option
(
DISABLE_XER_PRINT False
"print XER Format"
)
add_boolean_option
(
XER_PRINT False
"print XER Format"
)
add_boolean_option
(
RRC_MSG_PRINT False
"print RRC messages"
)
add_boolean_option
(
PDCP_MSG_PRINT False
"print PDCP messages to /tmp/pdcp.log"
)
add_boolean_option
(
DEBUG_PDCP_PAYLOAD False
"print PDCP PDU to stdout"
)
# if true, make sure that global and PDCP log levels are trace
add_boolean_option
(
ASN_DEBUG False
"ASN1 coder/decoder Debug"
)
add_boolean_option
(
EMIT_ASN_DEBUG False
"ASN1 coder/decoder Debug"
)
add_boolean_option
(
MSG_PRINT False
"print debug messages"
)
add_boolean_option
(
DISABLE_XER_PRINT False
"print XER Format"
)
add_boolean_option
(
XER_PRINT False
"print XER Format"
)
add_boolean_option
(
RRC_MSG_PRINT False
"print RRC messages"
)
add_boolean_option
(
PDCP_MSG_PRINT False
"print PDCP messages to /tmp/pdcp.log"
)
add_boolean_option
(
DEBUG_PDCP_PAYLOAD False
"print PDCP PDU to stdout"
)
# if true, make sure that global and PDCP log levels are trace
add_boolean_option
(
DEBUG_MAC_INTERFACE False
"print MAC-RLC PDU exchange to stdout"
)
# if true, make sure that global and PDCP log levels are trace
add_boolean_option
(
TRACE_RLC_PAYLOAD False
"print RLC PDU to stdout"
)
# if true, make sure that global and PDCP log levels are trace
add_boolean_option
(
TEST_OMG False
"???"
)
add_boolean_option
(
DEBUG_OMG False
"???"
)
add_boolean_option
(
XFORMS False
"This adds the possibility to see the signal oscilloscope"
)
add_boolean_option
(
PRINT_STATS False
"This adds the possibility to see the status"
)
add_boolean_option
(
TRACE_RLC_PAYLOAD
False
"print RLC PDU to stdout"
)
# if true, make sure that global and PDCP log levels are trace
add_boolean_option
(
TEST_OMG
False
"???"
)
add_boolean_option
(
DEBUG_OMG
False
"???"
)
add_boolean_option
(
XFORMS
False
"This adds the possibility to see the signal oscilloscope"
)
add_boolean_option
(
PRINT_STATS
False
"This adds the possibility to see the status"
)
add_boolean_option
(
DEBUG_CONSOLE False
"makes debugging easier, disables stdout/stderr buffering"
)
...
...
@@ -317,6 +345,7 @@ set(S1AP_OAI_generated
${
S1AP_C_DIR
}
/s1ap_decoder.c
${
S1AP_C_DIR
}
/s1ap_encoder.c
${
S1AP_C_DIR
}
/s1ap_xer_print.c
${
S1AP_C_DIR
}
/s1ap_compare.c
${
S1AP_C_DIR
}
/s1ap_ies_defs.h
)
file
(
GLOB s1ap_h
${
S1AP_C_DIR
}
/*.h
)
...
...
@@ -412,7 +441,7 @@ add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4
add_list1_option
(
NB_ANTENNAS_TX
"2"
"Number of antennas in transmission"
"1"
"2"
"4"
)
add_list1_option
(
NB_ANTENNAS_TXRX
"2"
"Number of antennas in ????"
"1"
"2"
"4"
)
add_list2_option
(
RF_BOARD
"EXMIMO"
"RF head type"
"None"
"EXMIMO"
"OAI_USRP"
"OAI_BLADERF"
"CPRIGW"
)
add_list2_option
(
RF_BOARD
"EXMIMO"
"RF head type"
"None"
"EXMIMO"
"OAI_USRP"
"OAI_BLADERF"
"CPRIGW"
"OAI_LMSSDR"
)
add_list2_option
(
TRANSP_PRO
"None"
"Transport protocol type"
"None"
"ETHERNET"
)
...
...
@@ -443,6 +472,13 @@ set(HWLIB_BLADERF_SOURCE
)
add_library
(
oai_bladerfdevif MODULE
${
HWLIB_BLADERF_SOURCE
}
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/"
)
set
(
option_HWLMSSDRLIB_lib
"-l LMS_SDR -l LMS7002M -l Si5351C"
)
set
(
HWLIB_LMSSDR_SOURCE
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
)
add_library
(
oai_lmssdrdevif MODULE
${
HWLIB_LMSSDR_SOURCE
}
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/ETHERNET/USERSPACE/LIB/"
)
set
(
TPLIB_ETHERNET_SOURCE
${
OPENAIR_TARGETS
}
/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
...
...
@@ -451,6 +487,7 @@ set(TPLIB_ETHERNET_SOURCE
)
add_library
(
oai_eth_transpro MODULE
${
TPLIB_ETHERNET_SOURCE
}
)
# RF devices / transport protocols settings
######################################################################
if
(
${
RF_BOARD
}
STREQUAL
"EXMIMO"
)
...
...
@@ -478,9 +515,25 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
${
OPENAIR_TARGETS
}
/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
)
LINK_DIRECTORIES
(
"/usr/lib/x86_64-linux-gnu"
)
set
(
option_HW_lib
"bladeRF -rdynamic -ldl"
)
elseif
(
${
RF_BOARD
}
STREQUAL
"CPRIGW"
)
#to ask
#set(LOWLATENCY False)
elseif
(
${
RF_BOARD
}
STREQUAL
"OAI_LMSSDR"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lms7002m"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/Si5351C"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR/LMS_StreamBoard"
)
LINK_DIRECTORIES
(
"/usr/lib/x86_64-linux-gnu"
)
LINK_DIRECTORIES
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/lmsSDR"
)
LINK_DIRECTORIES
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/lms7002m"
)
LINK_DIRECTORIES
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/Si5351C"
)
set
(
HW_SOURCE
${
HW_SOURCE
}
${
OPENAIR_TARGETS
}
/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
)
set
(
LOWLATENCY False
)
set
(
option_HW_lib
"-lLMS_SDR -lLMS7002M -lSi5351C -rdynamic -ldl"
)
elseif
(
${
RF_BOARD
}
STREQUAL
"CPRIGW"
)
set
(
HW_SOURCE
${
HW_SOURCE
}
${
OPENAIR_TARGETS
}
/ARCH/CPRIGW/USERSPACE/LIB/cprigw_lib.c
)
...
...
@@ -1057,7 +1110,6 @@ add_library(CN_UTILS
${
OPENAIR3_DIR
}
/UTILS/conversions.c
${
OPENAIR3_DIR
}
/UTILS/enum_string.c
${
OPENAIR3_DIR
}
/UTILS/log.c
${
OPENAIR3_DIR
}
/UTILS/mme_config.c
${
OPENAIR3_DIR
}
/UTILS/mcc_mnc_itu.c
)
...
...
@@ -1398,6 +1450,9 @@ include(FindPkgConfig)
pkg_search_module
(
LIBXML2 libxml-2.0 REQUIRED
)
include_directories
(
${
LIBXML2_INCLUDE_DIRS
}
)
pkg_search_module
(
LIBXSLT libxslt REQUIRED
)
include_directories
(
${
LIBXSLT_INCLUDE_DIRS
}
)
pkg_search_module
(
OPENSSL openssl REQUIRED
)
include_directories
(
${
OPENSSL_INCLUDE_DIRS
}
)
...
...
@@ -1491,13 +1546,14 @@ add_executable(lte-softmodem
target_link_libraries
(
lte-softmodem
-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
)
target_link_libraries
(
lte-softmodem
${
LIBXML2_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem pthread m
${
CONFIG_LIBRARIES
}
rt crypt
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
sctp
${
option_HW_lib
}
${
option_TP_lib
}
${
XFORMS_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem
${
LIBBOOST_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem
${
LIB_LMS_LIBRARIES
}
)
# lte-softmodem-nos1 is both eNB and UE implementation
###################################################
...
...
@@ -1531,8 +1587,7 @@ target_link_libraries (lte-softmodem-nos1
target_link_libraries
(
lte-softmodem-nos1
${
LIBXML2_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem-nos1 pthread m
${
CONFIG_LIBRARIES
}
rt crypt
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
${
option_HW_lib
}
${
option_TP_lib
}
${
XFORMS_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem-nos1
${
LIBBOOST_LIBRARIES
}
)
target_link_libraries
(
lte-softmodem-nos1
${
LIB_LMS_LIBRARIES
}
)
# rrh
################################
...
...
@@ -1546,7 +1601,6 @@ add_executable(rrh_gw
${
HW_SOURCE
}
${
TRANSPORT_SOURCE
}
)
# assert
target_include_directories
(
rrh_gw PRIVATE
${
OPENAIR_DIR
}
/common/utils/itti
)
target_link_libraries
(
rrh_gw
-Wl,--start-group
...
...
@@ -1554,12 +1608,21 @@ target_link_libraries(rrh_gw
-Wl,--end-group
)
target_link_libraries
(
rrh_gw rt pthread m
)
target_link_libraries
(
rrh_gw
${
option_HW_lib
}
${
option_TP_lib
}
${
LIBBOOST_LIBRARIES
}
)
target_link_libraries
(
rrh_gw
${
LIB_LMS_LIBRARIES
}
)
Message
(
"-- option_HW_lib=
${
option_HW_lib
}
"
)
Message
(
"-- HW_SOURCE=
${
HW_SOURCE
}
"
)
Message
(
"-- option_TP_lib=
${
option_TP_lib
}
"
)
Message
(
"-- TRANSPORT_SOURCE=
${
TRANSPORT_SOURCE
}
"
)
if
(
${
RF_BOARD
}
STREQUAL
"OAI_LMSSDR"
)
add_dependencies
(
lte-softmodem LMS7002M LMS_SDR Si5351C
)
add_dependencies
(
lte-softmodem-nos1 LMS7002M LMS_SDR Si5351C
)
add_dependencies
(
rrh_gw LMS7002M LMS_SDR Si5351C
)
endif
(
${
RF_BOARD
}
STREQUAL
"OAI_LMSSDR"
)
# USIM process
#################
#add_executable(usim
...
...
@@ -1681,6 +1744,7 @@ endforeach(myExe)
add_executable
(
test_epc_generate_scenario
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/generate_scenario.c
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/generate_scenario.h
${
OPENAIR2_DIR
}
/ENB_APP/enb_config.h
${
OPENAIR2_DIR
}
/COMMON/commonDef.h
${
OPENAIR2_DIR
}
/COMMON/messages_def.h
...
...
@@ -1689,7 +1753,28 @@ add_executable(test_epc_generate_scenario
${
OPENAIR_BIN_DIR
}
/messages_xml.h
)
target_link_libraries
(
test_epc_generate_scenario
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS
${
MSC_LIB
}
L2 -Wl,--end-group pthread m rt crypt sctp
${
LIBXML2_LIBRARIES
}
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
${
CONFIG_LIBRARIES
}
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS
${
ITTI_LIB
}
${
MSC_LIB
}
L2 -Wl,--end-group pthread m rt crypt sctp
${
LIBXML2_LIBRARIES
}
${
LIBXSLT_LIBRARIES
}
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
${
CONFIG_LIBRARIES
}
)
add_executable
(
test_epc_play_scenario
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario.c
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario_decode.c
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario_display.c
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario_fsm.c
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario_parse.c
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario_s1ap.c
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario_s1ap_eNB_defs.h
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario_sctp.c
${
OPENAIR3_DIR
}
/TEST/EPC_TEST/play_scenario.h
${
OPENAIR2_DIR
}
/COMMON/commonDef.h
${
OPENAIR2_DIR
}
/COMMON/messages_def.h
${
OPENAIR2_DIR
}
/COMMON/messages_types.h
${
OPENAIR_BIN_DIR
}
/messages_xml.h
)
target_include_directories
(
test_epc_play_scenario PUBLIC /usr/local/share/asn1c
)
target_link_libraries
(
test_epc_play_scenario
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS
${
ITTI_LIB
}
${
MSC_LIB
}
-Wl,--end-group pthread m rt crypt sctp
${
LIBXML2_LIBRARIES
}
${
LIBXSLT_LIBRARIES
}
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
${
CONFIG_LIBRARIES
}
)
...
...
cmake_targets/autotests/README.txt
View file @
7aefb248
...
...
@@ -171,6 +171,41 @@ Obj.# Case# Test# Description
01 65 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 65 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 70 00 lte-softmodem tests with SoDeRa RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
01 70 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 70 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 70 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
01 70 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
01 70 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 70 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 75 00 lte-softmodem + RRH tests with B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
01 75 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 75 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 75 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
01 75 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
01 75 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 75 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 80 00 lte-softmodem + RRH tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
01 80 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 80 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 80 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
01 80 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
01 80 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 80 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 85 00 lte-softmodem + RRH tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
01 85 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 85 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 85 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
01 85 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
01 85 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 85 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 64 lte-softmodem-noS1 tests
02 Functional test case
...
...
cmake_targets/autotests/run_exec_autotests.bash
View file @
7aefb248
...
...
@@ -12,7 +12,7 @@ trap handle_ctrl_c INT
source
$OPENAIR_DIR
/cmake_targets/tools/test_helper
#
SUDO="sudo -E "
SUDO
=
"sudo -E
-S
"
tdir
=
$OPENAIR_DIR
/cmake_targets/autotests
rm
-fr
$tdir
/bin
mkdir
-p
$tdir
/bin
...
...
@@ -404,14 +404,12 @@ until [ -z "$1" ]
esac
done
if
[
"
$SET_PASSWORD
"
==
"1"
]
;
then
mypassword
=
$passwd
else
read
-s
-p
"Enter Password: "
mypassword
if
[
"
$SET_PASSWORD
"
!=
"1"
]
;
then
read
-s
-p
"Enter Password: "
passwd
fi
tmpfile
=
`
mktemp
`
echo
\'
$passwd
\'
|
$SUDO
echo
$HOME
>
&
$tmpfile
echo
$passwd
|
$SUDO
echo
$HOME
>
$tmpfile
tstsudo
=
`
cat
$tmpfile
`
if
[
"
$tstsudo
"
!=
"
$HOME
"
]
;
then
echo
"
$USER
might not have sudo privileges. Exiting"
...
...
@@ -509,7 +507,7 @@ for search_expr in "${test_case_array[@]}"
if
[
"
$class
"
==
"compilation"
]
;
then
test_compile
"
$name
"
"
$compile_prog
"
"
$compile_prog_args
"
"
$pre_exec
"
"
$pre_exec_args
"
"
$main_exec
"
"
$main_exec_args
"
"search_array_true[@]"
"
$search_expr_false
"
"
$nruns
"
"
$pre_compile_prog
"
"
$class
"
"
$compile_prog_out
"
"
$tags
"
elif
[
"
$class
"
==
"execution"
]
;
then
$SUDO
killall
-q
oaisim_nos1
echo
\'
passwd
\'
|
$SUDO
killall
-q
oaisim_nos1
test_compile_and_run
"
$name
"
"
$compile_prog
"
"
$compile_prog_args
"
"
$pre_exec
"
"
$pre_exec_args
"
"
$main_exec
"
"
$main_exec_args
"
"search_array_true[@]"
"
$search_expr_false
"
"
$nruns
"
"
$pre_compile_prog
"
"
$class
"
"
$compile_prog_out
"
"
$tags
"
"
$mypassword
"
"
$test_config_file
"
else
echo
"Unexpected class of test case...Skipping the test case
$name
...."
...
...
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
7aefb248
...
...
@@ -216,7 +216,7 @@ def sftp_module (username, password, hostname, ports, paramList,logfile):
# \brief bash script stub put at the end of scripts to terminate it
# \param timeout_cmd terminate script after timeout_cmd seconds
# \param terminate_missing_procs if True terminate all the processes launched by script if one of them terminates prematurely (due to error)
def
finalize_deploy_script
(
timeout_cmd
,
terminate_missing_procs
=
'
Tru
e'
):
def
finalize_deploy_script
(
timeout_cmd
,
terminate_missing_procs
=
'
Fals
e'
):
cmd
=
'declare -i timeout_cmd='
+
str
(
timeout_cmd
)
+
'
\n
'
if
terminate_missing_procs
==
'True'
:
cmd
=
cmd
+
"""
...
...
@@ -571,6 +571,17 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
nruns
=
nruns_lte_softmodem
nruns
=
int
(
float
(
nruns
))
tags
=
testcase
.
findtext
(
'tags'
,
default
=
''
)
RRHMachine
=
testcase
.
findtext
(
'RRH'
,
default
=
''
)
RRH_compile_prog
=
testcase
.
findtext
(
'RRH_compile_prog'
,
default
=
''
)
RRH_compile_prog_args
=
testcase
.
findtext
(
'RRH_compile_prog_args'
,
default
=
''
)
RRH_pre_exec
=
testcase
.
findtext
(
'RRH_pre_exec'
,
default
=
''
)
RRH_pre_exec_args
=
testcase
.
findtext
(
'RRH_pre_exec_args'
,
default
=
''
)
RRH_main_exec
=
testcase
.
findtext
(
'RRH_main_exec'
,
default
=
''
)
RRH_main_exec_args
=
testcase
.
findtext
(
'RRH_main_exec_args'
,
default
=
''
)
RRH_terminate_missing_procs
=
testcase
.
findtext
(
'RRH_terminate_missing_procs'
,
default
=
'True'
)
eNBMachine
=
testcase
.
findtext
(
'eNB'
,
default
=
''
)
eNB_config_file
=
testcase
.
findtext
(
'eNB_config_file'
,
default
=
''
)
eNB_compile_prog
=
testcase
.
findtext
(
'eNB_compile_prog'
,
default
=
''
)
...
...
@@ -635,13 +646,15 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
oai_EPC
=
openair
(
'localdomain'
,
EPCMachine
)
oai_EPC
.
connect
(
user
,
password
)
res
=
oai_eNB
.
send_recv
(
cmd
)
if
RRHMachine
!=
''
:
cmd
=
'cd '
+
logdirOAI5GRepo
+
'; source oaienv ; env|grep OPENAIR'
index_RRHMachine
=
MachineList
.
index
(
RRHMachine
)
oai_RRH
=
openair
(
'localdomain'
,
RRHMachine
)
oai_RRH
.
connect
(
user
,
password
)
res
=
oai_RRH
.
send_recv
(
cmd
)
#cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
#cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
#cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
logdir_eNB
=
logdirOAI5GRepo
+
'/cmake_targets/autotests/log/'
+
testcasename
logdir_UE
=
logdirOAI5GRepo
+
'/cmake_targets/autotests/log/'
+
testcasename
logdir_EPC
=
logdirOpenaircnRepo
+
'/TEST/autotests/log/'
+
testcasename
logdir_local
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
if
logdir_local
is
None
:
print
"Environment variable OPENAIR_DIR not set correctly"
...
...
@@ -667,10 +680,14 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
run_result
=
1
run_result_string
=
''
logdir_eNB
=
logdirOAI5GRepo
+
'/cmake_targets/autotests/log/'
+
testcasename
+
'/run_'
+
str
(
run
)
logdir_RRH
=
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
)
logdir_local_testcase
=
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
+
'/run_'
+
str
(
run
)
#Make the log directory of test case
if
RRHMachine
!=
''
:
cmd
=
'rm -fr '
+
logdir_RRH
+
' ; mkdir -p '
+
logdir_RRH
result
=
oai_RRH
.
send_recv
(
cmd
)
cmd
=
'rm -fr '
+
logdir_eNB
+
' ; mkdir -p '
+
logdir_eNB
result
=
oai_eNB
.
send_recv
(
cmd
)
cmd
=
'rm -fr '
+
logdir_UE
+
' ; mkdir -p '
+
logdir_UE
...
...
@@ -679,6 +696,39 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
result
=
oai_EPC
.
send_recv
(
cmd
)
cmd
=
' rm -fr '
+
logdir_local_testcase
+
' ; mkdir -p '
+
logdir_local_testcase
result
=
os
.
system
(
cmd
)
if
RRHMachine
!=
''
:
logfile_compile_RRH
=
logdir_RRH
+
'/RRH_compile'
+
'_'
+
str
(
run
)
+
'_.log'
logfile_exec_RRH
=
logdir_RRH
+
'/RRH_exec'
+
'_'
+
str
(
run
)
+
'_.log'
logfile_pre_exec_RRH
=
logdir_RRH
+
'/RRH_pre_exec'
+
'_'
+
str
(
run
)
+
'_.log'
logfile_task_RRH_compile_out
=
logdir_RRH
+
'/RRH_task_compile_out'
+
'_'
+
str
(
run
)
+
'_.log'
logfile_task_RRH_compile
=
logdir_local_testcase
+
'/RRH_task_compile'
+
'_'
+
str
(
run
)
+
'_.log'
logfile_task_RRH_out
=
logdir_RRH
+
'/RRH_task_out'
+
'_'
+
str
(
run
)
+
'_.log'
logfile_task_RRH
=
logdir_local_testcase
+
'/RRH_task'
+
'_'
+
str
(
run
)
+
'_.log'
task_RRH_compile
=
' ( uname -a ; date
\n
'
task_RRH_compile
=
task_RRH_compile
+
'cd '
+
logdirOAI5GRepo
+
' ; source oaienv ; source cmake_targets/tools/build_helper
\n
'
task_RRH_compile
=
task_RRH_compile
+
'env |grep OPENAIR
\n
'
if
RRH_compile_prog
!=
""
:
task_RRH_compile
=
task_RRH_compile
+
' ( '
+
RRH_compile_prog
+
' '
+
RRH_compile_prog_args
+
' ) > '
+
logfile_compile_RRH
+
' 2>&1
\n
'
task_RRH_compile
=
task_RRH_compile
+
' date ) > '
+
logfile_task_RRH_compile_out
+
' 2>&1 '
write_file
(
logfile_task_RRH_compile
,
task_RRH_compile
,
mode
=
"w"
)
task_RRH
=
' ( uname -a ; date
\n
'
task_RRH
=
task_RRH
+
' export OPENAIR_TESTDIR='
+
logdir_RRH
+
'
\n
'
task_RRH
=
task_RRH
+
'cd '
+
logdirOAI5GRepo
+
' ; source oaienv ; source cmake_targets/tools/build_helper
\n
'
task_RRH
=
task_RRH
+
'env |grep OPENAIR
\n
'
+
'array_exec_pid=()
\n
'
if
RRH_pre_exec
!=
""
:
task_RRH
=
task_RRH
+
' ( date; '
+
RRH_pre_exec
+
' '
+
RRH_pre_exec_args
+
' ) > '
+
logfile_pre_exec_RRH
+
' 2>&1
\n
'
if
RRH_main_exec
!=
""
:
task_RRH
=
task_RRH
+
' ( date; '
+
addsudo
(
RRH_main_exec
+
' '
+
RRH_main_exec_args
,
mypassword
)
+
' ) > '
+
logfile_exec_RRH
+
' 2>&1 &
\n
'
task_RRH
=
task_RRH
+
'array_exec_pid+=($!)
\n
'
task_RRH
=
task_RRH
+
'echo eNB_main_exec PID = $!
\n
'
#terminate the eNB test case after timeout_cmd seconds
task_RRH
=
task_RRH
+
finalize_deploy_script
(
timeout_cmd
,
RRH_terminate_missing_procs
)
+
'
\n
'
task_RRH
=
task_RRH
+
'handle_ctrl_c'
+
'
\n
'
task_RRH
=
task_RRH
+
' ) > '
+
logfile_task_RRH_out
+
' 2>&1 '
write_file
(
logfile_task_RRH
,
task_RRH
,
mode
=
"w"
)
logfile_compile_eNB
=
logdir_eNB
+
'/eNB_compile'
+
'_'
+
str
(
run
)
+
'_.log'
logfile_exec_eNB
=
logdir_eNB
+
'/eNB_exec'
+
'_'
+
str
(
run
)
+
'_.log'
...
...
@@ -704,6 +754,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
write_file
(
logfile_task_eNB_compile
,
task_eNB_compile
,
mode
=
"w"
)
task_eNB
=
' ( uname -a ; date
\n
'
task_eNB
=
task_eNB
+
' export OPENAIR_TESTDIR='
+
logdir_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
'
+
'array_exec_pid=()
\n
'
...
...
@@ -806,6 +857,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
write_file
(
logfile_task_EPC_compile
,
task_EPC_compile
,
mode
=
"w"
)
task_EPC
=
' ( uname -a ; date
\n
'
task_EPC
=
task_EPC
+
' export OPENAIRCN_TESTDIR='
+
logdir_EPC
+
'
\n
'
task_EPC
=
task_EPC
+
'array_exec_pid=()'
+
'
\n
'
task_EPC
=
task_EPC
+
'cd '
+
logdirOpenaircnRepo
+
'; source oaienv
\n
'
task_EPC
=
task_EPC
+
'source BUILD/TOOLS/build_helper
\n
'
...
...
@@ -837,14 +889,20 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
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
)
if
RRHMachine
!=
''
:
thread_RRH
=
oaiThread
(
4
,
"RRH_thread"
,
RRHMachine
,
user
,
password
,
task_RRH_compile
,
False
,
timeout_thread
)
threads
=
[]
threads
.
append
(
thread_eNB
)
threads
.
append
(
thread_UE
)
threads
.
append
(
thread_EPC
)
if
RRHMachine
!=
''
:
threads
.
append
(
thread_RRH
)
# Start new Threads
thread_eNB
.
start
()
thread_UE
.
start
()
thread_EPC
.
start
()
if
RRHMachine
!=
''
:
thread_RRH
.
start
()
#Wait for all the compile threads to complete
for
t
in
threads
:
t
.
join
()
...
...
@@ -853,26 +911,29 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
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
)
if
RRHMachine
!=
''
:
thread_RRH
=
oaiThread
(
4
,
"RRH_thread"
,
RRHMachine
,
user
,
password
,
task_RRH
,
False
,
timeout_thread
)
threads
=
[]
threads
.
append
(
thread_eNB
)
threads
.
append
(
thread_UE
)
threads
.
append
(
thread_EPC
)
if
RRHMachine
!=
''
:
threads
.
append
(
thread_RRH
)
# Start new Threads
thread_eNB
.
start
()
thread_UE
.
start
()
thread_EPC
.
start
()
if
RRHMachine
!=
''
:
thread_RRH
.
start
()
#Wait for all the compile threads to complete
for
t
in
threads
:
t
.
join
()
#Now we get the log files from remote machines on the local machine
cleanOldProgramsAllMachines
([
oai_eNB
,
oai_UE
,
oai_EPC
]
,
oldprogramList
,
CleanUpAluLteBox
,
ExmimoRfStop
)
#cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
#cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
#cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
if
RRHMachine
!=
''
:
cleanOldProgramsAllMachines
([
oai_eNB
,
oai_UE
,
oai_EPC
,
oai_RRH
]
,
oldprogramList
,
CleanUpAluLteBox
,
ExmimoRfStop
)
else
:
cleanOldProgramsAllMachines
([
oai_eNB
,
oai_UE
,
oai_EPC
]
,
oldprogramList
,
CleanUpAluLteBox
,
ExmimoRfStop
)
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'
...
...
@@ -900,22 +961,23 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
res
=
oai_EPC
.
send_recv
(
cmd
)
print
"Changing permissions of logdir <"
+
logdir_EPC
+
"> in EPC machine..."
+
res
if
RRHMachine
!=
''
:
cmd
=
'sudo -E chown -R '
+
user
+
' '
+
logdir_RRH
res
=
oai_RRH
.
send_recv
(
cmd
)
print
"Changing permissions of logdir <"
+
logdir_RRH
+
"> in RRH machine..."
+
res
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 + '/cmake_targets/autotests/log/'+ testcasename)
SSHSessionWrapper
(
EPCMachine
,
user
,
None
,
password
,
logdir_EPC
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
,
"get_all"
)
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 + '/cmake_targets/autotests/log/'+ testcasename)
SSHSessionWrapper
(
eNBMachine
,
user
,
None
,
password
,
logdir_eNB
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
,
"get_all"
)
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 + '/cmake_targets/autotests/log/'+ testcasename)
SSHSessionWrapper
(
UEMachine
,
user
,
None
,
password
,
logdir_UE
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
,
"get_all"
)
if
RRHMachine
!=
''
:
print
"Copying files from RRHMachine : "
+
RRHMachine
+
"logdir_RRH = "
+
logdir_RRH
SSHSessionWrapper
(
RRHMachine
,
user
,
None
,
password
,
logdir_RRH
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
,
"get_all"
)
#Currently we only perform throughput tests
...
...
@@ -1017,8 +1079,8 @@ class oaiCleanOldProgramThread (threading.Thread):
error
=
error
+
'
\n
threadID = '
+
str
(
self
.
threadID
)
+
'
\n
threadname = '
+
self
.
threadname
+
'
\n
CleanUpOldProgs = '
+
self
.
CleanUpOldProgs
+
'
\n
CleanUpAluLteBox = '
+
self
.
CleanUpAluLteBox
+
'
\n
ExmimoRfStop = '
+
self
.
ExmimoRfStop
+
'
\n
'
error
=
error
+
traceback
.
format_exc
()
print
error
print
"There is error in cleaning up old programs.
The test case execution cannot continue
...."
sys
.
exit
(
1
)
print
"There is error in cleaning up old programs....."
#
sys.exit(1)
# \brief Run parallel threads in all machines for clean up old execution of test cases
# \param oai_list list of handlers that can be used to execute programs on remote machines
...
...
@@ -1061,6 +1123,7 @@ flag_remove_logdir=False
flag_start_testcase
=
False
nruns_lte_softmodem
=
''
flag_skip_git_head_check
=
False
flag_skip_oai_install
=
False
Timeout_cmd
=
''
print
"Number of arguments argc = "
+
str
(
len
(
sys
.
argv
))
#for index in range(1,len(sys.argv) ):
...
...
@@ -1120,6 +1183,8 @@ while i < len (sys.argv):
elif
arg
==
'--timeout_cmd'
:
Timeout_cmd
=
sys
.
argv
[
i
+
1
]
i
=
i
+
1
elif
arg
==
'--skip-oai-install'
:
flag_skip_oai_install
=
True
elif
arg
==
'-h'
:
print
"-s: This flag *MUST* be set to start the test cases"
print
"-r: Remove the log directory in autotests"
...
...
@@ -1135,6 +1200,7 @@ while i < len (sys.argv):
print
"-MachineListGeneric : overrides the MachineListGeneric parameter in test_case_list.xml"
print
"--skip-git-head-check: skip checking of GitHead remote/local branch (only for debugging)"
print
"--timeout_cmd: Override the default parameter (timeout_cmd) in test_case_list.xml. This parameter is in seconds and should be > 120"
print
"--skip-oai-install: Skips the openairinterface5g installer"
sys
.
exit
()
else
:
print
"Unrecongnized Option: <"
+
arg
+
">. Use -h to see valid options"
...
...
@@ -1343,6 +1409,17 @@ for oai in oai_list: