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
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
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
Show 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 @@
...
@@ -17,6 +17,9 @@
# See https://www.nexedi.com/licensing for rationale and options.
# See https://www.nexedi.com/licensing for rationale and options.
import
os
import
os
import
io
import
yaml
import
pcpp
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
...
@@ -24,6 +27,21 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
...
@@ -24,6 +27,21 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
os
.
path
.
abspath
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
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
# XXX enb - {sdr,lopcomm,sunwave}·2 - {cell_lte1fdd,2tdd, cell_nr1fdd,2tdd} + peer·2 + peercell·2
# 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
...
@@ -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 NBParameters
#time ../k/kpython_for_test -m unittest discover -vf -k CoreNetwork
#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 MonitorGadget
#
time ../k/kpython_for_test -m unittest discover -vf -k SimCard
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
software/ors-amarisoft/test/test_ors.py
View file @
e11a0fbe
...
@@ -26,13 +26,12 @@
...
@@ -26,13 +26,12 @@
##############################################################################
##############################################################################
import
os
import
os
import
io
import
yaml
import
pcpp
import
json
import
json
import
glob
import
glob
import
requests
import
requests
from
test
import
yload
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
...
@@ -51,7 +50,7 @@ param_dict = {
...
@@ -51,7 +50,7 @@ param_dict = {
'impi'
:
'impi331@amarisoft.com'
,
'impi'
:
'impi331@amarisoft.com'
,
'tx_gain'
:
17
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_earfcn'
:
36100
,
# XXX KeyError: 'no band that corresponds to DL EARFCN=325320'
'dl_earfcn'
:
36100
,
'bandwidth'
:
"10 MHz"
,
'bandwidth'
:
"10 MHz"
,
'enb_id'
:
'0x17'
,
'enb_id'
:
'0x17'
,
'pci'
:
250
,
'pci'
:
250
,
...
@@ -138,20 +137,6 @@ gnb_param_dict1.update(param_dict)
...
@@ -138,20 +137,6 @@ gnb_param_dict1.update(param_dict)
gnb_param_dict2
.
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
):
def
test_enb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
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