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
Léo-Paul Géneau
slapos
Commits
1efb2bce
Commit
1efb2bce
authored
Jul 17, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/ors-amarisoft: add and fix tests
parent
46fedff2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
15 deletions
+27
-15
software/ors-amarisoft/test/test.jinja2.py
software/ors-amarisoft/test/test.jinja2.py
+9
-5
software/ors-amarisoft/test/testFDD.py
software/ors-amarisoft/test/testFDD.py
+9
-5
software/ors-amarisoft/test/testTDD.py
software/ors-amarisoft/test/testTDD.py
+9
-5
No files found.
software/ors-amarisoft/test/test.jinja2.py
View file @
1efb2bce
...
...
@@ -74,7 +74,7 @@ param_dict = {
'10.0.0.1'
:
{
'amf_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'amf_addr'
:
'2001:db8::1'
},
},
'nr_handover_time_to_trigger'
:
5
0
,
'nr_handover_time_to_trigger'
:
4
0
,
'nr_handover_a3_offset'
:
10
,
'ncell_list'
:
{
'ORS1'
:
{
...
...
@@ -104,25 +104,27 @@ param_dict = {
'xn_addr'
:
'2001:db8::2'
,
},
},
'tdd_ul_dl_config'
:
'2.5ms 1UL 3DL 2/10'
,
}
enb_param_dict
=
{
'plmn_list'
:
{
'00101'
:
{
'attach_without_pdn'
:
True
,
'plmn'
:
'00101'
,
'reserved'
:
True
},
'00102'
:
{
'attach_without_pdn'
:
False
,
'plmn'
:
'00102'
,
'reserved'
:
False
},
},
'tdd_ul_dl_config'
:
'[Configuration 6] 5ms 5UL 3DL (maximum uplink)'
,
}
gnb_param_dict1
=
{
'plmn_list'
:
{
'00101'
:
{
'plmn'
:
'00101'
,
'ranac'
:
1
,
'reserved'
:
True
,
'tac'
:
1
},
'00102'
:
{
'plmn'
:
'00102'
,
'ranac'
:
2
,
'reserved'
:
False
,
'tac'
:
2
},
},
'tdd_ul_dl_config'
:
'2.5ms 1UL 3DL 2/10'
,
}
gnb_param_dict2
=
{
'nssai'
:
{
'0x171717'
:
{
'sd'
:
'0x171717'
,
'sst'
:
10
},
'0x181818'
:
{
'sd'
:
'0x181818'
,
'sst'
:
20
},
},
'tdd_ul_dl_config'
:
'2.5ms 1UL 3DL 2/10'
,
}
enb_param_dict
.
update
(
param_dict
)
gnb_param_dict1
.
update
(
param_dict
)
...
...
@@ -138,10 +140,11 @@ def test_enb_conf(self):
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
enb_param_dict
[
'tac'
]
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
)
)
for
p
in
conf
[
'cell_list'
][
0
][
'plmn_list'
]:
for
n
in
"plmn attach_without_pdn reserved"
.
split
():
self
.
assertEqual
(
p
[
n
],
enb_param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
...
...
@@ -210,8 +213,9 @@ def test_gnb_conf2(self):
conf
=
yaml
.
load
(
f
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
for
n
in
"sd sst"
.
split
():
self
.
assertEqual
(
p
[
n
],
gnb_param_dict2
[
'nssai'
][
p
[
'sd'
]][
n
])
sd
=
hex
(
p
[
'sd'
])
self
.
assertEqual
(
sd
,
gnb_param_dict2
[
'nssai'
][
sd
][
'sd'
],
16
)
self
.
assertEqual
(
p
[
'sst'
],
gnb_param_dict2
[
'nssai'
][
sd
][
'sst'
])
def
test_mme_conf
(
self
):
...
...
software/ors-amarisoft/test/testFDD.py
View file @
1efb2bce
...
...
@@ -74,7 +74,7 @@ param_dict = {
'10.0.0.1'
:
{
'amf_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'amf_addr'
:
'2001:db8::1'
},
},
'nr_handover_time_to_trigger'
:
5
0
,
'nr_handover_time_to_trigger'
:
4
0
,
'nr_handover_a3_offset'
:
10
,
'ncell_list'
:
{
'ORS1'
:
{
...
...
@@ -104,25 +104,27 @@ param_dict = {
'xn_addr'
:
'2001:db8::2'
,
},
},
'tdd_ul_dl_config'
:
'2.5ms 1UL 3DL 2/10'
,
}
enb_param_dict
=
{
'plmn_list'
:
{
'00101'
:
{
'attach_without_pdn'
:
True
,
'plmn'
:
'00101'
,
'reserved'
:
True
},
'00102'
:
{
'attach_without_pdn'
:
False
,
'plmn'
:
'00102'
,
'reserved'
:
False
},
},
'tdd_ul_dl_config'
:
'[Configuration 6] 5ms 5UL 3DL (maximum uplink)'
,
}
gnb_param_dict1
=
{
'plmn_list'
:
{
'00101'
:
{
'plmn'
:
'00101'
,
'ranac'
:
1
,
'reserved'
:
True
,
'tac'
:
1
},
'00102'
:
{
'plmn'
:
'00102'
,
'ranac'
:
2
,
'reserved'
:
False
,
'tac'
:
2
},
},
'tdd_ul_dl_config'
:
'2.5ms 1UL 3DL 2/10'
,
}
gnb_param_dict2
=
{
'nssai'
:
{
'0x171717'
:
{
'sd'
:
'0x171717'
,
'sst'
:
10
},
'0x181818'
:
{
'sd'
:
'0x181818'
,
'sst'
:
20
},
},
'tdd_ul_dl_config'
:
'2.5ms 1UL 3DL 2/10'
,
}
enb_param_dict
.
update
(
param_dict
)
gnb_param_dict1
.
update
(
param_dict
)
...
...
@@ -138,10 +140,11 @@ def test_enb_conf(self):
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
enb_param_dict
[
'tac'
]
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
)
)
for
p
in
conf
[
'cell_list'
][
0
][
'plmn_list'
]:
for
n
in
"plmn attach_without_pdn reserved"
.
split
():
self
.
assertEqual
(
p
[
n
],
enb_param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
...
...
@@ -210,8 +213,9 @@ def test_gnb_conf2(self):
conf
=
yaml
.
load
(
f
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
for
n
in
"sd sst"
.
split
():
self
.
assertEqual
(
p
[
n
],
gnb_param_dict2
[
'nssai'
][
p
[
'sd'
]][
n
])
sd
=
hex
(
p
[
'sd'
])
self
.
assertEqual
(
sd
,
gnb_param_dict2
[
'nssai'
][
sd
][
'sd'
],
16
)
self
.
assertEqual
(
p
[
'sst'
],
gnb_param_dict2
[
'nssai'
][
sd
][
'sst'
])
def
test_mme_conf
(
self
):
...
...
software/ors-amarisoft/test/testTDD.py
View file @
1efb2bce
...
...
@@ -74,7 +74,7 @@ param_dict = {
'10.0.0.1'
:
{
'amf_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'amf_addr'
:
'2001:db8::1'
},
},
'nr_handover_time_to_trigger'
:
5
0
,
'nr_handover_time_to_trigger'
:
4
0
,
'nr_handover_a3_offset'
:
10
,
'ncell_list'
:
{
'ORS1'
:
{
...
...
@@ -104,25 +104,27 @@ param_dict = {
'xn_addr'
:
'2001:db8::2'
,
},
},
'tdd_ul_dl_config'
:
'2.5ms 1UL 3DL 2/10'
,
}
enb_param_dict
=
{
'plmn_list'
:
{
'00101'
:
{
'attach_without_pdn'
:
True
,
'plmn'
:
'00101'
,
'reserved'
:
True
},
'00102'
:
{
'attach_without_pdn'
:
False
,
'plmn'
:
'00102'
,
'reserved'
:
False
},
},
'tdd_ul_dl_config'
:
'[Configuration 6] 5ms 5UL 3DL (maximum uplink)'
,
}
gnb_param_dict1
=
{
'plmn_list'
:
{
'00101'
:
{
'plmn'
:
'00101'
,
'ranac'
:
1
,
'reserved'
:
True
,
'tac'
:
1
},
'00102'
:
{
'plmn'
:
'00102'
,
'ranac'
:
2
,
'reserved'
:
False
,
'tac'
:
2
},
},
'tdd_ul_dl_config'
:
'2.5ms 1UL 3DL 2/10'
,
}
gnb_param_dict2
=
{
'nssai'
:
{
'0x171717'
:
{
'sd'
:
'0x171717'
,
'sst'
:
10
},
'0x181818'
:
{
'sd'
:
'0x181818'
,
'sst'
:
20
},
},
'tdd_ul_dl_config'
:
'2.5ms 1UL 3DL 2/10'
,
}
enb_param_dict
.
update
(
param_dict
)
gnb_param_dict1
.
update
(
param_dict
)
...
...
@@ -138,10 +140,11 @@ def test_enb_conf(self):
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
enb_param_dict
[
'tac'
]
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
)
)
for
p
in
conf
[
'cell_list'
][
0
][
'plmn_list'
]:
for
n
in
"plmn attach_without_pdn reserved"
.
split
():
self
.
assertEqual
(
p
[
n
],
enb_param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
...
...
@@ -210,8 +213,9 @@ def test_gnb_conf2(self):
conf
=
yaml
.
load
(
f
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
for
n
in
"sd sst"
.
split
():
self
.
assertEqual
(
p
[
n
],
gnb_param_dict2
[
'nssai'
][
p
[
'sd'
]][
n
])
sd
=
hex
(
p
[
'sd'
])
self
.
assertEqual
(
sd
,
gnb_param_dict2
[
'nssai'
][
sd
][
'sd'
],
16
)
self
.
assertEqual
(
p
[
'sst'
],
gnb_param_dict2
[
'nssai'
][
sd
][
'sst'
])
def
test_mme_conf
(
self
):
...
...
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