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
canghaiwuhen
OpenXG-RAN
Commits
0aeb77ce
Commit
0aeb77ce
authored
Dec 03, 2015
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates to test framework + bugfixes
parent
6e1e41db
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
230 additions
and
111 deletions
+230
-111
cmake_targets/autotests/openair.py
cmake_targets/autotests/openair.py
+44
-16
cmake_targets/autotests/run_exec_autotests.bash
cmake_targets/autotests/run_exec_autotests.bash
+5
-1
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+178
-92
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+3
-2
No files found.
cmake_targets/autotests/openair.py
View file @
0aeb77ce
...
...
@@ -41,6 +41,8 @@ import os
import
array
import
shutil
import
subprocess
import
sys
import
traceback
# import call
from
core
import
*
...
...
@@ -102,8 +104,12 @@ class openair(core):
self
.
oai
.
prompt
()
print
self
.
oai
.
before
except
Error
,
val
:
print
"Error: can't connect to"
+
username
+
"@"
+
self
.
address
except
Exception
,
e
:
error
=
''
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
def
connect2
(
self
,
username
,
password
,
prompt
=
'$'
):
self
.
prompt1
=
prompt
...
...
@@ -133,9 +139,12 @@ class openair(core):
sys
.
exit
(
1
)
return
'Ok'
except
Exception
,
val
:
time
.
sleep
(
5
)
print
"Error:"
,
val
except
Exception
,
e
:
error
=
''
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
def
connect_localshell
(
self
,
prompt
=
'$'
):
self
.
prompt1
=
prompt
...
...
@@ -152,9 +161,12 @@ class openair(core):
else
:
sys
.
exit
(
1
)
except
Exception
,
val
:
time
.
sleep
(
5
)
print
"Error:"
,
val
except
Exception
,
e
:
error
=
''
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
def
disconnect
(
self
):
print
'disconnecting the ssh connection to '
+
self
.
address
+
'
\n
'
...
...
@@ -173,8 +185,12 @@ class openair(core):
os
.
system
(
'echo '
+
pw
+
' | sudo -S pkill cc1'
)
time
.
sleep
(
1
)
os
.
system
(
'echo '
+
pw
+
' | sudo -S pkill oaisim oaisim_nos1'
)
except
Error
,
val
:
print
"Error:"
,
val
except
Exception
,
e
:
error
=
''
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
def
rm_driver
(
self
,
oai
,
user
,
pw
):
try
:
...
...
@@ -184,8 +200,12 @@ class openair(core):
else
:
oai
.
send_nowait
(
'echo '
+
pw
+
' | sudo -S rmmod nasmesh;'
)
#os.system('echo '+pw+ ' | sudo -S rmmod nasmesh;')
except
Error
,
val
:
print
"Error removing oai network driver module:"
,
val
except
Exception
,
e
:
error
=
''
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
def
driver
(
self
,
oai
,
user
,
pw
):
#pwd = oai.send_recv('pwd')
...
...
@@ -197,8 +217,12 @@ class openair(core):
else
:
oai
.
send
(
'echo '
+
pw
+
' | sudo -S insmod ./nasmesh.ko;'
)
except
Error
,
val
:
print
"Error inserting oai network driver module:"
,
val
except
Exception
,
e
:
error
=
''
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
def
cleandir
(
self
,
logdir
,
debug
)
:
...
...
@@ -209,8 +233,12 @@ class openair(core):
print
'filepath is '
+
filepath
try
:
shutil
.
rmtree
(
filepath
)
except
OSError
:
os
.
remove
(
filepath
)
except
Exception
,
e
:
error
=
''
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
#print 'Could not remove the filepath'+ filepath + ' with error ' + OSError
def
create_dir
(
self
,
dirname
,
debug
)
:
...
...
cmake_targets/autotests/run_exec_autotests.bash
View file @
0aeb77ce
...
...
@@ -107,6 +107,7 @@ function test_compile() {
#mkdir -p $build_dir
cd
$log_dir
{
uname
-a
compile_log_dir
=
`
eval echo
\"
$OPENAIR_DIR
/cmake_targets/log/
\"
`
echo
"Removing compilation log files in
$compile_log_dir
"
rm
-frv
$compile_log_dir
...
...
@@ -236,6 +237,7 @@ function test_compile_and_run() {
cd
$log_dir
{
uname
-a
#eval $pre_compile_prog
#cmake ..
#rm -fv $exec_file
...
...
@@ -272,7 +274,7 @@ function test_compile_and_run() {
fi
echo
"Executing
$main_exec
$main_exec_args_array_index
"
echo
"Executing
$main_exec
$main_exec_args_array_index
"
>>
$temp_exec_log
{
eval
"
$main_exec
$main_exec_args_array_index
"
;
}
>>
$temp_exec_log
2>&1
{
uname
-a
;
eval
"
$main_exec
$main_exec_args_array_index
"
;
}
>>
$temp_exec_log
2>&1
echo
"</EXECUTION LOG Test Case =
$test_case_name
.
${
tags_array
[
$tags_array_index
]
}
, Run =
$run_index
>"
>>
$temp_exec_log
2>&1
cat
$temp_exec_log
>>
$log_file
2>&1
...
...
@@ -504,6 +506,8 @@ for search_expr in "${test_case_array[@]}"
}
uname
-a
main
"
$@
"
xUnit_write
"
$results_file
"
...
...
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
0aeb77ce
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/test_case_list.xml
View file @
0aeb77ce
<testCaseList>
<MachineList>
amerique stevens calisson nano
</MachineList>
<MachineList>
stevens calisson mozart nano amerique
</MachineList>
<NFSResultsShare>
/mnt/sradio/TEST_RESULTS
</NFSResultsShare>
<GitOAI5GRepo>
https://gitlab.eurecom.fr/oai/openairinterface5g.git
</GitOAI5GRepo>
<GitOpenair-cnRepo>
https://gitlab.eurecom.fr/oai/openair-cn.git
</GitOpenair-cnRepo>
<GitOAI5GRepoBranch>
feature-34-test_framework
</GitOAI5GRepoBranch>
<GitOpenair-cnRepoBranch>
feature-17-test_framework
</GitOpenair-cnRepoBranch>
<CleanUpOldProgs>
oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* hss hss_sim configure_cots_bandrich_ue* wvdial*
</CleanUpOldProgs>
<CleanUpOldProgs>
oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* hss hss_sim configure_cots_bandrich_ue* wvdial*
run_exec_autotests*
</CleanUpOldProgs>
<CleanUpAluLteBox>
/opt/ltebox/tools/stop_ltebox
</CleanUpAluLteBox>
<Timeout_execution>
1800
</Timeout_execution>
<MachineListGeneric>
calisson stevens mozart nano amerique
</MachineListGeneric>
<testCase
id=
"010101"
>
<class>
compilation
</class>
<desc>
Build oaisim.Rel8
</desc>
...
...
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