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
e11a0fbe
Commit
e11a0fbe
authored
Dec 28, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e42e82bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
20 deletions
+23
-20
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+18
-0
software/ors-amarisoft/test/test.sh
software/ors-amarisoft/test/test.sh
+2
-2
software/ors-amarisoft/test/test_ors.py
software/ors-amarisoft/test/test_ors.py
+3
-18
No files found.
software/ors-amarisoft/test/test.py
View file @
e11a0fbe
...
...
@@ -17,6 +17,9 @@
# See https://www.nexedi.com/licensing for rationale and options.
import
os
import
io
import
yaml
import
pcpp
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
...
...
@@ -24,6 +27,21 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
# yload loads yaml config file after preprocessing it.
#
# preprocessing is needed to e.g. remove // and /* comments.
def
yload
(
path
):
with
open
(
path
,
'r'
)
as
f
:
data
=
f
.
read
()
# original input
p
=
pcpp
.
Preprocessor
()
p
.
parse
(
data
)
f
=
io
.
StringIO
()
p
.
write
(
f
)
data_
=
f
.
getvalue
()
# preprocessed input
return
yaml
.
load
(
data_
,
Loader
=
yaml
.
Loader
)
# XXX
# XXX enb - {sdr,lopcomm,sunwave}·2 - {cell_lte1fdd,2tdd, cell_nr1fdd,2tdd} + peer·2 + peercell·2
...
...
software/ors-amarisoft/test/test.sh
View file @
e11a0fbe
...
...
@@ -15,5 +15,5 @@ export SLAPOS_TEST_LOG_DIRECTORY=`pwd`/snapshot
#time ../k/kpython_for_test -m unittest discover -vf -k NBParameters
#time ../k/kpython_for_test -m unittest discover -vf -k CoreNetwork
#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
SimCard
#
time ../k/kpython_for_test -m unittest discover -vf
software/ors-amarisoft/test/test_ors.py
View file @
e11a0fbe
...
...
@@ -26,13 +26,12 @@
##############################################################################
import
os
import
io
import
yaml
import
pcpp
import
json
import
glob
import
requests
from
test
import
yload
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
...
...
@@ -51,7 +50,7 @@ param_dict = {
'impi'
:
'impi331@amarisoft.com'
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_earfcn'
:
36100
,
# XXX KeyError: 'no band that corresponds to DL EARFCN=325320'
'dl_earfcn'
:
36100
,
'bandwidth'
:
"10 MHz"
,
'enb_id'
:
'0x17'
,
'pci'
:
250
,
...
...
@@ -138,20 +137,6 @@ gnb_param_dict1.update(param_dict)
gnb_param_dict2
.
update
(
param_dict
)
# yload loads yaml config file after preprocessing it.
#
# preprocessing is needed to e.g. remove // and /* comments.
def
yload
(
path
):
with
open
(
path
,
'r'
)
as
f
:
data
=
f
.
read
()
# original input
p
=
pcpp
.
Preprocessor
()
p
.
parse
(
data
)
f
=
io
.
StringIO
()
p
.
write
(
f
)
data_
=
f
.
getvalue
()
# preprocessed input
return
yaml
.
load
(
data_
,
Loader
=
yaml
.
Loader
)
def
test_enb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
...
...
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