Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Lu Xu
slapos
Commits
d4e0e7a1
Commit
d4e0e7a1
authored
Jan 05, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
16371ba0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+22
-18
No files found.
software/ors-amarisoft/test/test.py
View file @
d4e0e7a1
...
...
@@ -116,6 +116,7 @@ def XN_PEER(xn_addr):
# XXX doc
# XXX approach is to test generated enb.cfg
class
ENBTestCase
(
AmariTestCase
):
maxDiff
=
None
# want to see full diff in test run log on an error
...
...
@@ -138,17 +139,7 @@ class ENBTestCase(AmariTestCase):
cls
.
requestAllShared
(
inst
)
return
inst
# ref returns full reference of shared instance with given subreference.
#
# for example if reference of main instance is 'MAIN-INSTANCE'
#
# ref('RU') = 'MAIN-INSTANCE.RU'
@
classmethod
def
ref
(
cls
,
subref
):
return
'%s.%s'
%
(
cls
.
default_partition_reference
,
subref
)
# requestAllShared adds all shared instances of the testcase over imain.
# XXX -> addShared? initShared?
@
classmethod
def
requestAllShared
(
cls
,
imain
):
def
_
(
subref
,
ctx
):
...
...
@@ -172,16 +163,28 @@ class ENBTestCase(AmariTestCase):
software_release
=
cls
.
getSoftwareURL
(),
software_type
=
cls
.
getInstanceSoftwareType
(),
partition_reference
=
cls
.
ref
(
subref
),
#filter_kw = {'instance_guid': imain.getInstanceGuid()}, XXX "Can only request on embedded computer"
# XXX StandaloneSlapOS rejects filter_kw with "Can only request on embedded computer"
#filter_kw = {'instance_guid': imain.getInstanceGuid()},
partition_parameter_kw
=
{
'_'
:
json
.
dumps
(
ctx
)},
shared
=
True
)
# ref returns full reference of shared instance with given subreference.
#
# for example if reference of main instance is 'MAIN-INSTANCE'
#
# ref('RU') = 'MAIN-INSTANCE.RU'
@
classmethod
def
ref
(
cls
,
subref
):
return
'%s.%s'
%
(
cls
.
default_partition_reference
,
subref
)
# ipath returns path for a file inside main instance.
def
ipath
(
self
,
path
):
assert
path
[:
1
]
!=
'/'
,
path
return
'%s/%s'
%
(
self
.
computer_partition_root_path
,
path
)
def
test_enb_conf
(
self
):
# --------
def
test_enb_conf_basic
(
self
):
conf
=
yamlpp_load
(
self
.
ipath
(
'etc/enb.cfg'
))
assertMatch
(
self
,
conf
,
dict
(
...
...
@@ -243,9 +246,7 @@ class TestENB_SDR(ENBTestCase):
CELL
(
3
,
FDD
|
NR
(
430100
,
1
)
|
BW
(
15
))
CELL
(
4
,
TDD
|
NR
(
510100
,
41
)
|
BW
(
20
))
def
test_enb_conf
(
self
):
super
().
test_enb_conf
()
def
test_enb_conf_ru
(
self
):
conf
=
yamlpp_load
(
self
.
ipath
(
'etc/enb.cfg'
))
rf_driver
=
conf
[
'rf_driver'
]
...
...
@@ -256,10 +257,11 @@ class TestENB_SDR(ENBTestCase):
self
.
assertEqual
(
conf
[
'tx_gain'
],
[
11
]
*
4
+
[
12
]
*
4
+
[
13
]
*
4
+
[
14
]
*
4
)
self
.
assertEqual
(
conf
[
'rx_gain'
],
[
21
]
*
2
+
[
22
]
*
2
+
[
23
]
*
2
+
[
24
]
*
2
)
# basic cell parameters
def
test_enb_conf_cell
(
self
):
cell_list
=
conf
[
'cell_list'
]
nr_cell_list
=
conf
[
'nr_cell_list'
]
# basic cell parameters
assertMatch
(
self
,
cell_list
,
[
dict
(
# CELL1
uldl_config
=
NO
,
rf_port
=
0
,
n_antenna_dl
=
4
,
n_antenna_ul
=
2
,
...
...
@@ -299,7 +301,8 @@ class TestENB_SDR(ENBTestCase):
])
# Carrier Aggregation
# Carrier Aggregation
def
test_enb_conf_ca
(
self
):
assertMatch
(
self
,
cell_list
,
[
{
# CELL1
'scell_list'
:
[{
'cell_id'
:
0x2
}],
# LTE + LTE
...
...
@@ -321,7 +324,8 @@ class TestENB_SDR(ENBTestCase):
])
# Handover
# Handover
def
test_enb_conf_ho
(
self
):
assertMatch
(
self
,
cell_list
,
[
{
# CELL1
'ncell_list'
:
[
...
...
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