Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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 UE
Commits
cd45c0f6
Commit
cd45c0f6
authored
Dec 03, 2015
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates to test framework + bugfixes
parent
7e4ca79c
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 @
cd45c0f6
...
@@ -41,6 +41,8 @@ import os
...
@@ -41,6 +41,8 @@ import os
import
array
import
array
import
shutil
import
shutil
import
subprocess
import
subprocess
import
sys
import
traceback
# import call
# import call
from
core
import
*
from
core
import
*
...
@@ -102,8 +104,12 @@ class openair(core):
...
@@ -102,8 +104,12 @@ class openair(core):
self
.
oai
.
prompt
()
self
.
oai
.
prompt
()
print
self
.
oai
.
before
print
self
.
oai
.
before
except
Error
,
val
:
except
Exception
,
e
:
print
"Error: can't connect to"
+
username
+
"@"
+
self
.
address
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
=
'$'
):
def
connect2
(
self
,
username
,
password
,
prompt
=
'$'
):
self
.
prompt1
=
prompt
self
.
prompt1
=
prompt
...
@@ -133,9 +139,12 @@ class openair(core):
...
@@ -133,9 +139,12 @@ class openair(core):
sys
.
exit
(
1
)
sys
.
exit
(
1
)
return
'Ok'
return
'Ok'
except
Exception
,
val
:
except
Exception
,
e
:
time
.
sleep
(
5
)
error
=
''
print
"Error:"
,
val
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
=
'$'
):
def
connect_localshell
(
self
,
prompt
=
'$'
):
self
.
prompt1
=
prompt
self
.
prompt1
=
prompt
...
@@ -152,9 +161,12 @@ class openair(core):
...
@@ -152,9 +161,12 @@ class openair(core):
else
:
else
:
sys
.
exit
(
1
)
sys
.
exit
(
1
)
except
Exception
,
val
:
except
Exception
,
e
:
time
.
sleep
(
5
)
error
=
''
print
"Error:"
,
val
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
):
def
disconnect
(
self
):
print
'disconnecting the ssh connection to '
+
self
.
address
+
'
\n
'
print
'disconnecting the ssh connection to '
+
self
.
address
+
'
\n
'
...
@@ -173,8 +185,12 @@ class openair(core):
...
@@ -173,8 +185,12 @@ class openair(core):
os
.
system
(
'echo '
+
pw
+
' | sudo -S pkill cc1'
)
os
.
system
(
'echo '
+
pw
+
' | sudo -S pkill cc1'
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
os
.
system
(
'echo '
+
pw
+
' | sudo -S pkill oaisim oaisim_nos1'
)
os
.
system
(
'echo '
+
pw
+
' | sudo -S pkill oaisim oaisim_nos1'
)
except
Error
,
val
:
except
Exception
,
e
:
print
"Error:"
,
val
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
):
def
rm_driver
(
self
,
oai
,
user
,
pw
):
try
:
try
:
...
@@ -184,8 +200,12 @@ class openair(core):
...
@@ -184,8 +200,12 @@ class openair(core):
else
:
else
:
oai
.
send_nowait
(
'echo '
+
pw
+
' | sudo -S rmmod nasmesh;'
)
oai
.
send_nowait
(
'echo '
+
pw
+
' | sudo -S rmmod nasmesh;'
)
#os.system('echo '+pw+ ' | sudo -S rmmod nasmesh;')
#os.system('echo '+pw+ ' | sudo -S rmmod nasmesh;')
except
Error
,
val
:
except
Exception
,
e
:
print
"Error removing oai network driver module:"
,
val
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
):
def
driver
(
self
,
oai
,
user
,
pw
):
#pwd = oai.send_recv('pwd')
#pwd = oai.send_recv('pwd')
...
@@ -197,8 +217,12 @@ class openair(core):
...
@@ -197,8 +217,12 @@ class openair(core):
else
:
else
:
oai
.
send
(
'echo '
+
pw
+
' | sudo -S insmod ./nasmesh.ko;'
)
oai
.
send
(
'echo '
+
pw
+
' | sudo -S insmod ./nasmesh.ko;'
)
except
Error
,
val
:
except
Exception
,
e
:
print
"Error inserting oai network driver module:"
,
val
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
)
:
def
cleandir
(
self
,
logdir
,
debug
)
:
...
@@ -209,8 +233,12 @@ class openair(core):
...
@@ -209,8 +233,12 @@ class openair(core):
print
'filepath is '
+
filepath
print
'filepath is '
+
filepath
try
:
try
:
shutil
.
rmtree
(
filepath
)
shutil
.
rmtree
(
filepath
)
except
OSError
:
except
Exception
,
e
:
os
.
remove
(
filepath
)
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
#print 'Could not remove the filepath'+ filepath + ' with error ' + OSError
def
create_dir
(
self
,
dirname
,
debug
)
:
def
create_dir
(
self
,
dirname
,
debug
)
:
...
...
cmake_targets/autotests/run_exec_autotests.bash
View file @
cd45c0f6
...
@@ -107,6 +107,7 @@ function test_compile() {
...
@@ -107,6 +107,7 @@ function test_compile() {
#mkdir -p $build_dir
#mkdir -p $build_dir
cd
$log_dir
cd
$log_dir
{
{
uname
-a
compile_log_dir
=
`
eval echo
\"
$OPENAIR_DIR
/cmake_targets/log/
\"
`
compile_log_dir
=
`
eval echo
\"
$OPENAIR_DIR
/cmake_targets/log/
\"
`
echo
"Removing compilation log files in
$compile_log_dir
"
echo
"Removing compilation log files in
$compile_log_dir
"
rm
-frv
$compile_log_dir
rm
-frv
$compile_log_dir
...
@@ -236,6 +237,7 @@ function test_compile_and_run() {
...
@@ -236,6 +237,7 @@ function test_compile_and_run() {
cd
$log_dir
cd
$log_dir
{
{
uname
-a
#eval $pre_compile_prog
#eval $pre_compile_prog
#cmake ..
#cmake ..
#rm -fv $exec_file
#rm -fv $exec_file
...
@@ -272,7 +274,7 @@ function test_compile_and_run() {
...
@@ -272,7 +274,7 @@ function test_compile_and_run() {
fi
fi
echo
"Executing
$main_exec
$main_exec_args_array_index
"
echo
"Executing
$main_exec
$main_exec_args_array_index
"
echo
"Executing
$main_exec
$main_exec_args_array_index
"
>>
$temp_exec_log
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
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
cat
$temp_exec_log
>>
$log_file
2>&1
...
@@ -504,6 +506,8 @@ for search_expr in "${test_case_array[@]}"
...
@@ -504,6 +506,8 @@ for search_expr in "${test_case_array[@]}"
}
}
uname
-a
main
"
$@
"
main
"
$@
"
xUnit_write
"
$results_file
"
xUnit_write
"
$results_file
"
...
...
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
cd45c0f6
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/test_case_list.xml
View file @
cd45c0f6
<testCaseList>
<testCaseList>
<MachineList>
amerique stevens calisson nano
</MachineList>
<MachineList>
stevens calisson mozart nano amerique
</MachineList>
<NFSResultsShare>
/mnt/sradio/TEST_RESULTS
</NFSResultsShare>
<NFSResultsShare>
/mnt/sradio/TEST_RESULTS
</NFSResultsShare>
<GitOAI5GRepo>
https://gitlab.eurecom.fr/oai/openairinterface5g.git
</GitOAI5GRepo>
<GitOAI5GRepo>
https://gitlab.eurecom.fr/oai/openairinterface5g.git
</GitOAI5GRepo>
<GitOpenair-cnRepo>
https://gitlab.eurecom.fr/oai/openair-cn.git
</GitOpenair-cnRepo>
<GitOpenair-cnRepo>
https://gitlab.eurecom.fr/oai/openair-cn.git
</GitOpenair-cnRepo>
<GitOAI5GRepoBranch>
feature-34-test_framework
</GitOAI5GRepoBranch>
<GitOAI5GRepoBranch>
feature-34-test_framework
</GitOAI5GRepoBranch>
<GitOpenair-cnRepoBranch>
feature-17-test_framework
</GitOpenair-cnRepoBranch>
<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>
<CleanUpAluLteBox>
/opt/ltebox/tools/stop_ltebox
</CleanUpAluLteBox>
<Timeout_execution>
1800
</Timeout_execution>
<Timeout_execution>
1800
</Timeout_execution>
<MachineListGeneric>
calisson stevens mozart nano amerique
</MachineListGeneric>
<testCase
id=
"010101"
>
<testCase
id=
"010101"
>
<class>
compilation
</class>
<class>
compilation
</class>
<desc>
Build oaisim.Rel8
</desc>
<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