diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index ce37b0c8ba..7175be7c87 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -3110,11 +3110,15 @@ def GetParametersFromXML(action):
RAN.SeteNB_serverId(test.findtext('eNB_serverId'))
if (RAN.GeteNB_serverId() is None):
RAN.SeteNB_serverId('0')
- CiTestObj.air_interface = test.findtext('air_interface')
- if (CiTestObj.air_interface is None):
- CiTestObj.air_interface = 'lte'
- else:
- CiTestObj.air_interface = CiTestObj.air_interface.lower()
+
+ #local variable air_interface
+ air_interface = test.findtext('air_interface')
+ if (air_interface is None) or (air_interface.lower() not in ['nr','lte','ocp']):
+ CiTestObj.air_interface = 'lte-softmodem'
+ elif (air_interface.lower() in ['nr','lte']):
+ CiTestObj.air_interface = air_interface.lower() +'-softmodem'
+ else :
+ CiTestObj.air_interface = air_interface.lower() +'ocp-enb'
RAN.Setair_interface(CiTestObj.air_interface)
if action == 'Terminate_eNB':
@@ -3124,11 +3128,15 @@ def GetParametersFromXML(action):
RAN.SeteNB_serverId(test.findtext('eNB_serverId'))
if (RAN.GeteNB_serverId() is None):
RAN.SeteNB_serverId('0')
- CiTestObj.air_interface = test.findtext('air_interface')
- if (CiTestObj.air_interface is None):
- CiTestObj.air_interface = 'lte'
- else:
- CiTestObj.air_interface = CiTestObj.air_interface.lower()
+
+ #local variable air_interface
+ air_interface = test.findtext('air_interface')
+ if (air_interface is None) or (air_interface.lower() not in ['nr','lte','ocp']):
+ CiTestObj.air_interface = 'lte-softmodem'
+ elif (air_interface.lower() in ['nr','lte']):
+ CiTestObj.air_interface = air_interface.lower() +'-softmodem'
+ else :
+ CiTestObj.air_interface = air_interface.lower() +'ocp-enb'
RAN.Setair_interface(CiTestObj.air_interface)
if action == 'Attach_UE':
@@ -3158,11 +3166,16 @@ def GetParametersFromXML(action):
CiTestObj.UE_instance = test.findtext('UE_instance')
if (CiTestObj.UE_instance is None):
CiTestObj.UE_instance = '0'
- CiTestObj.air_interface = test.findtext('air_interface')
- if (CiTestObj.air_interface is None):
- CiTestObj.air_interface = 'lte'
- else:
- CiTestObj.air_interface = CiTestObj.air_interface.lower()
+
+ #local variable air_interface
+ air_interface = test.findtext('air_interface')
+ if (air_interface is None) or (air_interface.lower() not in ['nr','lte','ocp']):
+ CiTestObj.air_interface = 'lte-softmodem'
+ elif (air_interface.lower() in ['nr','lte']):
+ CiTestObj.air_interface = air_interface.lower() +'-softmodem'
+ else :
+ CiTestObj.air_interface = air_interface.lower() +'ocp-enb'
+ RAN.Setair_interface(CiTestObj.air_interface)
if action == 'Terminate_OAI_UE':
RAN.SeteNB_instance(test.findtext('UE_instance'))
diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py
index 5f05a2ae4f..93ba859903 100644
--- a/ci-scripts/ran.py
+++ b/ci-scripts/ran.py
@@ -77,7 +77,7 @@ class RANManagement():
self.backgroundBuildTestId = ['', '', '']
self.Build_eNB_forced_workspace_cleanup = False
self.Initialize_eNB_args = ''
- self.air_interface = 'lte'
+ self.air_interface = '' #changed from 'lte' to '' may lead to side effects in main
self.eNB_instance = ''
self.eNB_serverId = ''
self.eNBLogFiles = ['', '', '']
@@ -91,6 +91,8 @@ class RANManagement():
self.htmlObj = None
self.epcObj = None
+
+
#-----------------------------------------------------------
# Setters and Getters on Public members
#-----------------------------------------------------------
@@ -254,12 +256,18 @@ class RANManagement():
sys.exit('Insufficient Parameter')
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
- # Check if we build an 5G-NR gNB or an LTE eNB
- result = re.search('--gNB', self.Build_eNB_args)
+
+ # Check if we build an 5G-NR gNB or an LTE eNB or an OCP eNB
+ result = re.search('--eNBocp', self.Build_eNB_args)
if result is not None:
- self.air_interface = 'nr'
- else:
- self.air_interface = 'lte'
+ self.air_interface='ocp-enb'
+ else:
+ result = re.search('--gNB', self.Build_eNB_args)
+ if result is not None:
+ self.air_interface = 'nr-softmodem'
+ else:
+ self.air_interface = 'lte-softmodem'
+
# Worakround for some servers, we need to erase completely the workspace
if self.Build_eNB_forced_workspace_cleanup:
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -Rf ' + lSourcePath, '\$', 15)
@@ -379,20 +387,19 @@ class RANManagement():
def checkBuildeNB(self, lIpAddr, lUserName, lPassWord, lSourcePath, testcaseId):
if self.htmlObj is not None:
self.htmlObj.SettestCase_id(testcaseId)
+
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 3)
mySSH.command('ls ran_build/build', '\$', 3)
mySSH.command('ls ran_build/build', '\$', 3)
- if self.air_interface == 'nr':
- nodeB_prefix = 'g'
- else:
- nodeB_prefix = 'e'
- buildStatus = True
- result = re.search(self.air_interface + '-softmodem', mySSH.getBefore())
+
+ #check if we have the build corresponding to the air interface keywords (nr-softmode, lte-softmodem, ocp-enb)
+ result = re.search(self.air_interface, mySSH.getBefore())
if result is None:
- buildStatus = False
+ buildStatus = False #if not, build failed
else:
+ buildStatus = True
# Generating a BUILD INFO file
mySSH.command('echo "SRC_BRANCH: ' + self.ranBranch + '" > ../LAST_BUILD_INFO.txt', '\$', 2)
mySSH.command('echo "SRC_COMMIT: ' + self.ranCommitID + '" >> ../LAST_BUILD_INFO.txt', '\$', 2)
@@ -404,6 +411,8 @@ class RANManagement():
mySSH.command('echo "TGT_BRANCH: ' + self.ranTargetBranch + '" >> ../LAST_BUILD_INFO.txt', '\$', 2)
else:
mySSH.command('echo "MERGED_W_TGT_BRANCH: NO" >> ../LAST_BUILD_INFO.txt', '\$', 2)
+
+
mySSH.command('mkdir -p build_log_' + testcaseId, '\$', 5)
mySSH.command('mv log/* ' + 'build_log_' + testcaseId, '\$', 5)
mySSH.command('mv compile_oai_enb.log ' + 'build_log_' + testcaseId, '\$', 5)
@@ -426,12 +435,13 @@ class RANManagement():
else:
mySSH.close()
+ #generate logging info depending on buildStatus and air interface
if buildStatus:
- logging.info('\u001B[1m Building OAI ' + nodeB_prefix + 'NB Pass\u001B[0m')
+ logging.info('\u001B[1m Building OAI ' + self.air_interface + ' Pass\u001B[0m')
if self.htmlObj is not None:
- self.htmlObj.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
- else:
- logging.error('\u001B[1m Building OAI ' + nodeB_prefix + 'NB Failed\u001B[0m')
+ self.htmlObj.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
+ else
+ logging.error('\u001B[1m Building OAI ' + self.air_interface + ' Failed\u001B[0m')
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.Build_eNB_args, 'KO', CONST.ALL_PROCESSES_OK)
self.htmlObj.CreateHtmlTabFooter(False)
@@ -546,7 +556,7 @@ class RANManagement():
# Launch eNB with the modified config file
mySSH.command('source oaienv', '\$', 5)
mySSH.command('cd cmake_targets', '\$', 5)
- mySSH.command('echo "ulimit -c unlimited && ./ran_build/build/' + self.air_interface + '-softmodem -O ' + lSourcePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
+ mySSH.command('echo "ulimit -c unlimited && ./ran_build/build/' + self.air_interface + ' -O ' + lSourcePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
mySSH.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5)
mySSH.command('hostnamectl','\$', 5)
@@ -655,8 +665,8 @@ class RANManagement():
lPassWord = self.eNBPassword
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
- mySSH.command('stdbuf -o0 ps -aux | grep --color=never ' + self.air_interface + '-softmodem | grep -v grep', '\$', 5)
- result = re.search(self.air_interface + '-softmodem', mySSH.getBefore())
+ mySSH.command('stdbuf -o0 ps -aux | grep --color=never ' + self.air_interface + ' | grep -v grep', '\$', 5)
+ result = re.search(self.air_interface, mySSH.getBefore())
if result is None:
logging.debug('\u001B[1;37;41m eNB Process Not Found! \u001B[0m')
status_queue.put(CONST.ENB_PROCESS_FAILED)
@@ -688,20 +698,20 @@ class RANManagement():
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
- if self.air_interface == 'lte':
+ if (self.air_interface == 'lte-softmodem') or (self.air_interface == 'ocp-enb'):
nodeB_prefix = 'e'
else:
nodeB_prefix = 'g'
- mySSH.command('stdbuf -o0 ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5)
- result = re.search('-softmodem', mySSH.getBefore())
+ mySSH.command('stdbuf -o0 ps -aux | grep --color=never -e softmodem -e ocp-enb | grep -v grep', '\$', 5)
+ result = re.search('(-softmodem|ocp)', mySSH.getBefore())
if result is not None:
mySSH.command('echo ' + lPassWord + ' | sudo -S daemon --name=enb' + str(self.eNB_instance) + '_daemon --stop', '\$', 5)
- mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGINT -r .*-softmodem || true', '\$', 5)
+ mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGINT -r .*-softmodem .ocp-enb || true', '\$', 5)
time.sleep(10)
- mySSH.command('stdbuf -o0 ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5)
- result = re.search('-softmodem', mySSH.getBefore())
+ mySSH.command('stdbuf -o0 ps -aux | grep --color=never -e softmodem -e ocp-enb | grep -v grep', '\$', 5)
+ result = re.search('(-softmodem|ocp)', mySSH.getBefore())
if result is not None:
- mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL -r .*-softmodem || true', '\$', 5)
+ mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL -r .*-softmodem .ocp-enb || true', '\$', 5)
time.sleep(5)
mySSH.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
mySSH.close()
@@ -890,8 +900,7 @@ class RANManagement():
if result is not None:
rrcSetupComplete += 1
result = re.search('Generate LTE_RRCConnectionRelease|Generate RRCConnectionRelease', str(line))
- if result is not None:
- rrcReleaseRequest += 1
+ if result is not None: rrcReleaseRequest += 1
result = re.search('Generate LTE_RRCConnectionReconfiguration', str(line))
if result is not None:
rrcReconfigRequest += 1
@@ -940,11 +949,11 @@ class RANManagement():
mbmsRequestMsg += 1
enb_log_file.close()
logging.debug(' File analysis completed')
- if self.air_interface == 'lte':
+ if (self.air_interface == 'lte-softmodem') or (self.air_interface == 'ocp-enb'):
nodeB_prefix = 'e'
else:
nodeB_prefix = 'g'
- if self.air_interface == 'nr':
+ if self.air_interface == 'nr-softmodem':
if ulschReceiveOK > 0:
statMsg = nodeB_prefix + 'NB showed ' + str(ulschReceiveOK) + ' "ULSCH received ok" message(s)'
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
diff --git a/ci-scripts/xml_files/enb_ocp_usrp210_band7_test_05mhz_tm1.xml b/ci-scripts/xml_files/enb_ocp_usrp210_band7_test_05mhz_tm1.xml
new file mode 100644
index 0000000000..5326973cc2
--- /dev/null
+++ b/ci-scripts/xml_files/enb_ocp_usrp210_band7_test_05mhz_tm1.xml
@@ -0,0 +1,146 @@
+
+
+ test-05-tm1
+ Test-05MHz-TM1
+ tasks
+
+ 030201
+ 040101
+ 030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
+
+
+
+
+ Initialize_eNB
+ Initialize eNB (FDD/Band7/5MHz)
+ -O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf
+ ocp
+
+
+
+ Terminate_eNB
+ Terminate eNB
+ ocp
+
+
+
+ Initialize_UE
+ Initialize UE
+
+
+
+ Terminate_UE
+ Terminate UE
+
+
+
+ Attach_UE
+ Attach UE
+
+
+
+ Detach_UE
+ Detach UE
+
+
+
+ Ping
+ ping (5MHz - 20 sec)
+ -c 20
+ 5
+
+
+
+ Iperf
+ iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)
+ -u -b 15M -t 30 -i 1
+ 50
+ balanced
+
+
+
+ Iperf
+ iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)
+ -u -b 15M -t 30 -i 1
+ 50
+ single-ue
+
+
+
+ Iperf
+ iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)
+ -u -b 15M -t 30 -i 1
+ 50
+ unbalanced
+
+
+
+ Iperf
+ iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)
+ -t 30 -i 1 -fm
+ 50
+ single-ue
+
+
+
+ Iperf
+ iperf (5MHz - DL/TCP)(30 sec)(balanced profile)
+ -t 30 -i 1 -fm
+ 50
+ balanced
+
+
+
+ Iperf
+ iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)
+ -u -b 9M -t 30 -i 1 -R
+ 50
+ balanced
+
+
+
+ Iperf
+ iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)
+ -u -b 9M -t 30 -i 1 -R
+ 50
+ single-ue
+
+
+
+ Iperf
+ iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)
+ -t 30 -i 1 -fm -R
+ 50
+ single-ue
+
+
+
+ Iperf
+ iperf (5MHz - UL/TCP)(30 sec)(balanced profile)
+ -t 30 -i 1 -fm -R
+ 50
+ balanced
+
+
+
diff --git a/ci-scripts/xml_files/enb_ocp_usrp210_build.xml b/ci-scripts/xml_files/enb_ocp_usrp210_build.xml
new file mode 100644
index 0000000000..5729846818
--- /dev/null
+++ b/ci-scripts/xml_files/enb_ocp_usrp210_build.xml
@@ -0,0 +1,38 @@
+
+
+ build-tab
+ Build
+ wrench
+
+ 010101
+
+
+
+
+ Build_eNB
+ Build eNB OCP (USRP)
+ -I -w USRP -c --eNBocp --ninja
+
+
+
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index 91f33ea625..469c840b4d 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -96,7 +96,9 @@ Options
enable cmake debugging messages
--eNB
Makes the LTE softmodem
---gNB
+--eNBocp
+ Makes the OCP LTE softmodem
+-gNB
Makes the NR softmodem
--nrUE
Makes the NR UE softmodem
@@ -237,7 +239,11 @@ function main() {
eNB=1
echo_info "Will compile eNB"
shift;;
- --gNB)
+ --eNBocp)
+ eNBocp=1
+ echo_info "Will compile OCP eNB"
+ shift;;
+ --gNB)
gNB=1
NR="True"
echo_info "Will compile gNB"
@@ -443,7 +449,7 @@ function main() {
########################################################
# to be discussed
- if [ "$eNB" = "1" -o "$gNB" = "1" ] ; then
+ if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$gNB" = "1" ] ; then
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_info "No local radio head and no transport protocol selected"
fi
@@ -574,7 +580,7 @@ function main() {
config_libconfig_shlib=params_libconfig
# first generate the CMakefile in the right directory
- if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" ] ; then
+ if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" ] ; then
# softmodem compilation
@@ -606,6 +612,9 @@ function main() {
if [ "$eNB" = "1" ] ; then
execlist="$execlist lte-softmodem"
fi
+ if [ "$eNBocp" = "1" ] ; then
+ execlist="$execlist ocp-enb"
+ fi
if [ "$gNB" = "1" ] ; then
execlist="$execlist nr-softmodem"
fi