Commit e11a0fbe authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e42e82bb
......@@ -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
......
......@@ -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
......@@ -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(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment