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
Michael Black
OpenXG-RAN
Commits
0c8d4323
Commit
0c8d4323
authored
Mar 02, 2016
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-34-test_framework' into develop
parents
9ccc1999
24d24f12
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1441 additions
and
251 deletions
+1441
-251
cmake_targets/autotests/README.txt
cmake_targets/autotests/README.txt
+19
-0
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+81
-19
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+1136
-231
cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
+1
-0
cmake_targets/autotests/tools/configure_cots_huaweiE398_ue.py
...e_targets/autotests/tools/configure_cots_huaweiE398_ue.py
+200
-0
cmake_targets/autotests/tools/search_repl.py
cmake_targets/autotests/tools/search_repl.py
+3
-0
cmake_targets/tools/stop_exmimo2
cmake_targets/tools/stop_exmimo2
+1
-1
No files found.
cmake_targets/autotests/README.txt
View file @
0c8d4323
...
...
@@ -171,6 +171,25 @@ 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 64 lte-softmodem-noS1 tests
02 Functional test case
...
...
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
0c8d4323
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/test_case_list.xml
View file @
0c8d4323
This source diff could not be displayed because it is too large. You can
view the blob
instead.
cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
View file @
0c8d4323
...
...
@@ -131,6 +131,7 @@ def start_ue () :
ip
=
IPRoute
()
idx
=
ip
.
link_lookup
(
ifname
=
iface
)[
0
]
os
.
system
(
'route add '
+
gw
+
' ppp0'
)
os
.
system
(
'sleep 5'
)
os
.
system
(
'ping '
+
gw
)
break
except
Exception
,
e
:
...
...
cmake_targets/autotests/tools/configure_cots_huaweiE398_ue.py
0 → 100755
View file @
0c8d4323
#!/usr/bin/python
import
time
import
serial
import
os
from
pyroute2
import
IPRoute
import
sys
import
re
import
threading
import
signal
import
traceback
import
os
import
commands
# configure the serial connections (the parameters differs on the device you are connecting to)
#First we find an open port to work with
serial_port
=
''
ser
=
serial
.
Serial
()
openair_dir
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
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
if
os
.
path
.
exists
(
serial_port
)
==
True
:
return
serial_port
for
port
in
range
(
0
,
100
):
serial_port
=
'/dev/ttyUSB'
+
str
(
port
)
if
os
.
path
.
exists
(
serial_port
)
==
True
:
print
'New Serial Port : '
+
serial_port
break
ser
=
serial
.
Serial
(
port
=
serial_port
)
return
#serial_port = '/dev/ttyUSB2'
bandrich_ppd_config
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
+
'/cmake_targets/autotests/tools/wdial.bandrich.conf'
exit_flag
=
0
def
signal_handler
(
signal
,
frame
):
print
(
'You pressed Ctrl+C!'
)
print
(
'Resetting the UE to detached state'
)
timeout
=
10
exit_flag
=
1
send_command
(
'AT+CGATT=0'
,
'OK'
,
timeout
)
sys
.
exit
(
0
)
signal
.
signal
(
signal
.
SIGINT
,
signal_handler
)
#ser.open()
#ser.isOpen()
class
pppThread
(
threading
.
Thread
):
def
__init__
(
self
,
threadID
,
name
,
counter
):
threading
.
Thread
.
__init__
(
self
)
self
.
threadID
=
threadID
self
.
name
=
name
self
.
counter
=
counter
def
run
(
self
):
print
"Starting "
+
self
.
name
#Here we keep running pppd thread in indefinite loop as this script terminates sometimes
#while 1:
while
1
:
time
.
sleep
(
5
)
#Hard coded, do not reduce this number!
print
"Starting wvdial now..."
print
'exit_flag = '
+
str
(
exit_flag
)
send_command
(
'AT+CGATT=1'
,
'OK'
,
300
)
os
.
system
(
'wvdial -C '
+
bandrich_ppd_config
+
''
)
if
exit_flag
==
1
:
print
"Exit flag set to true. Exiting pppThread now"
print
"Terminating wvdial now..."
def
send_command
(
cmd
,
response
,
timeout
):
count
=
0
sleep_duration
=
1
print
'In function: send_command: cmd = <'
+
cmd
+
'> response: <'
+
response
+
'>
\n
'
global
serial_port
,
ser
while
count
<=
timeout
:
try
:
#Sometimes the port does not exist coz of reset in modem.
#In that case, we need to search for this port again
if
os
.
path
.
exists
(
serial_port
)
==
False
:
find_open_port
()
ser
.
write
(
cmd
+
'
\r\n
'
)
out
=
''
time
.
sleep
(
sleep_duration
)
count
=
count
+
sleep_duration
while
ser
.
inWaiting
()
>
0
:
out
+=
ser
.
read
(
1
)
print
'out = <'
+
out
+
'> response = <'
+
response
+
'>
\n
'
if
re
.
search
(
response
,
out
):
break
except
Exception
,
e
:
error
=
' cmd : '
+
cmd
+
' response : '
+
response
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
def
start_ue
()
:
#print 'Enter your commands below.\r\nInsert "exit" to leave the application.'
timeout
=
60
#timeout in seconds
send_command
(
'AT'
,
'OK'
,
timeout
)
#send_command('AT+CFUN=1' , 'OK' , timeout)
#send_command('AT+CGATT=0' , 'OK' , timeout)
send_command
(
'AT+CGATT=1'
,
'OK'
,
300
)
#os.system('wvdial -C ' + bandrich_ppd_config + ' &' )
thread_ppp
=
pppThread
(
1
,
"ppp_thread"
,
1
)
thread_ppp
.
start
()
iface
=
'ppp0'
while
1
:
time
.
sleep
(
2
)
#Now we check if ppp0 interface is up and running
try
:
if
exit_flag
==
1
:
break
ip
=
IPRoute
()
idx
=
ip
.
link_lookup
(
ifname
=
iface
)[
0
]
os
.
system
(
'route add '
+
gw
+
' ppp0'
)
os
.
system
(
'sleep 5'
)
os
.
system
(
'ping '
+
gw
)
break
except
Exception
,
e
:
error
=
' Interface '
+
iface
+
'does not exist...'
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
thread_ppp
.
join
()
def
stop_ue
():
timeout
=
60
os
.
system
(
'killall wvdial'
)
send_command
(
'AT'
,
'OK'
,
timeout
)
send_command
(
'AT+CGATT=0'
,
'OK|ERROR'
,
timeout
)
#send_command('AT+CFUN=4' , 'OK' , timeout)
#reset the USB BUS of Bandrich UE
def
reset_ue
():
stringIdBandrich
=
'Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard'
status
,
out
=
commands
.
getstatusoutput
(
'lsusb | grep -i
\'
'
+
stringIdBandrich
+
'
\'
'
)
if
(
out
==
''
)
:
print
"Bandrich 4G LTE Adapter 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
"Bandrich 4G LTE Adapter found in..."
+
usb_dir
cmd
=
"sudo sh -c
\"
echo 0 > "
+
usb_dir
+
"/authorized
\"
"
os
.
system
(
cmd
+
" ; sleep 15"
)
cmd
=
"sudo sh -c
\"
echo 1 > "
+
usb_dir
+
"/authorized
\"
"
os
.
system
(
cmd
+
" ; sleep 30"
)
i
=
1
gw
=
'192.172.0.1'
while
i
<
len
(
sys
.
argv
):
arg
=
sys
.
argv
[
i
]
if
arg
==
'--start-ue'
:
find_open_port
()
print
'Using Serial port : '
+
serial_port
start_ue
()
elif
arg
==
'--stop-ue'
:
find_open_port
()
print
'Using Serial port : '
+
serial_port
stop_ue
()
elif
arg
==
'--reset-ue'
:
reset_ue
()
elif
arg
==
'-gw'
:
gw
=
sys
.
argv
[
i
+
1
]
i
=
i
+
1
elif
arg
==
'-h'
:
print
"--reset-ue: Reset the UE on USB Bus. Similar to unplugging and plugging the UE"
print
"--stop-ue: Stop the UE. Send DETACH command"
print
"--start-ue: Start the UE. Send ATTACH command"
print
"-gw: Specify the default gw as sometimes the gateway/route arguments are not set properly via wvdial"
else
:
print
" Script called with wrong arguments, arg = "
+
arg
sys
.
exit
()
i
=
i
+
1
cmake_targets/autotests/tools/search_repl.py
View file @
0c8d4323
...
...
@@ -26,6 +26,9 @@ if keyword == 'mme_ip_address':
elif
keyword
==
'IPV4_LIST'
:
replacement_text
=
keyword
+
' = ( '
+
replacement_text
+
' ) ; '
string
=
re
.
sub
(
r"IPV4_LIST\s*=\s*\(([^\$]+?)\)\s*;"
,
replacement_text
,
string
,
re
.
M
)
elif
keyword
==
'rrh_gw_config'
:
replacement_text
=
keyword
+
' = ( { '
+
replacement_text
+
' } ) ; '
string
=
re
.
sub
(
r"rrh_gw_config\s*=\s*\(([^\$]+?)\)\s*;"
,
replacement_text
,
string
,
re
.
M
)
else
:
replacement_text
=
keyword
+
' = '
+
replacement_text
+
' ; '
string
=
re
.
sub
(
r"%s\s*=\s*([^\$]+?)\s*;"
%
keyword
,
replacement_text
,
string
,
re
.
M
)
...
...
cmake_targets/tools/stop_exmimo2
View file @
0c8d4323
...
...
@@ -13,5 +13,5 @@ sudo -E $OPENAIR_DIR/cmake_targets/tools/init_exmimo2
#now we stop the card from transmitting anything
cd
$OPENAIR_DIR
/targets/bin
sudo
-E
octave
$OPENAIR_DIR
/cmake_targets/tools/exmimo_stop_octave.m
sudo
-E
octave
-H
--no-gui
$OPENAIR_DIR
/cmake_targets/tools/exmimo_stop_octave.m
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