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
alex037yang
OpenXG-RAN
Commits
03ff1ef3
Commit
03ff1ef3
authored
Jun 23, 2020
by
Remi Hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 2 after review
parent
497c6110
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
131 additions
and
11 deletions
+131
-11
ci-scripts/cls_physim.py
ci-scripts/cls_physim.py
+18
-8
ci-scripts/main.py
ci-scripts/main.py
+1
-1
ci-scripts/xml_files/ldpc_gpu_test.xml
ci-scripts/xml_files/ldpc_gpu_test.xml
+112
-2
No files found.
ci-scripts/cls_physim.py
View file @
03ff1ef3
...
...
@@ -34,7 +34,8 @@ import sshconnection
#to update the HTML object
import
html
from
multiprocessing
import
SimpleQueue
#for log folder maintenance
import
os
class
PhySim
:
def
__init__
(
self
):
...
...
@@ -53,27 +54,32 @@ class PhySim:
#private attributes
self
.
__workSpacePath
=
''
self
.
__buildLogFile
=
'compile_phy_sim.log'
self
.
__runLogFile
=
'
ldpctest_run_results.log
'
self
.
__runLogFile
=
''
self
.
__runResults
=
[]
self
.
__runLogPath
=
'phy_sim_logs'
#-----------------
#PRIVATE Methods
#-----------------
def
__CheckResults_PhySim
(
self
,
HTML
,
CONST
):
def
__CheckResults_PhySim
(
self
,
HTML
,
CONST
,
testcase_id
):
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
eNBIpAddr
,
self
.
eNBUserName
,
self
.
eNBPassWord
)
#retrieve run log file and store it locally$
mySSH
.
copyin
(
self
.
eNBIpAddr
,
self
.
eNBUserName
,
self
.
eNBPassWord
,
self
.
__workSpacePath
+
self
.
__runLogFile
,
'.'
)
mySSH
.
close
()
#parse results looking for Encoding and Decoding mean values
self
.
__runResults
=
[]
with
open
(
self
.
__runLogFile
)
as
f
:
for
line
in
f
:
if
'mean'
in
line
:
self
.
__runResults
.
append
(
line
)
#the value are appended for each test, so we take the last 2 values from the list
info
=
self
.
__runResults
[
-
1
]
+
self
.
__runResults
[
-
2
]
#the value are appended for each mean value (2), so we take these 2 values from the list
info
=
self
.
__runResults
[
0
]
+
self
.
__runResults
[
1
]
#once parsed move the local logfile to its folder for tidiness
os
.
system
(
'mv '
+
self
.
__runLogFile
+
' '
+
self
.
__runLogPath
+
'/.'
)
#updating the HTML with results
html_cell
=
'<pre style="background-color:white">'
+
info
+
'</pre>'
...
...
@@ -153,7 +159,7 @@ class PhySim:
mySSH
.
command
(
'cd cmake_targets'
,
'\$'
,
5
)
mySSH
.
command
(
'mkdir -p log'
,
'\$'
,
5
)
mySSH
.
command
(
'chmod 777 log'
,
'\$'
,
5
)
mySSH
.
command
(
'stdbuf -o0 ./build_oai '
+
self
.
buildargs
+
' 2>&1 | stdbuf -o0 tee
compile_oai_enb.log'
,
'Bypassing the Tests|build have failed'
,
1500
)
mySSH
.
command
(
'stdbuf -o0 ./build_oai '
+
self
.
buildargs
+
' 2>&1 | stdbuf -o0 tee
'
+
self
.
__buildLogFile
,
'Bypassing the Tests|build have failed'
,
1500
)
mySSH
.
close
()
#check build status and update HTML object
...
...
@@ -162,7 +168,11 @@ class PhySim:
return
lHTML
def
Run_PhySim
(
self
,
htmlObj
,
constObj
):
def
Run_PhySim
(
self
,
htmlObj
,
constObj
,
testcase_id
):
#create run logs folder locally
os
.
system
(
'mkdir -p ./'
+
self
.
__runLogPath
)
#log file is tc_<testcase_id>.log remotely
self
.
__runLogFile
=
'physim_'
+
str
(
testcase_id
)
+
'.log'
#open a session for test run
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
eNBIpAddr
,
self
.
eNBUserName
,
self
.
eNBPassWord
)
...
...
@@ -172,5 +182,5 @@ class PhySim:
mySSH
.
close
()
#return updated HTML to main
lHTML
=
html
.
HTMLManagement
()
lHTML
=
self
.
__CheckResults_PhySim
(
htmlObj
,
constObj
)
lHTML
=
self
.
__CheckResults_PhySim
(
htmlObj
,
constObj
,
testcase_id
)
return
lHTML
ci-scripts/main.py
View file @
03ff1ef3
...
...
@@ -3724,7 +3724,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML
=
ldpc
.
Build_PhySim
(
HTML
,
CONST
)
if
ldpc
.
exitStatus
==
1
:
sys
.
exit
()
elif
action
==
'Run_PhySim'
:
ldpc
.
Run_PhySim
(
HTML
,
CONST
)
HTML
=
ldpc
.
Run_PhySim
(
HTML
,
CONST
,
id
)
else
:
sys
.
exit
(
'Invalid action'
)
CiTestObj
.
FailReportCnt
+=
1
...
...
ci-scripts/xml_files/ldpc_gpu_test.xml
View file @
03ff1ef3
...
...
@@ -26,7 +26,7 @@
<htmlTabName>
Test-ldpc-GPU
</htmlTabName>
<htmlTabIcon>
tasks
</htmlTabIcon>
<repeatCount>
1
</repeatCount>
<TestCaseRequestedList>
000001 000002 000003
</TestCaseRequestedList>
<TestCaseRequestedList>
000001 000002 000003
000004 000005 000006 000007 000008 000009 000010 000011 000012 000013 000014 000015 000016 000017 000018 000019 000020 000021
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase
id=
"000001"
>
...
...
@@ -38,13 +38,123 @@
<testCase
id=
"000002"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l
8448
-s10 -n100
</physim_run_args>
<physim_run_args>
-l
3872
-s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000003"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 3872 -s10 -n100 -G 1
</physim_run_args>
</testCase>
<testCase
id=
"000004"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l 4224 -s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000005"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 4224 -s10 -n100 -G 1
</physim_run_args>
</testCase>
<testCase
id=
"000006"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l 4576 -s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000007"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 4576 -s10 -n100 -G 1
</physim_run_args>
</testCase>
<testCase
id=
"000008"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l 4928 -s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000009"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 4928 -s10 -n100 -G 1
</physim_run_args>
</testCase>
<testCase
id=
"000010"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l 5280 -s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000011"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 5280 -s10 -n100 -G 1
</physim_run_args>
</testCase>
<testCase
id=
"000012"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l 5632 -s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000013"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 5632 -s10 -n100 -G 1
</physim_run_args>
</testCase>
<testCase
id=
"000014"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l 6336 -s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000015"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 6336 -s10 -n100 -G 1
</physim_run_args>
</testCase>
<testCase
id=
"000016"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l 7040 -s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000017"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 7040 -s10 -n100 -G 1
</physim_run_args>
</testCase>
<testCase
id=
"000018"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l 7744 -s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000019"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 7744 -s10 -n100 -G 1
</physim_run_args>
</testCase>
<testCase
id=
"000020"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with CPU
</desc>
<physim_run_args>
-l 8448 -s10 -n100
</physim_run_args>
</testCase>
<testCase
id=
"000021"
>
<class>
Run_PhySim
</class>
<desc>
Run LDPC Test with GPU
</desc>
<physim_run_args>
-l 8448 -s10 -n100 -G 1
</physim_run_args>
</testCase>
</testCaseList>
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