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
7d1dcd88
Commit
7d1dcd88
authored
Jan 03, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
94860050
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
6 deletions
+52
-6
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+50
-5
software/ors-amarisoft/test/test.sh
software/ors-amarisoft/test/test.sh
+2
-1
No files found.
software/ors-amarisoft/test/test.py
View file @
7d1dcd88
...
...
@@ -163,6 +163,7 @@ class ENBTestCase(AmariTestCase):
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
):
...
...
@@ -189,12 +190,56 @@ class ENBTestCase(AmariTestCase):
class
TestENB_SDR
(
ENBTestCase
):
@
classmethod
def
requestAllShared
(
cls
,
imain
):
super
().
requestAllShared
(
cls
,
imain
)
super
().
requestAllShared
(
imain
)
# SDR x {4f,4t,5f,5t}
def
SDR
(
i
):
return
{
'ru_type'
:
'sdr'
,
'ru_link_type'
:
'sdr'
,
'sdr_dev_list'
:
[
2
*
i
,
2
*
i
+
1
],
'n_antenna_dl'
:
4
,
'n_antenna_ul'
:
2
,
'tx_gain'
:
10
+
i
,
'rx_gain'
:
20
+
i
,
'txrx_active'
:
'INACTIVE'
,
}
cls
.
requestShared
(
imain
,
'SDR1'
,
SDR
(
1
))
cls
.
requestShared
(
imain
,
'SDR2'
,
SDR
(
2
))
cls
.
requestShared
(
imain
,
'SDR3'
,
SDR
(
3
))
cls
.
requestShared
(
imain
,
'SDR4'
,
SDR
(
4
))
def
CELL
(
i
,
ctx
):
cell
=
{
'ru'
:
{
'ru_type'
:
'ru_ref'
,
'ru_ref'
:
cls
.
ref
(
'SDR%d'
%
i
),
}
}
cell
.
update
(
CENB
(
i
,
i
,
0x1234
))
cell
.
update
(
ctx
)
cls
.
requestShared
(
imain
,
'SDR%d.CELL'
%
i
,
cell
)
CELL
(
1
,
FDD
|
LTE
(
100
)
|
BW
(
5
))
CELL
(
2
,
TDD
|
LTE
(
36100
)
|
BW
(
10
))
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()
conf
=
yload
(
'%s/etc/enb.cfg'
%
self
.
computer_partition_root_path
)
rf_driver
=
conf
[
'rf_driver'
]
self
.
assertEqual
(
rf_driver
[
'args'
],
'dev0=/dev/sdr2,dev1=/dev/sdr3,dev2=/dev/sdr4,dev3=/dev/sdr5,'
+
'dev4=/dev/sdr6,dev5=/dev/sdr7,dev6=/dev/sdr8,dev7=/dev/sdr9'
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
[
11
,
11
,
12
,
12
,
13
,
13
,
14
,
14
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
[
21
,
22
,
23
,
24
])
# sdr0 x 4t
# sdr1 x 4f
# sdr2 x 5t
# sdr3 x 5f
self
.
assertEqual
(
len
(
conf
[
'cell_list'
]),
2
)
self
.
assertEqual
(
len
(
conf
[
'nr_cell_list'
]),
2
)
# XXX not possible to test Lopcomm nor Sunwave because on "slapos standalone" there is no slaptap.
...
...
software/ors-amarisoft/test/test.sh
View file @
7d1dcd88
...
...
@@ -17,4 +17,5 @@ export SLAPOS_TEST_LOG_DIRECTORY=`pwd`/snapshot
#time ../k/kpython_for_test -m unittest discover -vf -k MonitorGadget
#time ../k/kpython_for_test -m unittest discover -vf -k SimCard
#time ../k/kpython_for_test -m unittest discover -vf
time
../k/kpython_for_test
-m
unittest discover
-vf
-k
TestENB_CPRI
#time ../k/kpython_for_test -m unittest discover -vf -k TestENB_CPRI
time
../k/kpython_for_test
-m
unittest discover
-vf
-k
TestENB_SDR
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