Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
0bd70426
Commit
0bd70426
authored
Dec 17, 2015
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for stopping EXMIMO
parent
9fd7411f
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
126 additions
and
33 deletions
+126
-33
cmake_targets/autotests/README.txt
cmake_targets/autotests/README.txt
+1
-1
cmake_targets/autotests/core.py
cmake_targets/autotests/core.py
+2
-1
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+20
-18
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+14
-13
cmake_targets/autotests/tools/exmimo/exmimo_stop.m
cmake_targets/autotests/tools/exmimo/exmimo_stop.m
+4
-0
cmake_targets/autotests/tools/exmimo/init_exmimo2
cmake_targets/autotests/tools/exmimo/init_exmimo2
+85
-0
cmake_targets/autotests/tools/exmimo/oarf_config_exmimo.oct
cmake_targets/autotests/tools/exmimo/oarf_config_exmimo.oct
+0
-0
cmake_targets/autotests/tools/exmimo/oarf_get_frame.oct
cmake_targets/autotests/tools/exmimo/oarf_get_frame.oct
+0
-0
cmake_targets/autotests/tools/exmimo/oarf_get_num_detected_cards.oct
...ts/autotests/tools/exmimo/oarf_get_num_detected_cards.oct
+0
-0
cmake_targets/autotests/tools/exmimo/oarf_send_frame.oct
cmake_targets/autotests/tools/exmimo/oarf_send_frame.oct
+0
-0
cmake_targets/autotests/tools/exmimo/oarf_stop.oct
cmake_targets/autotests/tools/exmimo/oarf_stop.oct
+0
-0
cmake_targets/autotests/tools/exmimo/oarf_stop_without_reset.oct
...argets/autotests/tools/exmimo/oarf_stop_without_reset.oct
+0
-0
cmake_targets/autotests/tools/exmimo/openair_rf.ko
cmake_targets/autotests/tools/exmimo/openair_rf.ko
+0
-0
cmake_targets/autotests/tools/exmimo/updatefw
cmake_targets/autotests/tools/exmimo/updatefw
+0
-0
No files found.
cmake_targets/autotests/README.txt
View file @
0bd70426
...
...
@@ -139,7 +139,7 @@ Obj.# Case# Test# Description
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
01
64
lte-softmodem-noS1 tests
02 Functional test case
...
...
cmake_targets/autotests/core.py
View file @
0bd70426
...
...
@@ -181,7 +181,8 @@ class core:
rsp2
=
self
.
prompt2
self
.
wait_quiet
()
if
sudo
==
True
:
command
=
'echo
\'
'
+
self
.
password
+
'
\'
| sudo -S -E '
+
command
#command = 'echo \'' + self.password + '\' | sudo -S -E ' + command
command
=
'echo
\'
'
+
password
+
'
\'
| sudo -S -E bash -c
\'
'
+
cmd
+
'
\'
'
if
self
.
send_cr
:
log
.
stats
[
'cmd'
]
+=
1
self
.
oai
.
sendline
(
command
)
...
...
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
0bd70426
...
...
@@ -273,7 +273,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote_testc
#Function to clean old programs that might be running from earlier execution
#oai - parameter for making connection to machine
#programList - list of programs that must be terminated before execution of any test case
def
cleanOldPrograms
(
oai
,
programList
,
CleanUpAluLteBox
):
def
cleanOldPrograms
(
oai
,
programList
,
CleanUpAluLteBox
,
ExmimoRfStop
):
cmd
=
'killall -q -r '
+
programList
result
=
oai
.
send
(
cmd
,
True
)
print
"Killing old programs..."
+
result
...
...
@@ -285,7 +285,7 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox):
result
=
oai
.
send_expect_false
(
cmd
,
'Match found'
,
False
)
print
result
res
=
oai
.
send_recv
(
CleanUpAluLteBox
,
True
)
res
=
oai
.
send_recv
(
ExmimoRfStop
,
True
)
class
myThread
(
threading
.
Thread
):
def
__init__
(
self
,
threadID
,
name
,
counter
):
...
...
@@ -327,7 +327,7 @@ class oaiThread (threading.Thread):
#This class runs test cases with class execution, compilatation
class
testCaseThread_generic
(
threading
.
Thread
):
def
__init__
(
self
,
threadID
,
name
,
machine
,
logdirOAI5GRepo
,
testcasename
,
oldprogramList
,
CleanupAluLteBox
,
password
,
timeout
):
def
__init__
(
self
,
threadID
,
name
,
machine
,
logdirOAI5GRepo
,
testcasename
,
oldprogramList
,
CleanupAluLteBox
,
password
,
timeout
,
ExmimoRfStop
):
threading
.
Thread
.
__init__
(
self
)
self
.
threadID
=
threadID
self
.
name
=
name
...
...
@@ -338,6 +338,7 @@ class testCaseThread_generic (threading.Thread):
self
.
oldprogramList
=
oldprogramList
self
.
CleanupAluLteBox
=
CleanupAluLteBox
self
.
password
=
password
self
.
ExmimoRfStop
=
ExmimoRfStop
def
run
(
self
):
try
:
mypassword
=
''
...
...
@@ -347,7 +348,7 @@ class testCaseThread_generic (threading.Thread):
print
"Starting test case : "
+
self
.
testcasename
+
" On machine "
+
self
.
machine
+
" timeout = "
+
str
(
self
.
timeout
)
oai
=
openair
(
'localdomain'
,
self
.
machine
)
oai
.
connect
(
user
,
self
.
password
)
cleanOldPrograms
(
oai
,
self
.
oldprogramList
,
self
.
CleanupAluLteBox
)
cleanOldPrograms
(
oai
,
self
.
oldprogramList
,
self
.
CleanupAluLteBox
,
self
.
ExmimoRfStop
)
logdir_local
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
logdir_local_testcase
=
logdir_local
+
'/cmake_targets/autotests/log/'
+
self
.
testcasename
logdir_local_base
=
logdir_local
+
'/cmake_targets/autotests/log/'
...
...
@@ -381,7 +382,7 @@ class testCaseThread_generic (threading.Thread):
#ssh.get_all(logdir_remote_testcase , logdir_local_base)
SSHSessionWrapper
(
self
.
machine
,
user
,
None
,
self
.
password
,
logdir_remote_testcase
,
logdir_local_base
)
print
"Finishing test case : "
+
self
.
testcasename
+
" On machine "
+
self
.
machine
cleanOldPrograms
(
oai
,
self
.
oldprogramList
,
self
.
CleanupAluLteBox
)
cleanOldPrograms
(
oai
,
self
.
oldprogramList
,
self
.
CleanupAluLteBox
,
self
.
ExmimoRfStop
)
#oai.kill(user,mypassword)
oai
.
disconnect
()
except
Exception
,
e
:
...
...
@@ -400,7 +401,7 @@ def addsudo (cmd, password=""):
cmd
=
'echo
\'
'
+
password
+
'
\'
| sudo -S -E bash -c
\'
'
+
cmd
+
'
\'
'
return
cmd
def
handle_testcaseclass_generic
(
testcasename
,
threadListGeneric
,
oldprogramList
,
logdirOAI5GRepo
,
MachineList
,
password
,
CleanupAluLteBox
,
timeout
):
def
handle_testcaseclass_generic
(
testcasename
,
threadListGeneric
,
oldprogramList
,
logdirOAI5GRepo
,
MachineList
,
password
,
CleanupAluLteBox
,
timeout
,
ExmimoRfStop
):
try
:
mypassword
=
password
MachineListFree
=
[]
...
...
@@ -438,7 +439,7 @@ def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramLis
print
"MachineListBusy = "
+
','
.
join
(
MachineListBusy
)
print
"MachineList = "
+
','
.
join
(
MachineList
)
machine
=
MachineListFree
[
0
]
thread
=
testCaseThread_generic
(
1
,
"Generic Thread_"
+
testcasename
+
"_"
+
"machine_"
,
machine
,
logdirOAI5GRepo
,
testcasename
,
oldprogramList
,
CleanupAluLteBox
,
password
,
timeout
)
thread
=
testCaseThread_generic
(
1
,
"Generic Thread_"
+
testcasename
+
"_"
+
"machine_"
,
machine
,
logdirOAI5GRepo
,
testcasename
,
oldprogramList
,
CleanupAluLteBox
,
password
,
timeout
,
ExmimoRfStop
)
param
=
{
"thread_id"
:
thread
,
"Machine"
:
machine
,
"testcasename"
:
testcasename
}
thread
.
start
()
threadListNew
.
append
(
param
)
...
...
@@ -471,7 +472,7 @@ def wait_testcaseclass_generic_threads(threadListGeneric, timeout = 1):
return
threadListGenericNew
#Function to handle test case class : lte-softmodem
def
handle_testcaseclass_softmodem
(
testcase
,
oldprogramList
,
logdirOAI5GRepo
,
logdirOpenaircnRepo
,
MachineList
,
password
,
CleanUpAluLteBox
):
def
handle_testcaseclass_softmodem
(
testcase
,
oldprogramList
,
logdirOAI5GRepo
,
logdirOpenaircnRepo
,
MachineList
,
password
,
CleanUpAluLteBox
,
ExmimoRfStop
):
#We ignore the password sent to this function for secuirity reasons for password present in log files
#It is recommended to add a line in /etc/sudoers that looks something like below. The line below will run sudo without password prompt
# your_user_name ALL=(ALL:ALL) NOPASSWD: ALL
...
...
@@ -543,9 +544,9 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
oai_EPC
=
openair
(
'localdomain'
,
EPCMachine
)
oai_EPC
.
connect
(
user
,
password
)
cleanOldPrograms
(
oai_eNB
,
oldprogramList
,
CleanUpAluLteBox
)
cleanOldPrograms
(
oai_UE
,
oldprogramList
,
CleanUpAluLteBox
)
cleanOldPrograms
(
oai_EPC
,
oldprogramList
,
CleanUpAluLteBox
)
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
...
...
@@ -759,9 +760,9 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
t
.
join
()
#Now we get the log files from remote machines on the local machine
cleanOldPrograms
(
oai_eNB
,
oldprogramList
,
CleanUpAluLteBox
)
cleanOldPrograms
(
oai_UE
,
oldprogramList
,
CleanUpAluLteBox
)
cleanOldPrograms
(
oai_EPC
,
oldprogramList
,
CleanUpAluLteBox
)
cleanOldPrograms
(
oai_eNB
,
oldprogramList
,
CleanUpAluLteBox
,
ExmimoRfStop
)
cleanOldPrograms
(
oai_UE
,
oldprogramList
,
CleanUpAluLteBox
,
ExmimoRfStop
)
cleanOldPrograms
(
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'
...
...
@@ -992,6 +993,7 @@ CleanUpAluLteBox = xmlRoot.findtext('CleanUpAluLteBox',default='')
Timeout_execution
=
int
(
xmlRoot
.
findtext
(
'Timeout_execution'
))
MachineListGeneric
=
xmlRoot
.
findtext
(
'MachineListGeneric'
,
default
=
''
)
TestCaseExclusionList
=
xmlRoot
.
findtext
(
'TestCaseExclusionList'
,
default
=
''
)
ExmimoRfStop
=
xmlRoot
.
findtext
(
'ExmimoRfStop'
,
default
=
''
)
print
"MachineList = "
+
MachineList
print
"GitOpenair-cnRepo = "
+
GitOpenaircnRepo
print
"GitOAI5GRepo = "
+
GitOAI5GRepo
...
...
@@ -1056,7 +1058,7 @@ if localshell == 0:
print
"Sudo permissions..."
+
result
print
'
\n
Cleaning Older running programs : '
+
CleanUpOldProgs
cleanOldPrograms
(
oai_list
[
index
],
CleanUpOldProgs
,
CleanUpAluLteBox
)
cleanOldPrograms
(
oai_list
[
index
],
CleanUpOldProgs
,
CleanUpAluLteBox
,
ExmimoRfStop
)
result
=
oai_list
[
index
].
send
(
'mount '
+
NFSResultsDir
,
True
)
print
"Mounting NFS Share "
+
NFSResultsDir
+
"..."
+
result
...
...
@@ -1236,11 +1238,11 @@ for testcase in testcaseList:
print
"eNBMachine : "
+
eNBMachine
+
"UEMachine : "
+
UEMachine
+
"EPCMachine : "
+
EPCMachine
+
"MachineList : "
+
','
.
join
(
MachineList
)
print
"testcasename = "
+
testcasename
+
" class = "
+
testcaseclass
threadListGlobal
=
wait_testcaseclass_generic_threads
(
threadListGlobal
,
Timeout_execution
)
handle_testcaseclass_softmodem
(
testcase
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
logdirOpenaircnRepo
,
MachineList
,
pw
,
CleanUpAluLteBox
)
handle_testcaseclass_softmodem
(
testcase
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
logdirOpenaircnRepo
,
MachineList
,
pw
,
CleanUpAluLteBox
,
ExmimoRfStop
)
elif
(
testcaseclass
==
'compilation'
):
threadListGlobal
=
handle_testcaseclass_generic
(
testcasename
,
threadListGlobal
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
MachineListGeneric
,
pw
,
CleanUpAluLteBox
,
Timeout_execution
)
threadListGlobal
=
handle_testcaseclass_generic
(
testcasename
,
threadListGlobal
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
MachineListGeneric
,
pw
,
CleanUpAluLteBox
,
Timeout_execution
,
ExmimoRfStop
)
elif
(
testcaseclass
==
'execution'
):
threadListGlobal
=
handle_testcaseclass_generic
(
testcasename
,
threadListGlobal
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
MachineListGeneric
,
pw
,
CleanUpAluLteBox
,
Timeout_execution
)
threadListGlobal
=
handle_testcaseclass_generic
(
testcasename
,
threadListGlobal
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
MachineListGeneric
,
pw
,
CleanUpAluLteBox
,
ExmimoRfStop
)
else
:
print
"Unknown test case class: "
+
testcaseclass
sys
.
exit
()
...
...
cmake_targets/autotests/test_case_list.xml
View file @
0bd70426
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/tools/exmimo/exmimo_stop.m
0 → 100644
View file @
0bd70426
n=oarf_get_num_detected_cards;
for i=n-1:0
oarf_stop(i);
end
cmake_targets/autotests/tools/exmimo/init_exmimo2
0 → 100755
View file @
0bd70426
#!/bin/bash
################################################################################
# OpenAirInterface
# Copyright(c) 1999 - 2015 Eurecom
#
# OpenAirInterface is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#
# OpenAirInterface is distributed in the hope that 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 OpenAirInterface.The full GNU General Public License is
# included in this distribution in the file called "COPYING". If not,
# see <http://www.gnu.org/licenses/>.
#
# Contact Information
# OpenAirInterface Admin: openair_admin@eurecom.fr
# OpenAirInterface Tech : openair_tech@eurecom.fr
# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
#
# Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
#
################################################################################
# file init_nas_nos1
# brief loads the nasmesh module and sets up the radio bearers (used to provide ip interface without S1 interface)
# author Florian Kaltenberger
#
#######################################
load_module
()
{
mod_name
=
${
1
##*/
}
mod_name
=
${
mod_name
%.*
}
if
awk
"/
$mod_name
/ {found=1 ;exit} END {if (found!=1) exit 1}"
/proc/modules
then
echo
"module
$mod_name
already loaded: I remove it first"
sudo
rmmod
$mod_name
fi
echo
loading
$mod_name
sudo
insmod
$1
}
function
main
()
{
PCI
=
`
lspci
-m
|
grep
Xilinx
`
if
[
-z
"
$PCI
"
]
;
then
echo
"No card found. Stopping!"
return
fi
## This part corrects the wrong configuration of the endpoint done by the bios in some machines
echo
"
$PCI
"
|
while
read
config_reg
;
do
SLOT_NUMBER
=
`
echo
$config_reg
|
awk
-F
\"
'{print $1}'
`
sudo
setpci
-s
$SLOT_NUMBER
60.b
=
10
done
load_module
$OPENAIR_DIR
/targets/bin/openair_rf.ko
sleep
1
if
[
!
-e
/dev/openair0
]
;
then
sudo mknod
/dev/openair0 c 127 0
sudo chmod
a+rw /dev/openair0
fi
DEVICE
=
`
echo
$PCI
|
awk
-F
\"
'{print $(NF-1)}'
|
awk
'{print $2}'
`
DEVICE_SWID
=
${
DEVICE
:2:2
}
if
[
$DEVICE_SWID
==
'0a'
]
;
then
echo
"Using firware version 10"
$OPENAIR_DIR
/targets/bin/updatefw
-s
0x43fffff0
-b
-f
$OPENAIR_TARGETS
/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10
else
echo
'No corresponding firmware found'
return
fi
}
main
"
$@
"
cmake_targets/autotests/tools/exmimo/oarf_config_exmimo.oct
0 → 100755
View file @
0bd70426
File added
cmake_targets/autotests/tools/exmimo/oarf_get_frame.oct
0 → 100755
View file @
0bd70426
File added
cmake_targets/autotests/tools/exmimo/oarf_get_num_detected_cards.oct
0 → 100755
View file @
0bd70426
File added
cmake_targets/autotests/tools/exmimo/oarf_send_frame.oct
0 → 100755
View file @
0bd70426
File added
cmake_targets/autotests/tools/exmimo/oarf_stop.oct
0 → 100755
View file @
0bd70426
File added
cmake_targets/autotests/tools/exmimo/oarf_stop_without_reset.oct
0 → 100755
View file @
0bd70426
File added
cmake_targets/autotests/tools/exmimo/openair_rf.ko
0 → 100644
View file @
0bd70426
File added
cmake_targets/autotests/tools/exmimo/updatefw
0 → 100755
View file @
0bd70426
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment