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
spbro
OpenXG-RAN
Commits
b9e56104
Commit
b9e56104
authored
Sep 20, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused CI code
parent
29383373
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
42 deletions
+3
-42
ci-scripts/cls_oai_html.py
ci-scripts/cls_oai_html.py
+2
-16
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+0
-9
ci-scripts/main.py
ci-scripts/main.py
+1
-17
No files found.
ci-scripts/cls_oai_html.py
View file @
b9e56104
...
...
@@ -65,10 +65,6 @@ class HTMLManagement():
self
.
htmlTabIcons
=
[]
self
.
testXMLfiles
=
[]
self
.
testUnstable
=
False
self
.
testMinStableId
=
'999999'
self
.
testStabilityPointReached
=
False
self
.
htmleNBFailureMsg
=
''
self
.
htmlUEFailureMsg
=
''
...
...
@@ -219,20 +215,13 @@ class HTMLManagement():
def
CreateHtmlTabFooter
(
self
,
passStatus
):
if
((
not
self
.
htmlFooterCreated
)
and
(
self
.
htmlHeaderCreated
)):
testOkEvenIfUnstable
=
False
if
self
.
testUnstable
and
not
passStatus
:
if
self
.
testStabilityPointReached
or
self
.
testMinStableId
==
'999999'
:
testOkEvenIfUnstable
=
True
self
.
htmlFile
=
open
(
'test_results.html'
,
'a'
)
self
.
htmlFile
.
write
(
' <tr>
\n
'
)
self
.
htmlFile
.
write
(
' <th bgcolor = "#33CCFF" colspan="3">Final Tab Status</th>
\n
'
)
if
passStatus
:
self
.
htmlFile
.
write
(
' <th bgcolor = "green" colspan="3"><font color="white">PASS <span class="glyphicon glyphicon-ok"></span> </font></th>
\n
'
)
else
:
if
testOkEvenIfUnstable
:
self
.
htmlFile
.
write
(
' <th bgcolor = "orange" colspan="3"><font color="white">KNOWN UNSTABLE SCENARIO <span class="glyphicon glyphicon-exclamation-sign"></span> </font></th>
\n
'
)
else
:
self
.
htmlFile
.
write
(
' <th bgcolor = "red" colspan="3"><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>
\n
'
)
self
.
htmlFile
.
write
(
' <th bgcolor = "red" colspan="3"><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>
\n
'
)
self
.
htmlFile
.
write
(
' </tr>
\n
'
)
self
.
htmlFile
.
write
(
' </table>
\n
'
)
self
.
htmlFile
.
write
(
' </div>
\n
'
)
...
...
@@ -242,10 +231,7 @@ class HTMLManagement():
cmd
=
"sed -i -e 's/__STATE_"
+
self
.
htmlTabNames
[
0
]
+
"__//' test_results.html"
subprocess
.
run
(
cmd
,
shell
=
True
)
else
:
if
testOkEvenIfUnstable
:
cmd
=
"sed -i -e 's/__STATE_"
+
self
.
htmlTabNames
[
0
]
+
"__/<span class=
\"
glyphicon glyphicon-exclamation-sign
\"
><\/span>/' test_results.html"
else
:
cmd
=
"sed -i -e 's/__STATE_"
+
self
.
htmlTabNames
[
0
]
+
"__/<span class=
\"
glyphicon glyphicon-remove
\"
><\/span>/' test_results.html"
cmd
=
"sed -i -e 's/__STATE_"
+
self
.
htmlTabNames
[
0
]
+
"__/<span class=
\"
glyphicon glyphicon-remove
\"
><\/span>/' test_results.html"
subprocess
.
run
(
cmd
,
shell
=
True
)
self
.
htmlFooterCreated
=
False
...
...
ci-scripts/cls_oaicitest.py
View file @
b9e56104
...
...
@@ -235,9 +235,6 @@ class OaiCiTest():
self
.
FailReportCnt
=
0
self
.
testCase_id
=
''
self
.
testXMLfiles
=
[]
self
.
testUnstable
=
False
self
.
testMinStableId
=
'999999'
self
.
testStabilityPointReached
=
False
self
.
desc
=
''
self
.
ping_args
=
''
self
.
ping_packetloss_threshold
=
''
...
...
@@ -975,12 +972,6 @@ class OaiCiTest():
SSH
.
command
(
f'echo
{
self
.
UEPassword
}
| sudo -S rm ue*.log core* ue_*record.raw ue_*.pcap ue_*txt'
,
'\$'
,
5
)
SSH
.
close
()
def
ConditionalExit
(
self
):
if
self
.
testUnstable
:
if
self
.
testStabilityPointReached
or
self
.
testMinStableId
==
'999999'
:
sys
.
exit
(
0
)
sys
.
exit
(
1
)
def
ShowTestID
(
self
):
logging
.
info
(
f'
\u001B
[1m----------------------------------------
\u001B
[0m'
)
logging
.
info
(
f'
\u001B
[1m Test ID:
{
self
.
testCase_id
}
\u001B
[0m'
)
...
...
ci-scripts/main.py
View file @
b9e56104
...
...
@@ -596,14 +596,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML
.
htmlTabRefs
.
append
(
xmlRoot
.
findtext
(
'htmlTabRef'
,
default
=
'test-tab-0'
))
HTML
.
htmlTabNames
.
append
(
xmlRoot
.
findtext
(
'htmlTabName'
,
default
=
'Test-0'
))
repeatCount
=
xmlRoot
.
findtext
(
'repeatCount'
,
default
=
'1'
)
testStability
=
xmlRoot
.
findtext
(
'TestUnstable'
,
default
=
'False'
)
CiTestObj
.
repeatCounts
.
append
(
int
(
repeatCount
))
if
testStability
==
'True'
:
CiTestObj
.
testUnstable
=
True
HTML
.
testUnstable
=
True
CiTestObj
.
testMinStableId
=
xmlRoot
.
findtext
(
'TestMinId'
,
default
=
'999999'
)
HTML
.
testMinStableId
=
CiTestObj
.
testMinStableId
logging
.
warning
(
'Test is tagged as Unstable -- starting from TestID '
+
str
(
CiTestObj
.
testMinStableId
))
all_tests
=
xmlRoot
.
findall
(
'testCase'
)
exclusion_tests
=
exclusion_tests
.
split
()
...
...
@@ -829,20 +822,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
logging
.
error
(
f'while running CI, an exception occurred:
\n
{
s
}
'
)
HTML
.
CreateHtmlTestRowQueue
(
"N/A"
,
'KO'
,
[
f"CI test code encountered an exception:
\n
{
s
}
"
])
RAN
.
prematureExit
=
True
if
RAN
.
prematureExit
:
if
CiTestObj
.
testCase_id
==
CiTestObj
.
testMinStableId
:
logging
.
warning
(
'Scenario has reached minimal stability point'
)
CiTestObj
.
testStabilityPointReached
=
True
HTML
.
testStabilityPointReached
=
True
CiTestObj
.
FailReportCnt
+=
1
if
CiTestObj
.
FailReportCnt
==
CiTestObj
.
repeatCounts
[
0
]
and
RAN
.
prematureExit
:
logging
.
error
(
'
\u001B
[1;37;41mScenario failed '
+
str
(
CiTestObj
.
FailReportCnt
)
+
' time(s)
\u001B
[0m'
)
HTML
.
CreateHtmlTabFooter
(
False
)
if
CiTestObj
.
testUnstable
and
(
CiTestObj
.
testStabilityPointReached
or
CiTestObj
.
testMinStableId
==
'999999'
):
logging
.
warning
(
'
\u001B
[1;30;43mScenario has reached minimal stability point -- Not a Failure
\u001B
[0m'
)
else
:
sys
.
exit
(
'Failed Scenario'
)
sys
.
exit
(
'Failed Scenario'
)
else
:
logging
.
info
(
'
\u001B
[1;37;42mScenario passed after '
+
str
(
CiTestObj
.
FailReportCnt
)
+
' time(s)
\u001B
[0m'
)
HTML
.
CreateHtmlTabFooter
(
True
)
...
...
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