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
wangjie
OpenXG-RAN
Commits
80fe53c2
Commit
80fe53c2
authored
Feb 17, 2016
by
kaltenbe
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin' into bugfix-48-L1L2signaling
parents
59f6146a
5c9b40e1
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
677 additions
and
116 deletions
+677
-116
.gitlab-ci.yml
.gitlab-ci.yml
+3
-1
cmake_targets/autotests/README.txt
cmake_targets/autotests/README.txt
+8
-0
cmake_targets/autotests/run_exec_autotests.bash
cmake_targets/autotests/run_exec_autotests.bash
+21
-8
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+13
-10
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+541
-68
cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
+7
-26
cmake_targets/autotests/tools/lib_autotest.py
cmake_targets/autotests/tools/lib_autotest.py
+33
-0
cmake_targets/autotests/tools/search_repl.py
cmake_targets/autotests/tools/search_repl.py
+4
-2
cmake_targets/tools/start_bladerf.py
cmake_targets/tools/start_bladerf.py
+46
-0
openair1/PHY/LTE_TRANSPORT/pucch.c
openair1/PHY/LTE_TRANSPORT/pucch.c
+1
-1
No files found.
.gitlab-ci.yml
View file @
80fe53c2
...
...
@@ -20,9 +20,11 @@ job1:
-
EXTERNAL_SHARE_RESULTS_DIR=$EXTERNAL_SHARE_DIR/$git_branch/$git_head
-
echo $NFS_TEST_RESULTS_DIR
-
echo $EXTERNAL_SHARE_RESULTS_DIR
-
echo $NRUNS_LTE_SOFTMODEM
-
echo $TIMEOUT_CMD
-
mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
-
python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS $OAI_EXTRA_ARGS -g "$OAI_TEST_CASE_GROUP">& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log
-
python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP" >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
-
python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP"
--nrun_lte_softmodem $NRUNS_LTE_SOFTMODEM --timeout_cmd $TIMEOUT_CMD
>& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
-
mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log
-
mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest_cleanup.log
-
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
...
...
cmake_targets/autotests/README.txt
View file @
80fe53c2
...
...
@@ -163,6 +163,14 @@ Obj.# Case# Test# Description
01 63 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 63 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 65 00 lte-softmodem tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
01 65 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 65 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 65 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
01 65 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
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 64 lte-softmodem-noS1 tests
02 Functional test case
...
...
cmake_targets/autotests/run_exec_autotests.bash
View file @
80fe53c2
...
...
@@ -175,6 +175,7 @@ function test_compile() {
#\param $13 -> output of compilation program that needs to be found for test case to pass
#\param $14 -> tags to help identify the test case for readability in output xml file
#\param $15 => password for the user to run certain commands as sudo
#\param $16 => test config file params to be modified
function
test_compile_and_run
()
{
xUnit_start
...
...
@@ -195,12 +196,14 @@ function test_compile_and_run() {
compile_prog_out
=
${
13
}
tags
=
${
14
}
mypassword
=
${
15
}
test_config_file
=
${
16
}
build_dir
=
$tdir
/
$1
/build
#exec_file=$build_dir/$6
xmlfile_testcase
=
$log_dir
/test.
$1
.xml
#Temporary log file where execution log is stored.
temp_exec_log
=
$log_dir
/temp_log.txt
export
OPENAIR_LOGDIR
=
$log_dir
rm
-fr
$log_dir
mkdir
-p
$log_dir
...
...
@@ -219,6 +222,10 @@ function test_compile_and_run() {
#compile_prog_array=()
#read -a compile_prog_array <<<"$compile_prog"
#test_config_file=`eval "echo \"$test_config_file\" "`
#echo "test_config_file = $test_config_file"
tags_array
=()
read
-a
tags_array
<<<
"
$tags
"
...
...
@@ -238,17 +245,21 @@ function test_compile_and_run() {
cd
$log_dir
{
uname
-a
#eval $pre_compile_prog
#cmake ..
#rm -fv $exec_file
echo
"Executing
$compile_prog
$compile_args
"
>>
$log_file
echo
"Executing
$pre_compile_prog
"
eval
$pre_compile_prog
if
[
"
$test_config_file
"
!=
""
]
;
then
echo
"Modifying test_config_file parameters..."
echo
"
$test_config_file
"
|xargs
-L
1
$OPENAIR_DIR
/cmake_targets/autotests/tools/search_repl.py
fi
echo
"Executing
$compile_prog
$compile_args
"
eval
"
$compile_prog
$compile_args
"
echo
"Copying compilation log files to test case log directory:
$log_dir
"
cp
-fvr
$OPENAIR_DIR
/cmake_targets/log/
$log_dir
/compile_log
}>>
$log_file
2>&1
echo
"</COMPILATION LOG>"
>>
$log_file
2>&1
#done
#process the test case if it is that of execution
if
[
"
$class
"
==
"execution"
]
;
then
tags_array_index
=
0
...
...
@@ -437,7 +448,8 @@ for search_expr in "${test_case_array[@]}"
else
flag_run_test_case
=
1
fi
#We skip this test case if it is not in the group list
if
[
"
$flag_run_test_case
"
-ne
"1"
]
;
then
continue
...
...
@@ -458,6 +470,7 @@ for search_expr in "${test_case_array[@]}"
nruns
=
`
xmlstarlet sel
-t
-v
"/testCaseList/testCase[@id='
$search_expr
']/nruns"
$xml_conf
`
compile_prog_out
=
`
xmlstarlet sel
-t
-v
"/testCaseList/testCase[@id='
$search_expr
']/compile_prog_out"
$xml_conf
`
tags
=
`
xmlstarlet sel
-t
-v
"/testCaseList/testCase[@id='
$search_expr
']/tags"
$xml_conf
`
test_config_file
=
`
xmlstarlet sel
-t
-v
"/testCaseList/testCase[@id='
$search_expr
']/test_config_file"
$xml_conf
`
echo
"class =
$class
"
echo
"name =
$name
"
...
...
@@ -497,7 +510,7 @@ for search_expr in "${test_case_array[@]}"
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
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_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
...."
fi
...
...
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
80fe53c2
...
...
@@ -60,7 +60,9 @@ import paramiko
import
subprocess
import
commands
sys
.
path
.
append
(
'/opt/ssh'
)
sys
.
path
.
append
(
os
.
path
.
expandvars
(
'$OPENAIR_DIR/cmake_targets/autotests/tools/'
))
from
lib_autotest
import
*
import
ssh
from
ssh
import
SSHSession
import
argparse
...
...
@@ -1015,6 +1017,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
)
# \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
...
...
@@ -1282,18 +1286,17 @@ if localshell == 0:
print
'
\n
Cleaning Older running programs : '
+
CleanUpOldProgs
cleanOldPrograms
(
oai_list
[
index
],
CleanUpOldProgs
,
CleanUpAluLteBox
,
ExmimoRfStop
)
result
=
oai_list
[
index
].
send
(
'mount '
+
NFSResultsDir
,
True
)
print
"Mounting NFS Share "
+
NFSResultsDir
+
"..."
+
result
#
result = oai_list[index].send('mount ' + NFSResultsDir, True)
#
print "Mounting NFS Share " + NFSResultsDir + "..." + result
# Check if NFS share is mounted correctly.
print
'Checking if NFS Share<'
+
NFSResultsDir
+
'> is mounted correctly...'
#result = oai_list[index].send_expect('mount | grep ' + NFSResultsDir, NFSResultsDir )
cmd
=
'if grep -qs '
+
NFSResultsDir
+
' /proc/mounts; then echo
\'
'
+
NFSResultsDir
+
' is mounted
\'
; fi'
search_expr
=
NFSResultsDir
+
' is mounted'
print
"cmd = "
+
cmd
print
"search_expr = "
+
search_expr
result
=
oai_list
[
index
].
send_expect
(
cmd
,
search_expr
)
print
"Mount NFS_Results_Dir..."
+
result
#print 'Checking if NFS Share<' + NFSResultsDir + '> is mounted correctly...'
#cmd = 'if grep -qs '+NFSResultsDir+ ' /proc/mounts; then echo \'' + NFSResultsDir + ' is mounted\' ; fi'
#search_expr = NFSResultsDir + ' is mounted'
#print "cmd = " + cmd
#print "search_expr = " + search_expr
#result = oai_list[index].send_expect(cmd, search_expr)
#print "Mount NFS_Results_Dir..." + result
index
=
index
+
1
#oai.connect2(user,pw)
...
...
cmake_targets/autotests/test_case_list.xml
View file @
80fe53c2
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
View file @
80fe53c2
...
...
@@ -21,6 +21,10 @@ if openair_dir == None:
print
"Error getting OPENAIR_DIR environment variable"
sys
.
exit
(
1
)
sys
.
path
.
append
(
os
.
path
.
expandvars
(
'$OPENAIR_DIR/cmake_targets/autotests/tools/'
))
from
lib_autotest
import
*
def
find_open_port
():
global
serial_port
,
ser
max_ports
=
100
...
...
@@ -159,34 +163,11 @@ def reset_ue():
VendorId
=
res
[
0
][
2
]
ProductId
=
res
[
0
][
3
]
usb_dir
=
find_usb_path
(
VendorId
,
ProductId
)
print
usb_dir
print
"Bandrich 4G LTE Adapter found in..."
+
usb_dir
cmd
=
"sudo sh -c
\"
echo 0 > "
+
usb_dir
+
"/authorized
\"
"
os
.
system
(
cmd
+
" ; sleep 5"
)
os
.
system
(
cmd
+
" ; sleep
1
5"
)
cmd
=
"sudo sh -c
\"
echo 1 > "
+
usb_dir
+
"/authorized
\"
"
os
.
system
(
cmd
+
" ; sleep 5"
)
def
read_file
(
filename
):
try
:
file
=
open
(
filename
,
'r'
)
return
file
.
read
()
except
Exception
,
e
:
#error = ' Filename ' + filename
#error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
#error = error + traceback.format_exc()
#print error
return
''
def
find_usb_path
(
idVendor
,
idProduct
):
for
root
,
dirs
,
files
in
os
.
walk
(
"/sys/bus/usb/devices"
,
topdown
=
False
):
for
name
in
dirs
:
tmpdir
=
os
.
path
.
join
(
root
,
name
)
tmpidVendor
=
read_file
(
tmpdir
+
'/idVendor'
).
replace
(
"
\n
"
,
""
)
tmpidProduct
=
read_file
(
tmpdir
+
'/idProduct'
).
replace
(
"
\n
"
,
""
)
#print "tmpdir = " + tmpdir + " tmpidVendor = " + tmpidVendor + " tmpidProduct = " + tmpidProduct
if
tmpidVendor
==
idVendor
and
tmpidProduct
==
idProduct
:
return
tmpdir
return
''
os
.
system
(
cmd
+
" ; sleep 30"
)
i
=
1
gw
=
'192.172.0.1'
...
...
cmake_targets/autotests/tools/lib_autotest.py
0 → 100644
View file @
80fe53c2
#!/usr/bin/python
import
os
from
pyroute2
import
IPRoute
import
sys
import
re
import
threading
import
signal
import
traceback
import
commands
def
read_file
(
filename
):
try
:
file
=
open
(
filename
,
'r'
)
return
file
.
read
()
except
Exception
,
e
:
# WE just ignore the exception as some files are probably not present
#error = ' Filename ' + filename
#error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
#error = error + traceback.format_exc()
#print error
return
''
def
find_usb_path
(
idVendor
,
idProduct
):
for
root
,
dirs
,
files
in
os
.
walk
(
"/sys/bus/usb/devices"
,
topdown
=
False
):
for
name
in
dirs
:
tmpdir
=
os
.
path
.
join
(
root
,
name
)
tmpidVendor
=
read_file
(
tmpdir
+
'/idVendor'
).
replace
(
"
\n
"
,
""
)
tmpidProduct
=
read_file
(
tmpdir
+
'/idProduct'
).
replace
(
"
\n
"
,
""
)
if
tmpidVendor
==
idVendor
and
tmpidProduct
==
idProduct
:
return
tmpdir
return
''
cmake_targets/autotests/tools/search_repl.py
View file @
80fe53c2
#!/usr/bin/python
import
sys
import
re
import
os
#Arg 1 name of file
#Arg 2 keyword
#arg 3 replacement text
#Note that these should be seperated by spaces
if
len
(
sys
.
argv
)
!=
4
:
print
"search_repl.py: Wrong number of arguments. This program needs 3 arguments
"
print
"search_repl.py: Wrong number of arguments. This program needs 3 arguments
. The number of arguments supplied : "
+
str
(
sys
.
argv
)
sys
.
exit
()
filename
=
sys
.
argv
[
1
]
filename
=
os
.
path
.
expandvars
(
sys
.
argv
[
1
])
keyword
=
sys
.
argv
[
2
]
replacement_text
=
sys
.
argv
[
3
]
file
=
open
(
filename
,
'r'
)
string
=
file
.
read
()
file
.
close
()
...
...
cmake_targets/tools/start_bladerf.py
0 → 100755
View file @
80fe53c2
#!/usr/bin/python
import
time
import
serial
import
os
from
pyroute2
import
IPRoute
import
sys
import
re
import
threading
import
signal
import
traceback
import
commands
if
os
.
environ
.
get
(
'OPENAIR_DIR'
)
==
None
:
print
"Error getting OPENAIR_DIR environment variable"
sys
.
exit
(
1
)
sys
.
path
.
append
(
os
.
path
.
expandvars
(
'$OPENAIR_DIR/cmake_targets/autotests/tools/'
))
from
lib_autotest
import
*
def
reset_bladerf
():
stringIdBladeRF
=
'OpenMoko, Inc'
status
,
out
=
commands
.
getstatusoutput
(
'lsusb | grep -i
\'
'
+
stringIdBladeRF
+
'
\'
'
)
if
(
out
==
''
)
:
print
"BladeRF not found. Exiting now..."
sys
.
exit
()
p
=
re
.
compile
(
'Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)'
)
res
=
p
.
findall
(
out
)
BusId
=
res
[
0
][
0
]
DeviceId
=
res
[
0
][
1
]
VendorId
=
res
[
0
][
2
]
ProductId
=
res
[
0
][
3
]
usb_dir
=
find_usb_path
(
VendorId
,
ProductId
)
print
"BladeRF Found in directory..."
+
usb_dir
cmd
=
"sudo sh -c
\"
echo 0 > "
+
usb_dir
+
"/authorized
\"
"
os
.
system
(
cmd
+
" ; sleep 5"
)
cmd
=
"sudo sh -c
\"
echo 1 > "
+
usb_dir
+
"/authorized
\"
"
os
.
system
(
cmd
+
" ; sleep 5"
)
os
.
system
(
'sudo -E bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img'
)
print
"Resettting BladeRF..."
reset_bladerf
()
os
.
system
(
"dmesg|tail"
)
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
80fe53c2
...
...
@@ -1077,7 +1077,7 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
}
if
(
UE_id
==
NB_UE_INST
)
{
LOG_
E
(
PHY
,
"rx_pucch_emul: FATAL, d
idn't find UE with rnti %x
\n
"
,
rnti
);
LOG_
W
(
PHY
,
"rx_pucch_emul: D
idn't find UE with rnti %x
\n
"
,
rnti
);
return
(
-
1
);
}
...
...
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