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
lizhongxiao
OpenXG-RAN
Commits
ffc468e5
Commit
ffc468e5
authored
Dec 30, 2015
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfixes for intergration with GitLabCI
parent
91c43fa2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
19 deletions
+36
-19
cmake_targets/autotests/core.py
cmake_targets/autotests/core.py
+2
-3
cmake_targets/autotests/openair.py
cmake_targets/autotests/openair.py
+1
-0
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+31
-14
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+2
-2
No files found.
cmake_targets/autotests/core.py
View file @
ffc468e5
...
...
@@ -118,8 +118,7 @@ class core:
rsp1
=
self
.
prompt1
rsp2
=
self
.
prompt2
if
sudo
==
True
:
command
=
'echo
\'
'
+
self
.
password
+
'
\'
| sudo -S -E '
+
command
command
=
'echo
\'
'
+
''
+
'
\'
| sudo -S -E bash -c
\'
'
+
command
+
'
\'
'
self
.
wait_quiet
()
if
self
.
send_cr
:
log
.
stats
[
'cmd'
]
+=
1
...
...
@@ -140,7 +139,7 @@ class core:
rsp2
=
self
.
prompt2
self
.
wait_quiet
()
if
sudo
==
True
:
command
=
'echo
\'
'
+
self
.
password
+
'
\'
| sudo -S -E '
+
command
command
=
'echo
\'
'
+
''
+
'
\'
| sudo -S -E bash -c
\'
'
+
command
+
'
\'
'
if
self
.
send_cr
:
log
.
stats
[
'cmd'
]
+=
1
self
.
oai
.
sendline
(
command
)
...
...
cmake_targets/autotests/openair.py
View file @
ffc468e5
...
...
@@ -112,6 +112,7 @@ class openair(core):
except
Exception
,
e
:
error
=
''
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
'address = "'
+
self
.
address
+
' username = '
+
username
error
=
error
+
traceback
.
format_exc
()
print
error
print
"Retrying again in 1 seconds"
...
...
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
ffc468e5
...
...
@@ -262,7 +262,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote_testc
if
operation
==
"get_all"
:
ssh
.
get_all
(
logdir_remote_testcase
,
logdir_local_base
)
elif
operation
==
"put_all"
:
ssh
.
put_all
(
logdir_
remote_testcase
,
logdir_local_base
)
ssh
.
put_all
(
logdir_
local_base
,
logdir_remote_testcase
)
else
:
print
"Error: Uknown operation in SSHSessionWrapper. Exiting now..."
sys
.
exit
(
1
)
...
...
@@ -929,13 +929,16 @@ GitOAI5GRepoBranch=''
GitOAI5GHeadVersion
=
''
user
=
''
pw
=
''
testcasegroup
=
''
NFSResultsShare
=
''
cleanUpRemoteMachines
=
False
openairdir_local
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
if
openairdir_local
is
None
:
print
"Environment variable OPENAIR_DIR not set correctly"
sys
.
exit
()
locallogdir
=
openairdir_local
+
'/cmake_targets/autotests/log/'
locallogdir
=
openairdir_local
+
'/cmake_targets/autotests/log'
MachineList
=
''
MachinneListGeneric
=
''
#Remove the contents of local log directory
#os.system(' rm -fr ' + locallogdir + '; mkdir -p ' + locallogdir )
flag_remove_logdir
=
False
...
...
@@ -987,6 +990,16 @@ while i < len (sys.argv):
elif
arg
==
'-n'
:
NFSResultsShare
=
sys
.
argv
[
i
+
1
]
i
=
i
+
1
elif
arg
==
'-MachineList'
:
MachineList
=
sys
.
argv
[
i
+
1
]
MachineList
=
MachineList
.
replace
(
"
\"
"
,
""
)
MachineList
=
MachineList
.
replace
(
"
\'
"
,
""
)
i
=
i
+
1
elif
arg
==
'-MachineListGeneric'
:
MachineListGeneric
=
sys
.
argv
[
i
+
1
]
MachineListGeneric
=
MachineListGeneric
.
replace
(
"
\"
"
,
""
)
MachineListGeneric
=
MachineListGeneric
.
replace
(
"
\'
"
,
""
)
i
=
i
+
1
elif
arg
==
'-h'
:
print
"-d: low debug level"
print
"-dd: high debug level"
...
...
@@ -1001,6 +1014,8 @@ while i < len (sys.argv):
print
"-u: use the user name passed as argument"
print
"-p: use the password passed as an argument"
print
"-n: Set the NFS share passed as an argument"
print
"-MachineList : overrides the MachineList parameter in test_case_list.xml"
print
"-MachineListGeneric : overrides the MachineListGeneric parameter in test_case_list.xml"
sys
.
exit
()
else
:
print
"Unrecongnized Option: <"
+
arg
+
">. Use -h to see valid options"
...
...
@@ -1042,7 +1057,6 @@ print "user = " + user
xmlInputFile
=
os
.
environ
.
get
(
'OPENAIR_DIR'
)
+
"/cmake_targets/autotests/test_case_list.xml"
NFSResultsDir
=
'/mnt/sradio'
cleanupOldProgramsScript
=
'$OPENAIR_DIR/cmake_targets/autotests/tools/remove_old_programs.bash'
testcasegroup
=
''
logdir
=
'/tmp/'
+
'OAITestFrameWork-'
+
user
+
'/'
logdirOAI5GRepo
=
logdir
+
'openairinterface5g/'
logdirOpenaircnRepo
=
logdir
+
'openair-cn/'
...
...
@@ -1063,8 +1077,8 @@ xmlRoot = xmlTree.getroot()
MachineList
=
xmlRoot
.
findtext
(
'MachineList'
,
default
=
''
)
if
MachineList
==
''
:
MachineList
=
xmlRoot
.
findtext
(
'MachineList'
,
default
=
''
)
NFSResultsShare
=
xmlRoot
.
findtext
(
'NFSResultsShare'
,
default
=
''
)
GitOpenaircnRepo
=
xmlRoot
.
findtext
(
'GitOpenair-cnRepo'
,
default
=
''
)
GitOAI5GRepo
=
xmlRoot
.
findtext
(
'GitOAI5GRepo'
,
default
=
''
)
...
...
@@ -1076,7 +1090,8 @@ GitOpenaircnRepoBranch = xmlRoot.findtext('GitOpenair-cnRepoBranch',default='')
CleanUpOldProgs
=
xmlRoot
.
findtext
(
'CleanUpOldProgs'
,
default
=
''
)
CleanUpAluLteBox
=
xmlRoot
.
findtext
(
'CleanUpAluLteBox'
,
default
=
''
)
Timeout_execution
=
int
(
xmlRoot
.
findtext
(
'Timeout_execution'
))
MachineListGeneric
=
xmlRoot
.
findtext
(
'MachineListGeneric'
,
default
=
''
)
if
MachineListGeneric
==
''
:
MachineListGeneric
=
xmlRoot
.
findtext
(
'MachineListGeneric'
,
default
=
''
)
TestCaseExclusionList
=
xmlRoot
.
findtext
(
'TestCaseExclusionList'
,
default
=
''
)
ExmimoRfStop
=
xmlRoot
.
findtext
(
'ExmimoRfStop'
,
default
=
''
)
...
...
@@ -1100,7 +1115,7 @@ if GitOAI5GHeadVersion == '':
print
"Error getting the OAI5GBranch Head version...Exiting"
sys
.
exit
()
NFSTestsResultsDir
=
NFSResultsShare
+
'/'
+
GitOAI5GRepoBranch
+
'/'
+
GitOAI5GHeadVersion
+
'/'
NFSTestsResultsDir
=
NFSResultsShare
+
'/'
+
GitOAI5GRepoBranch
+
'/'
+
GitOAI5GHeadVersion
print
"NFSTestsResultsDir = "
+
NFSTestsResultsDir
...
...
@@ -1338,7 +1353,6 @@ for testcase in testcaseList:
desc
=
testcase
.
findtext
(
'desc'
,
default
=
''
)
#print "Machine list top level = " + ','.join(MachineList)
if
search_test_case_group
(
testcasename
,
testcasegroup
,
TestCaseExclusionList
)
==
True
:
cleanOldProgramsAllMachines
(
oai_list
,
CleanUpOldProgs
,
CleanUpAluLteBox
,
ExmimoRfStop
)
if
testcaseclass
==
'lte-softmodem'
:
eNBMachine
=
testcase
.
findtext
(
'eNB'
,
default
=
''
)
UEMachine
=
testcase
.
findtext
(
'UE'
,
default
=
''
)
...
...
@@ -1351,11 +1365,12 @@ 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
)
cleanOldProgramsAllMachines
(
oai_list
,
CleanUpOldProgs
,
CleanUpAluLteBox
,
ExmimoRfStop
)
handle_testcaseclass_softmodem
(
testcase
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
logdirOpenaircnRepo
,
MachineList
,
user
,
pw
,
CleanUpAluLteBox
,
ExmimoRfStop
)
elif
(
testcaseclass
==
'compilation'
):
threadListGlobal
=
handle_testcaseclass_generic
(
testcasename
,
threadListGlobal
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
MachineListGeneric
,
user
,
pw
,
CleanUpAluLteBox
,
Timeout_execution
,
ExmimoRfStop
)
elif
(
testcaseclass
==
'execution'
):
threadListGlobal
=
handle_testcaseclass_generic
(
testcasename
,
threadListGlobal
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
MachineListGeneric
,
user
,
pw
,
CleanUpAluLteBox
,
ExmimoRfStop
)
threadListGlobal
=
handle_testcaseclass_generic
(
testcasename
,
threadListGlobal
,
CleanUpOldProgs
,
logdirOAI5GRepo
,
MachineListGeneric
,
user
,
pw
,
CleanUpAluLteBox
,
Timeout_execution
,
ExmimoRfStop
)
else
:
print
"Unknown test case class: "
+
testcaseclass
sys
.
exit
()
...
...
@@ -1370,13 +1385,15 @@ for testcase in testcaseList:
#sys.exit(1)
print
"Exiting the test cases execution now..."
print
"Exiting the test cases execution now.
Waiting for existing threads to complete.
.."
for
t
in
threadListGlobal
:
t
.
join
for
param
in
threadListGlobal
:
thread_id
=
param
[
"thread_id"
]
thread_id
.
join
()
print
"Creating xml file for overall results..."
cmd
=
"cat $OPENAIR_DIR/cmake_targets/autotests/log/*/*.xml > $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml "
os
.
system
(
'cmd'
)
res
=
os
.
system
(
cmd
)
print
"Now copying files to NFS Share"
oai_localhost
=
openair
(
'localdomain'
,
'localhost'
)
...
...
@@ -1388,7 +1405,7 @@ print "Deleting NFSTestResults Dir..." + res
print
"Copying files from GilabCI Runner Machine : "
+
host
+
"locallogdir = "
+
locallogdir
+
", NFSTestsResultsDir = "
+
NFSTestsResultsDir
#ssh = SSHSession(UEMachine , username=user, key_file=None, password=password)
#ssh.get_all(logdir_UE , logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
SSHSessionWrapper
(
'localhost'
,
user
,
None
,
p
assword
,
NFSTestsResultsDir
,
locallogdir
,
"put_all"
)
SSHSessionWrapper
(
'localhost'
,
user
,
None
,
p
w
,
NFSTestsResultsDir
,
locallogdir
,
"put_all"
)
sys
.
exit
()
...
...
cmake_targets/autotests/test_case_list.xml
View file @
ffc468e5
<testCaseList>
<MachineList>
calisson mozart stevens nano amerique
</MachineList>
<MachineList>
mozart calisson stevens nano
</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>
...
...
@@ -11,7 +11,7 @@
<ExmimoRfStop>
$OPENAIR_DIR/cmake_targets/build_oai -w EXMIMO -c; sudo -S -E $OPENAIR_DIR/cmake_targets/tools/stop_exmimo2; dmesg|tail
</ExmimoRfStop>
<Timeout_execution>
36000
</Timeout_execution>
<TestCaseExclusionList>
0104+ 015502 015505 015506 015507 015508 015508 015509 015510 015511 015600 015700 016102 016105
</TestCaseExclusionList>
<MachineListGeneric>
calisson stevens mozart nano amerique
</MachineListGeneric>
<MachineListGeneric>
mozart calisson stevens nano
</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