tests: Replace 'suite' with 'tenv'

Change-Id: I777ec59ffd83b861ddc09e85e52d7a8896264b8c
This commit is contained in:
Pau Espin 2020-05-05 13:41:42 +02:00
parent a442cb8e5f
commit 40c7bc7765
45 changed files with 212 additions and 212 deletions

View File

@ -1,15 +1,15 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
hlr = suite.hlr()
bts = suite.bts()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
ms_mo = suite.modem()
ms_mt = suite.modem()
hlr = tenv.hlr()
bts = tenv.bts()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
ms_mo = tenv.modem()
ms_mt = tenv.modem()
hlr.start()
stp.start()

View File

@ -12,10 +12,10 @@ def print_results(cli_res, srv_res):
print_result_node(cli_res, 'client')
print_result_node(srv_res, 'server')
epc = suite.epc()
enb = suite.enb()
ue = suite.modem()
iperf3srv = suite.iperf3srv({'addr': epc.tun_addr()})
epc = tenv.epc()
enb = tenv.enb()
ue = tenv.modem()
iperf3srv = tenv.iperf3srv({'addr': epc.tun_addr()})
iperf3srv.set_run_node(epc.run_node())
iperf3cli = iperf3srv.create_client()
iperf3cli.set_run_node(ue.run_node())

View File

@ -12,10 +12,10 @@ def print_results(cli_res, srv_res):
print_result_node(cli_res, 'client')
print_result_node(srv_res, 'server')
epc = suite.epc()
enb = suite.enb()
ue = suite.modem()
iperf3srv = suite.iperf3srv({'addr': epc.tun_addr()})
epc = tenv.epc()
enb = tenv.enb()
ue = tenv.modem()
iperf3srv = tenv.iperf3srv({'addr': epc.tun_addr()})
iperf3srv.set_run_node(epc.run_node())
iperf3cli = iperf3srv.create_client()
iperf3cli.set_run_node(ue.run_node())

View File

@ -1,9 +1,9 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
epc = suite.epc()
enb = suite.enb()
ue = suite.modem()
epc = tenv.epc()
enb = tenv.enb()
ue = tenv.modem()
epc.subscriber_add(ue)
epc.start()

View File

@ -1,5 +1,5 @@
from osmo_gsm_tester.testenv import *
print('hello world')
print('I am %r / %r' % (suite.suite().name(), test.name()))
print('I am %r / %r' % (tenv.suite().name(), test.name()))
print('one\ntwo\nthree')

View File

@ -1,5 +1,5 @@
from osmo_gsm_tester.testenv import *
print('I am %r / %r' % (suite.suite().name(), test.name()))
print('I am %r / %r' % (tenv.suite().name(), test.name()))
assert False

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
print('I am %r / %r' % (suite.suite().name(), test.name()))
print('I am %r / %r' % (tenv.suite().name(), test.name()))
test.set_fail('EpicFail', 'This failure is expected')

View File

@ -37,7 +37,6 @@ from .obj import bts
from .obj import ms
suite = None
test = None
resources = None
log = None
dbg = None
@ -49,6 +48,7 @@ poll = None
prompt = None
Sms = None
process = None
tenv = None
class Timeout(Exception):
pass
@ -313,7 +313,7 @@ def setup(suite_run, _test):
from .core.event_loop import MainLoop
from .obj.sms import Sms as Sms_class
global suite, test, resources, log, dbg, err, wait, wait_no_raise, sleep, poll, prompt, Sms, process
global test, resources, log, dbg, err, wait, wait_no_raise, sleep, poll, prompt, Sms, process, tenv
test = _test
resources = suite_run.reserved_resources # TODO: remove this global, only used in selftest
@ -326,8 +326,8 @@ def setup(suite_run, _test):
poll = MainLoop.poll
Sms = Sms_class
process = process_module
suite = TestEnv(suite_run, _test) # stored in "suite" for backward compatibility
prompt = suite.prompt
return suite
tenv = TestEnv(suite_run, _test)
prompt = tenv.prompt
return tenv
# vim: expandtab tabstop=4 shiftwidth=4

View File

@ -12,10 +12,10 @@ def print_results(cli_res, srv_res):
print_result_node(cli_res, 'client')
print_result_node(srv_res, 'server')
epc = suite.epc()
enb = suite.enb()
ue = suite.modem()
iperf3srv = suite.iperf3srv({'addr': epc.tun_addr()})
epc = tenv.epc()
enb = tenv.enb()
ue = tenv.modem()
iperf3srv = tenv.iperf3srv({'addr': epc.tun_addr()})
iperf3srv.set_run_node(epc.run_node())
iperf3cli = iperf3srv.create_client()
iperf3cli.set_run_node(ue.run_node())

View File

@ -12,10 +12,10 @@ def print_results(cli_res, srv_res):
print_result_node(cli_res, 'client')
print_result_node(srv_res, 'server')
epc = suite.epc()
enb = suite.enb()
ue = suite.modem()
iperf3srv = suite.iperf3srv({'addr': epc.tun_addr()})
epc = tenv.epc()
enb = tenv.enb()
ue = tenv.modem()
iperf3srv = tenv.iperf3srv({'addr': epc.tun_addr()})
iperf3srv.set_run_node(epc.run_node())
iperf3cli = iperf3srv.create_client()
iperf3cli.set_run_node(ue.run_node())

View File

@ -1,9 +1,9 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
epc = suite.epc()
enb = suite.enb()
ue = suite.modem()
epc = tenv.epc()
enb = tenv.enb()
ue = tenv.modem()
epc.subscriber_add(ue)
epc.start()

View File

@ -1,17 +1,17 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
hlr = suite.hlr()
bts = suite.bts()
hlr = tenv.hlr()
bts = tenv.bts()
pcu = bts.pcu()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
ggsn = suite.ggsn()
sgsn = suite.sgsn(hlr, ggsn)
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
ggsn = tenv.ggsn()
sgsn = tenv.sgsn(hlr, ggsn)
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
modems = suite.modems(int(prompt('How many modems?')))
modems = tenv.modems(int(prompt('How many modems?')))
bsc.bts_add(bts)
sgsn.bts_add(bts)

View File

@ -32,18 +32,18 @@ def make_call(ms_mo, ms_mt):
wait(lambda: len(ms_mo.call_id_list()) == 0 and len(ms_mt.call_id_list()) == 0)
print('hangup success')
hlr = suite.hlr()
bts = suite.bts()
hlr = tenv.hlr()
bts = tenv.bts()
pcu = bts.pcu()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
ggsn = suite.ggsn()
sgsn = suite.sgsn(hlr, ggsn)
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
ms_mo = suite.modem()
ms_mt = suite.modem()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
ggsn = tenv.ggsn()
sgsn = tenv.sgsn(hlr, ggsn)
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
ms_mo = tenv.modem()
ms_mt = tenv.modem()
bsc.bts_add(bts)
sgsn.bts_add(bts)

View File

@ -2,14 +2,14 @@
from osmo_gsm_tester.testenv import *
def encryption_test_setup_run(enable_auth, algo):
hlr = suite.hlr()
bts = suite.bts()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
ms = suite.modem()
hlr = tenv.hlr()
bts = tenv.bts()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
ms = tenv.modem()
print('start network...')
msc.set_authentication(enable_auth)

View File

@ -2,7 +2,7 @@
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import encryption_test_setup_run
encryption_test_setup_run(False, 'a5_0')

View File

@ -2,7 +2,7 @@
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import encryption_test_setup_run
encryption_test_setup_run(True, 'a5_0')

View File

@ -2,7 +2,7 @@
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import encryption_test_setup_run
encryption_test_setup_run(True, 'a5_1')

View File

@ -2,7 +2,7 @@
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import encryption_test_setup_run
encryption_test_setup_run(True, 'a5_3')

View File

@ -6,7 +6,7 @@
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import setup_run_iperf3_test_parallel
def ready_cb_place_voicecall(ms_li):

View File

@ -2,7 +2,7 @@
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import setup_run_iperf3_test_parallel
setup_run_iperf3_test_parallel(1)

View File

@ -2,7 +2,7 @@
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import setup_run_iperf3_test_parallel
setup_run_iperf3_test_parallel(4)

View File

@ -35,30 +35,30 @@ def run_iperf3_cli_parallel(iperf3clients, ms_li, ready_cb):
def setup_run_iperf3_test_parallel(num_ms, ready_cb=None):
hlr = suite.hlr()
bts = suite.bts()
hlr = tenv.hlr()
bts = tenv.bts()
pcu = bts.pcu()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
ggsn = suite.ggsn()
sgsn = suite.sgsn(hlr, ggsn)
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
ggsn = tenv.ggsn()
sgsn = tenv.sgsn(hlr, ggsn)
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
iperf3srv_addr = suite.ip_address()
iperf3srv_addr = tenv.ip_address()
servers = []
clients = []
ms_li = []
for i in range(num_ms):
iperf3srv = suite.iperf3srv(iperf3srv_addr)
iperf3srv = tenv.iperf3srv(iperf3srv_addr)
iperf3srv.set_port(iperf3srv.DEFAULT_SRV_PORT + i)
servers.append(iperf3srv)
iperf3cli = iperf3srv.create_client()
clients.append(iperf3cli)
ms = suite.modem()
ms = tenv.modem()
ms_li.append(ms)
bsc.bts_add(bts)

View File

@ -1,17 +1,17 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
hlr = suite.hlr()
bts = suite.bts()
hlr = tenv.hlr()
bts = tenv.bts()
pcu = bts.pcu()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
ggsn = suite.ggsn()
sgsn = suite.sgsn(hlr, ggsn)
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
ms = suite.modem()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
ggsn = tenv.ggsn()
sgsn = tenv.sgsn(hlr, ggsn)
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
ms = tenv.modem()
bsc.bts_add(bts)
sgsn.bts_add(bts)

View File

@ -6,17 +6,17 @@
from osmo_gsm_tester.testenv import *
hlr = suite.hlr()
bts = suite.bts()
hlr = tenv.hlr()
bts = tenv.bts()
pcu = bts.pcu()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
ggsn = suite.ggsn()
sgsn = suite.sgsn(hlr, ggsn)
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
ms = suite.modem()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
ggsn = tenv.ggsn()
sgsn = tenv.sgsn(hlr, ggsn)
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
ms = tenv.modem()
bsc.bts_add(bts)
sgsn.bts_add(bts)

View File

@ -2,9 +2,9 @@
from osmo_gsm_tester.testenv import *
print('use resources...')
nitb = suite.nitb()
bts = suite.bts()
modems = suite.modems(int(prompt('How many modems?')))
nitb = tenv.nitb()
bts = tenv.bts()
modems = tenv.modems(int(prompt('How many modems?')))
print('start nitb and bts...')
nitb.bts_add(bts)

View File

@ -2,9 +2,9 @@
from osmo_gsm_tester.testenv import *
print('use resources...')
nitb = suite.nitb()
bts = suite.bts()
ms = suite.modem()
nitb = tenv.nitb()
bts = tenv.bts()
ms = tenv.modem()
print('start nitb and bts...')
nitb.bts_add(bts)

View File

@ -2,9 +2,9 @@
from osmo_gsm_tester.testenv import *
print('use resources...')
nitb = suite.nitb()
bts = suite.bts()
ms = suite.modem()
nitb = tenv.nitb()
bts = tenv.bts()
ms = tenv.modem()
print('start nitb and bts...')
nitb.bts_add(bts)

View File

@ -7,11 +7,11 @@ from osmo_gsm_tester.testenv import *
from datetime import timedelta
print('Claiming resources for the test')
nitb = suite.nitb()
bts = suite.bts()
ms_driver = suite.ms_driver()
nitb = tenv.nitb()
bts = tenv.bts()
ms_driver = tenv.ms_driver()
ul = ms_driver.add_test('ul_test')
modems = suite.all_resources(suite.modem)
modems = tenv.all_resources(tenv.modem)
print('Launching a simple network')
nitb.bts_add(bts)

View File

@ -6,9 +6,9 @@
from osmo_gsm_tester.testenv import *
nitb = suite.nitb()
nitb = tenv.nitb()
smsc = nitb.smsc
esme = suite.esme()
esme = tenv.esme()
# Here we deliberately omit calling smsc.esme_add() to avoid having it included
# in the smsc config.

View File

@ -11,10 +11,10 @@ from osmo_gsm_tester.testenv import *
SMPP_ESME_RINVPASWD = 0x0000000E
SMPP_ESME_RINVSYSID = 0x0000000F
nitb = suite.nitb()
nitb = tenv.nitb()
smsc = nitb.smsc
esme = suite.esme()
esme_no_pwd = suite.esme()
esme = tenv.esme()
esme_no_pwd = tenv.esme()
esme_no_pwd.set_password('')
smsc.set_smsc_policy(smsc.SMSC_POLICY_CLOSED)

View File

@ -12,10 +12,10 @@ from osmo_gsm_tester.testenv import *
SMPP_ESME_RINVDSTADR = 0x0000000B
nitb = suite.nitb()
bts = suite.bts()
ms = suite.modem()
esme = suite.esme()
nitb = tenv.nitb()
bts = tenv.bts()
ms = tenv.modem()
esme = tenv.esme()
print('start nitb and bts...')
nitb.bts_add(bts)

View File

@ -10,10 +10,10 @@ from osmo_gsm_tester.testenv import *
SMPP_ESME_RINVDSTADR = 0x0000000B
nitb = suite.nitb()
bts = suite.bts()
ms = suite.modem()
esme = suite.esme()
nitb = tenv.nitb()
bts = tenv.bts()
ms = tenv.modem()
esme = tenv.esme()
print('start nitb and bts...')
nitb.bts_add(bts)

View File

@ -1,10 +1,10 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
nitb = suite.nitb()
bts = suite.bts()
ms_mo = suite.modem()
ms_mt = suite.modem()
nitb = tenv.nitb()
bts = tenv.bts()
ms_mo = tenv.modem()
ms_mt = tenv.modem()
print('start nitb and bts...')
nitb.bts_add(bts)

View File

@ -3,9 +3,9 @@ from osmo_gsm_tester.testenv import *
USSD_COMMAND_GET_EXTENSION = '*#100#'
nitb = suite.nitb()
bts = suite.bts()
ms = suite.modem()
nitb = tenv.nitb()
bts = tenv.bts()
ms = tenv.modem()
print('start nitb and bts...')
nitb.bts_add(bts)

View File

@ -6,12 +6,12 @@
from osmo_gsm_tester.testenv import *
hlr = suite.hlr()
mgw_msc = suite.mgw()
stp = suite.stp()
msc = suite.msc(hlr, mgw_msc, stp)
hlr = tenv.hlr()
mgw_msc = tenv.mgw()
stp = tenv.stp()
msc = tenv.msc(hlr, mgw_msc, stp)
smsc = msc.smsc
esme = suite.esme()
esme = tenv.esme()
# Here we deliberately omit calling smsc.esme_add() to avoid having it included
# in the smsc config.

View File

@ -11,15 +11,15 @@ from osmo_gsm_tester.testenv import *
SMPP_ESME_RINVPASWD = 0x0000000E
SMPP_ESME_RINVSYSID = 0x0000000F
hlr = suite.hlr()
bts = suite.bts()
mgw_msc = suite.mgw()
stp = suite.stp()
msc = suite.msc(hlr, mgw_msc, stp)
hlr = tenv.hlr()
bts = tenv.bts()
mgw_msc = tenv.mgw()
stp = tenv.stp()
msc = tenv.msc(hlr, mgw_msc, stp)
smsc = msc.smsc
esme = suite.esme()
esme_no_pwd = suite.esme()
esme = tenv.esme()
esme_no_pwd = tenv.esme()
esme_no_pwd.set_password('')
smsc.set_smsc_policy(smsc.SMSC_POLICY_CLOSED)

View File

@ -12,17 +12,17 @@ from osmo_gsm_tester.testenv import *
SMPP_ESME_RINVDSTADR = 0x0000000B
hlr = suite.hlr()
bts = suite.bts()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
hlr = tenv.hlr()
bts = tenv.bts()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
bsc.bts_add(bts)
ms = suite.modem()
esme = suite.esme()
ms = tenv.modem()
esme = tenv.esme()
msc.smsc.esme_add(esme)
hlr.start()

View File

@ -10,17 +10,17 @@ from osmo_gsm_tester.testenv import *
SMPP_ESME_RINVDSTADR = 0x0000000B
hlr = suite.hlr()
bts = suite.bts()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
hlr = tenv.hlr()
bts = tenv.bts()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
bsc.bts_add(bts)
ms = suite.modem()
esme = suite.esme()
ms = tenv.modem()
esme = tenv.esme()
msc.smsc.esme_add(esme)
hlr.start()

View File

@ -1,15 +1,15 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
hlr = suite.hlr()
bts = suite.bts()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
ms_mo = suite.modem()
ms_mt = suite.modem()
hlr = tenv.hlr()
bts = tenv.bts()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
ms_mo = tenv.modem()
ms_mt = tenv.modem()
hlr.start()
stp.start()

View File

@ -3,14 +3,14 @@ from osmo_gsm_tester.testenv import *
USSD_COMMAND_GET_EXTENSION = '*#100#'
hlr = suite.hlr()
bts = suite.bts()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
ms = suite.modem()
hlr = tenv.hlr()
bts = tenv.bts()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
ms = tenv.modem()
hlr.start()
stp.start()

View File

@ -2,15 +2,15 @@
from osmo_gsm_tester.testenv import *
def test_mo_mt_call(use_osmux=False, force_osmux=False):
hlr = suite.hlr()
bts = suite.bts()
mgw_msc = suite.mgw()
mgw_bsc = suite.mgw()
stp = suite.stp()
msc = suite.msc(hlr, mgw_msc, stp)
bsc = suite.bsc(msc, mgw_bsc, stp)
ms_mo = suite.modem()
ms_mt = suite.modem()
hlr = tenv.hlr()
bts = tenv.bts()
mgw_msc = tenv.mgw()
mgw_bsc = tenv.mgw()
stp = tenv.stp()
msc = tenv.msc(hlr, mgw_msc, stp)
bsc = tenv.bsc(msc, mgw_bsc, stp)
ms_mo = tenv.modem()
ms_mt = tenv.modem()
hlr.start()
stp.start()

View File

@ -2,7 +2,7 @@
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import test_mo_mt_call
test_mo_mt_call(False, False)

View File

@ -2,7 +2,7 @@
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import test_mo_mt_call
test_mo_mt_call(True, True)

View File

@ -4,13 +4,13 @@ from mako.template import Template
from osmo_gsm_tester.testenv import *
def run_ttcn3(suite, test_obj, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute, ttcn3_test_extra_module_params=""):
def run_ttcn3(tenv, test_obj, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute, ttcn3_test_extra_module_params=""):
own_dir = testdir
script_file = os.path.join(testdir, 'scripts', 'run_ttcn3_docker.sh')
bts_tmpl_file = os.path.join(testdir, 'scripts', 'BTS_Tests.cfg.tmpl')
script_run_dir = test_obj.get_run_dir().new_dir('ttcn3')
bts_cfg_file = os.path.join(str(script_run_dir), 'BTS_Tests.cfg')
junit_ttcn3_dst_file = os.path.join(str(suite.trial.get_run_dir()), 'trial-') + test_obj.basename + '.xml'
junit_ttcn3_dst_file = os.path.join(str(tenv.suite().trial().get_run_dir()), 'trial-') + test_obj.basename + '.xml'
if bts.bts_type() == 'osmo-bts-trx':
pcu_available = True
pcu_sk = bts.pcu_socket_path()

View File

@ -3,20 +3,20 @@ import os
from osmo_gsm_tester.testenv import *
import testlib
suite.test_import_modules_register_for_cleanup(testlib)
tenv.test_import_modules_register_for_cleanup(testlib)
from testlib import run_ttcn3
ttcn3_test_execute="BTS_Tests.control"
hlr_dummy = suite.hlr()
mgw_dummy = suite.mgw()
stp_dummy = suite.stp()
msc_dummy = suite.msc(hlr_dummy, mgw_dummy, stp_dummy)
ggsn_dummy = suite.ggsn()
sgsn_dummy = suite.sgsn(hlr_dummy, ggsn_dummy)
bsc = suite.bsc(msc_dummy, mgw_dummy, stp_dummy)
bts = suite.bts()
osmocon = suite.osmocon()
hlr_dummy = tenv.hlr()
mgw_dummy = tenv.mgw()
stp_dummy = tenv.stp()
msc_dummy = tenv.msc(hlr_dummy, mgw_dummy, stp_dummy)
ggsn_dummy = tenv.ggsn()
sgsn_dummy = tenv.sgsn(hlr_dummy, ggsn_dummy)
bsc = tenv.bsc(msc_dummy, mgw_dummy, stp_dummy)
bts = tenv.bts()
osmocon = tenv.osmocon()
bts.set_num_trx(1)
bts.set_trx_phy_channel(0, 0, 'CCCH+SDCCH4')
@ -34,7 +34,7 @@ stp_dummy.start()
msc_dummy.start()
mgw_dummy.start()
nat_rsl_ip = suite.ip_address().get('addr')
nat_rsl_ip = tenv.ip_address().get('addr')
bsc.set_rsl_ip(nat_rsl_ip)
bsc.bts_add(bts)
sgsn_dummy.bts_add(bts)
@ -46,4 +46,4 @@ print('Starting osmocon')
osmocon.start()
testdir = os.path.dirname(os.path.realpath(__file__))
run_ttcn3(suite, test, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute)
run_ttcn3(tenv. test, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute)