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
zzha zzha
OpenXG-RAN
Commits
b0e5b6eb
Commit
b0e5b6eb
authored
Aug 23, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Run_NRulsimTest
parent
aa1cbff5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
5 deletions
+54
-5
ci-scripts/cls_physim.py
ci-scripts/cls_physim.py
+48
-4
ci-scripts/main.py
ci-scripts/main.py
+5
-1
ci-scripts/xml_class_list.yml
ci-scripts/xml_class_list.yml
+1
-0
No files found.
ci-scripts/cls_physim.py
View file @
b0e5b6eb
...
@@ -56,7 +56,6 @@ class PhySim:
...
@@ -56,7 +56,6 @@ class PhySim:
self
.
__workSpacePath
=
''
self
.
__workSpacePath
=
''
self
.
__buildLogFile
=
'compile_phy_sim.log'
self
.
__buildLogFile
=
'compile_phy_sim.log'
self
.
__runLogFile
=
''
self
.
__runLogFile
=
''
self
.
__runResults
=
[]
self
.
__runLogPath
=
'phy_sim_logs'
self
.
__runLogPath
=
'phy_sim_logs'
...
@@ -71,13 +70,13 @@ class PhySim:
...
@@ -71,13 +70,13 @@ class PhySim:
mySSH
.
copyin
(
self
.
eNBIpAddr
,
self
.
eNBUserName
,
self
.
eNBPassWord
,
self
.
__workSpacePath
+
self
.
__runLogFile
,
'.'
)
mySSH
.
copyin
(
self
.
eNBIpAddr
,
self
.
eNBUserName
,
self
.
eNBPassWord
,
self
.
__workSpacePath
+
self
.
__runLogFile
,
'.'
)
mySSH
.
close
()
mySSH
.
close
()
#parse results looking for Encoding and Decoding mean values
#parse results looking for Encoding and Decoding mean values
self
.
__
runResults
=
[]
runResults
=
[]
with
open
(
self
.
__runLogFile
)
as
f
:
with
open
(
self
.
__runLogFile
)
as
f
:
for
line
in
f
:
for
line
in
f
:
if
'mean'
in
line
:
if
'mean'
in
line
:
self
.
__
runResults
.
append
(
line
)
runResults
.
append
(
line
)
#the values are appended for each mean value (2), so we take these 2 values from the list
#the values are appended for each mean value (2), so we take these 2 values from the list
info
=
self
.
__runResults
[
0
]
+
self
.
__
runResults
[
1
]
info
=
runResults
[
0
]
+
runResults
[
1
]
#once parsed move the local logfile to its folder for tidiness
#once parsed move the local logfile to its folder for tidiness
os
.
system
(
'mv '
+
self
.
__runLogFile
+
' '
+
self
.
__runLogPath
+
'/.'
)
os
.
system
(
'mv '
+
self
.
__runLogFile
+
' '
+
self
.
__runLogPath
+
'/.'
)
...
@@ -89,6 +88,38 @@ class PhySim:
...
@@ -89,6 +88,38 @@ class PhySim:
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'OK'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'OK'
,
1
,
html_queue
)
return
HTML
return
HTML
def
__CheckResults_NRulsimTest
(
self
,
HTML
,
CONST
,
testcase_id
):
html_queue
=
SimpleQueue
()
#retrieve run log file and store it locally
mySSH
=
sshconnection
.
SSHConnection
()
filename
=
self
.
__workSpacePath
+
self
.
__runLogFile
ret
=
mySSH
.
copyin
(
self
.
eNBIpAddr
,
self
.
eNBUserName
,
self
.
eNBPassWord
,
filename
,
'.'
)
if
ret
!=
0
:
error_msg
=
f'could not recover test result file
{
filename
}
'
logging
.
error
(
error_msg
)
html_queue
.
put
(
f'<pre style="background-color:white">
{
error_msg
}
</pre>'
)
HTML
.
CreateHtmlTestRowQueue
(
"could not recover results"
,
'KO'
,
1
,
html_queue
)
self
.
exitStatus
=
1
return
HTML
PUSCH_OK
=
False
with
open
(
self
.
__runLogFile
)
as
f
:
PUSCH_OK
=
'PUSCH test OK'
in
f
.
read
()
# once parsed move the local logfile to its folder for tidiness
os
.
system
(
f'mv
{
self
.
__runLogFile
}
{
self
.
__runLogPath
}
/.'
)
#updating the HTML with results
if
PUSCH_OK
:
html_queue
.
put
(
'<pre style="background-color:white">succeeded</pre>'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'OK'
,
1
,
html_queue
)
else
:
error_msg
=
'error: no "PUSCH test OK"'
logging
.
error
(
error_msg
)
html_queue
.
put
(
f'<pre style="background-color:white">
{
error_msg
}
</pre>'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'KO'
,
1
,
html_queue
)
self
.
exitStatus
=
1
return
HTML
def
__CheckBuild_PhySim
(
self
,
HTML
,
CONST
):
def
__CheckBuild_PhySim
(
self
,
HTML
,
CONST
):
self
.
__workSpacePath
=
self
.
eNBSourceCodePath
+
'/cmake_targets/'
self
.
__workSpacePath
=
self
.
eNBSourceCodePath
+
'/cmake_targets/'
...
@@ -183,3 +214,16 @@ class PhySim:
...
@@ -183,3 +214,16 @@ class PhySim:
lHTML
=
cls_oai_html
.
HTMLManagement
()
lHTML
=
cls_oai_html
.
HTMLManagement
()
lHTML
=
self
.
__CheckResults_LDPCTest
(
htmlObj
,
constObj
,
testcase_id
)
lHTML
=
self
.
__CheckResults_LDPCTest
(
htmlObj
,
constObj
,
testcase_id
)
return
lHTML
return
lHTML
def
Run_NRulsimTest
(
self
,
htmlObj
,
constObj
,
testcase_id
):
self
.
__workSpacePath
=
self
.
eNBSourceCodePath
+
'/cmake_targets/'
os
.
system
(
f'mkdir -p ./
{
self
.
__runLogPath
}
'
)
self
.
__runLogFile
=
f'physim_
{
testcase_id
}
.log'
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
eNBIpAddr
,
self
.
eNBUserName
,
self
.
eNBPassWord
)
mySSH
.
command
(
f'cd
{
self
.
__workSpacePath
}
'
,
'\$'
,
5
)
mySSH
.
command
(
f'sudo
{
self
.
__workSpacePath
}
ran_build/build/nr_ulsim
{
self
.
runargs
}
>
{
self
.
__runLogFile
}
2>&1'
,
'\$'
,
30
)
mySSH
.
close
()
#return updated HTML to main
lHTML
=
self
.
__CheckResults_NRulsimTest
(
htmlObj
,
constObj
,
testcase_id
)
return
lHTML
ci-scripts/main.py
View file @
b0e5b6eb
...
@@ -457,7 +457,7 @@ def GetParametersFromXML(action):
...
@@ -457,7 +457,7 @@ def GetParametersFromXML(action):
if
(
string_field
is
not
None
):
if
(
string_field
is
not
None
):
CONTAINERS
.
testSvrId
=
string_field
CONTAINERS
.
testSvrId
=
string_field
elif
action
==
'Run_LDPCTest'
:
elif
action
==
'Run_LDPCTest'
or
action
==
'Run_NRulsimTest'
:
ldpc
.
runargs
=
test
.
findtext
(
'physim_run_args'
)
ldpc
.
runargs
=
test
.
findtext
(
'physim_run_args'
)
else
:
else
:
...
@@ -923,6 +923,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -923,6 +923,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML
=
ldpc
.
Run_LDPCTest
(
HTML
,
CONST
,
id
)
HTML
=
ldpc
.
Run_LDPCTest
(
HTML
,
CONST
,
id
)
if
ldpc
.
exitStatus
==
1
:
if
ldpc
.
exitStatus
==
1
:
RAN
.
prematureExit
=
True
RAN
.
prematureExit
=
True
elif
action
==
'Run_NRulsimTest'
:
HTML
=
ldpc
.
Run_NRulsimTest
(
HTML
,
CONST
,
id
)
if
ldpc
.
exitStatus
==
1
:
RAN
.
prematureExit
=
True
elif
action
==
'Build_Image'
:
elif
action
==
'Build_Image'
:
CONTAINERS
.
BuildImage
(
HTML
)
CONTAINERS
.
BuildImage
(
HTML
)
elif
action
==
'Build_Proxy'
:
elif
action
==
'Build_Proxy'
:
...
...
ci-scripts/xml_class_list.yml
View file @
b0e5b6eb
-
Build_Proxy
-
Build_Proxy
-
Build_PhySim
-
Build_PhySim
-
Run_LDPCTest
-
Run_LDPCTest
-
Run_NRulsimTest
-
Build_eNB
-
Build_eNB
-
WaitEndBuild_eNB
-
WaitEndBuild_eNB
-
Initialize_eNB
-
Initialize_eNB
...
...
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