blob: c999aaaf2a75939a6544861db429e7572534ca71 [file] [log] [blame]
Pau Espin Pedrolbc1ed882018-05-17 16:59:58 +02001#!/usr/bin/env python3
2import os
Pau Espin Pedrolbc1ed882018-05-17 16:59:58 +02003
4from osmo_gsm_tester.testenv import *
Pau Espin Pedrolc9faa9e2020-02-06 16:13:53 +01005import testlib
Pau Espin Pedrol40c7bc72020-05-05 13:41:42 +02006tenv.test_import_modules_register_for_cleanup(testlib)
Pau Espin Pedrolc9faa9e2020-02-06 16:13:53 +01007from testlib import run_ttcn3
Pau Espin Pedrolbc1ed882018-05-17 16:59:58 +02008
Vadim Yanitskiyd1cb7592020-08-06 01:53:24 +07009ttcn3_test_groups = [
10 'BTS_Tests',
Vadim Yanitskiye42631a2020-08-06 01:59:23 +070011 'BTS_Tests_SMSCB',
12 'BTS_Tests_LAPDm',
Vadim Yanitskiyd1cb7592020-08-06 01:53:24 +070013]
Pau Espin Pedrolceb7ea62020-02-06 15:59:48 +010014
Pau Espin Pedrol40c7bc72020-05-05 13:41:42 +020015hlr_dummy = tenv.hlr()
16mgw_dummy = tenv.mgw()
17stp_dummy = tenv.stp()
18msc_dummy = tenv.msc(hlr_dummy, mgw_dummy, stp_dummy)
19ggsn_dummy = tenv.ggsn()
20sgsn_dummy = tenv.sgsn(hlr_dummy, ggsn_dummy)
21bsc = tenv.bsc(msc_dummy, mgw_dummy, stp_dummy)
22bts = tenv.bts()
23osmocon = tenv.osmocon()
Pau Espin Pedrolbc1ed882018-05-17 16:59:58 +020024
25bts.set_num_trx(1)
26bts.set_trx_phy_channel(0, 0, 'CCCH+SDCCH4')
27bts.set_trx_phy_channel(0, 1, 'TCH/F')
28bts.set_trx_phy_channel(0, 2, 'TCH/F')
29bts.set_trx_phy_channel(0, 3, 'TCH/F_PDCH')
30bts.set_trx_phy_channel(0, 4, 'TCH/F_TCH/H_PDCH')
31bts.set_trx_phy_channel(0, 5, 'TCH/H')
32bts.set_trx_phy_channel(0, 6, 'SDCCH8')
33bts.set_trx_phy_channel(0, 7, 'PDCH')
34
35print('Starting CNI')
36hlr_dummy.start()
37stp_dummy.start()
38msc_dummy.start()
39mgw_dummy.start()
40
Pau Espin Pedrol40c7bc72020-05-05 13:41:42 +020041nat_rsl_ip = tenv.ip_address().get('addr')
Pau Espin Pedrola5285562018-10-15 17:20:50 +020042bsc.set_rsl_ip(nat_rsl_ip)
Pau Espin Pedrolbc1ed882018-05-17 16:59:58 +020043bsc.bts_add(bts)
44sgsn_dummy.bts_add(bts)
45
46bsc.start()
47bts.start(keepalive=True)
48
49print('Starting osmocon')
50osmocon.start()
51
Pau Espin Pedrolc9faa9e2020-02-06 16:13:53 +010052testdir = os.path.dirname(os.path.realpath(__file__))
Vadim Yanitskiyd1cb7592020-08-06 01:53:24 +070053run_ttcn3(tenv, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_groups)