Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
af0f4161
Commit
af0f4161
authored
Jan 09, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1a532ff5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
22 deletions
+7
-22
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+7
-22
No files found.
software/ors-amarisoft/test/test.py
View file @
af0f4161
...
@@ -174,7 +174,8 @@ class ENBTestCase(AmariTestCase):
...
@@ -174,7 +174,8 @@ class ENBTestCase(AmariTestCase):
# XXX doc 4 RU x 4 CELL (4f,4t,5f,5t) RUcfg
# XXX doc 4 RU x 4 CELL (4f,4t,5f,5t) RUcfg
def
RU
(
i
):
def
RU
(
i
):
ru
=
cls
.
RUcfg
(
i
)
ru
=
cls
.
RUcfg
(
i
)
ru
=
ru
|
{
'tx_gain'
:
10
+
i
,
'rx_gain'
:
20
+
i
,
'txrx_active'
:
'INACTIVE'
}
ru
|=
{
'n_antenna_dl'
:
4
,
'n_antenna_ul'
:
2
}
ru
|=
{
'tx_gain'
:
10
+
i
,
'rx_gain'
:
20
+
i
,
'txrx_active'
:
'INACTIVE'
}
cls
.
requestShared
(
imain
,
'RU%d'
%
i
,
ru
)
cls
.
requestShared
(
imain
,
'RU%d'
%
i
,
ru
)
def
CELL
(
i
,
ctx
):
def
CELL
(
i
,
ctx
):
...
@@ -224,27 +225,13 @@ class ENBTestCase(AmariTestCase):
...
@@ -224,27 +225,13 @@ class ENBTestCase(AmariTestCase):
# --------
# --------
# basic enb parameters
def
test_enb_conf_basic
(
t
):
def
test_enb_conf_basic
(
t
):
assertMatch
(
t
,
t
.
enb_cfg
,
dict
(
assertMatch
(
t
,
t
.
enb_cfg
,
dict
(
enb_id
=
0x17
,
gnb_id
=
0x23
,
gnb_id_bits
=
30
,
enb_id
=
0x17
,
gnb_id
=
0x23
,
gnb_id_bits
=
30
,
x2_peers
=
[
'44.1.1.1'
],
xn_peers
=
[
'55.1.1.1'
],
x2_peers
=
[
'44.1.1.1'
],
xn_peers
=
[
'55.1.1.1'
],
))
))
# XXX kill
"""
# HO(inter)
for cell in t.enb_cfg['cell_list'] + t.enb_cfg['nr_cell_list']:
have = {
'cell_id': cell['cell_id'],
'ncell_list_tail': cell['ncell_list'] [-len(t.ho_inter):]
}
want = {
'cell_id': cell['cell_id'],
'ncell_list_tail': t.ho_inter
}
assertMatch(t, have, want)
"""
# basic cell parameters
# basic cell parameters
def
test_enb_conf_cell
(
t
):
def
test_enb_conf_cell
(
t
):
assertMatch
(
t
,
t
.
enb_cfg
[
'cell_list'
],
[
assertMatch
(
t
,
t
.
enb_cfg
[
'cell_list'
],
[
...
@@ -353,16 +340,14 @@ class TestENB_SDR(ENBTestCase):
...
@@ -353,16 +340,14 @@ class TestENB_SDR(ENBTestCase):
'ru_type'
:
'sdr'
,
'ru_type'
:
'sdr'
,
'ru_link_type'
:
'sdr'
,
'ru_link_type'
:
'sdr'
,
'sdr_dev_list'
:
[
2
*
i
,
2
*
i
+
1
],
'sdr_dev_list'
:
[
2
*
i
,
2
*
i
+
1
],
'n_antenna_dl'
:
4
,
'n_antenna_ul'
:
2
,
}
}
# radio units configuration
# radio units configuration
def
test_enb_conf_ru
(
t
):
def
test_enb_conf_ru
(
t
):
rf_driver
=
t
.
enb_cfg
[
'rf_driver'
]
assertMatch
(
t
,
t
.
enb_cfg
[
'rf_driver'
],
{
t
.
assertEqual
(
rf_driver
[
'args'
],
'args'
:
'dev0=/dev/sdr2,dev1=/dev/sdr3,dev2=/dev/sdr4,dev3=/dev/sdr5,'
+
'dev0=/dev/sdr2,dev1=/dev/sdr3,dev2=/dev/sdr4,dev3=/dev/sdr5,'
+
'dev4=/dev/sdr6,dev5=/dev/sdr7,dev6=/dev/sdr8,dev7=/dev/sdr9'
,
'dev4=/dev/sdr6,dev5=/dev/sdr7,dev6=/dev/sdr8,dev7=/dev/sdr9'
)
}
)
# XXX -> generic ? XXX no (for cpri case it is all 0 here)
# XXX -> generic ? XXX no (for cpri case it is all 0 here)
t
.
assertEqual
(
t
.
enb_cfg
[
'tx_gain'
],
[
11
]
*
4
+
[
12
]
*
4
+
[
13
]
*
4
+
[
14
]
*
4
)
t
.
assertEqual
(
t
.
enb_cfg
[
'tx_gain'
],
[
11
]
*
4
+
[
12
]
*
4
+
[
13
]
*
4
+
[
14
]
*
4
)
...
...
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