osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38852?usp=email )
Change subject: bts: add initial testenv.cfg ......................................................................
bts: add initial testenv.cfg
As usually, imported from docker-playground and adjusted to run on the loopback device.
Related: OS#6638 Change-Id: Id9ed3780d166c5f6736a006f466dc5f0dded6279 --- A bts/BTS_Tests_FH.cfg A bts/BTS_Tests_OML.cfg A bts/osmo-bsc-fh.confmerge A bts/osmo-bts-oml.confmerge M bts/run_fake_trx.sh A bts/testenv_generic.cfg A bts/testenv_hopping.cfg A bts/testenv_oml.cfg 8 files changed, 470 insertions(+), 1 deletion(-)
Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved
diff --git a/bts/BTS_Tests_FH.cfg b/bts/BTS_Tests_FH.cfg new file mode 100644 index 0000000..9adb812 --- /dev/null +++ b/bts/BTS_Tests_FH.cfg @@ -0,0 +1,133 @@ +[ORDERED_INCLUDE] +"BTS_Tests.cfg" + +[LOGGING] +/* The following hopping configuration corresponds to osmo-bsc-fh.confmerge. + * See https://gerrit.osmocom.org/c/docker-playground/+/19160/ for more details. + * + * == Physical channel configuration (FDMA) == + * + * +-------+------------------+------------------+------------------+------------------+ + * | # / # | TRX#0 | TRX#1 | TRX#2 | TRX#3 | + * +-------+------------------+------------------+------------------+------------------+ + * | ARFCN | 871 | 873 | 875 | 877 | + * +-------+------------------+------------------+------------------+------------------+ + * + * == Physical channel configuration (TDMA) == + * + * +-------+------------------+------------------+------------------+------------------+ + * | # / # | TRX#0 | TRX#1 | TRX#2 | TRX#3 | + * +-------+------------------+------------------+------------------+------------------+ + * | TS0 | CCCH+SDCCH4 | TCH/F (a) | TCH/F (a) | TCH/F (a) | + * +-------+------------------+------------------+------------------+------------------+ + * | TS1 | TCH/F | SDCCH8 | SDCCH8 (b) | SDCCH8 (b) | + * +-------+------------------+------------------+------------------+------------------+ + * | TS2 | TCH/F (c) | TCH/H (c) | TCH/F (d) | TCH/H (d) | + * +-------+------------------+------------------+------------------+------------------+ + * | TS3 | TCH/F_PDCH (e) | TCH/F_PDCH (e) | TCH/F_PDCH (e) | TCH/F_PDCH (e) | + * +-------+------------------+------------------+------------------+------------------+ + * | TS4 | TCH/F_TCH/H_PDCH | TCH/F_TCH/H_PDCH | TCH/F_TCH/H_PDCH | TCH/F_TCH/H_PDCH | + * +-------+------------------+------------------+------------------+------------------+ + * | TS5 | TCH/H (f) | TCH/H (f) | TCH/H (f) | TCH/H (f) | + * +-------+------------------+------------------+------------------+------------------+ + * | TS6 | SDCCH8 (g) | PDCH (h) | PDCH (h) | SDCCH8 (g) | + * +-------+------------------+------------------+------------------+------------------+ + * | TS7 | PDCH (i) | PDCH (j) | PDCH (i) | PDCH (j) | + * +-------+------------------+------------------+------------------+------------------+ + */ +[MODULE_PARAMETERS] +BTS_Tests.mp_freq_hop_enabled := true +BTS_Tests.mp_fh_config := { + { /* TS0 */ + { /* Group a) TCH/F */ + hsn := 0, + trx_maio := { + { trx_nr := 1, maio := 0 }, + { trx_nr := 2, maio := 1 }, + { trx_nr := 3, maio := 2 } + } + } + }, + { /* TS1 */ + { /* Group b) SDCCH8 */ + hsn := 1, + trx_maio := { + { trx_nr := 2, maio := 3 }, + { trx_nr := 3, maio := 5 } + } + } + }, + { /* TS2 */ + { /* Group c) TCH/F + TCH/H (mixed) */ + hsn := 2, + trx_maio := { + { trx_nr := 0, maio := 0 }, + { trx_nr := 1, maio := 1 } + } + }, + { /* Group d) TCH/F + TCH/H (mixed) */ + hsn := 2, + trx_maio := { + { trx_nr := 2, maio := 2 }, + { trx_nr := 3, maio := 3 } + } + } + }, + { /* TS3 */ + { /* Group e) TCH/F_PDCH */ + hsn := 3, + trx_maio := { + { trx_nr := 0, maio := 3 }, + { trx_nr := 1, maio := 2 }, + { trx_nr := 2, maio := 1 }, + { trx_nr := 3, maio := 0 } + } + } + }, + { /* TS4 */ + /* No groups, all TCH/F_TCH/H_PDCH */ + }, + { /* TS5 */ + { /* Group f) TCH/H */ + hsn := 5, + trx_maio := { + { trx_nr := 0, maio := 0 }, + { trx_nr := 1, maio := 1 }, + { trx_nr := 2, maio := 2 }, + { trx_nr := 3, maio := 3 } + } + } + }, + { /* TS6 */ + { /* Group g) SDCCH8 */ + hsn := 6, + trx_maio := { + { trx_nr := 0, maio := 1 }, + { trx_nr := 3, maio := 0 } + } + }, + { /* Group h) PDCH */ + hsn := 6, + trx_maio := { + { trx_nr := 1, maio := 1 }, + { trx_nr := 2, maio := 0 } + } + } + }, + { /* TS7 */ + { /* Group i) PDCH */ + hsn := 0, + trx_maio := { + { trx_nr := 0, maio := 1 }, + { trx_nr := 2, maio := 3 } + } + }, + { /* Group h) PDCH */ + hsn := 0, + trx_maio := { + { trx_nr := 1, maio := 0 }, + { trx_nr := 3, maio := 2 } + } + } + } +} diff --git a/bts/BTS_Tests_OML.cfg b/bts/BTS_Tests_OML.cfg new file mode 100644 index 0000000..6f535ee --- /dev/null +++ b/bts/BTS_Tests_OML.cfg @@ -0,0 +1,17 @@ +[ORDERED_INCLUDE] +"../Common.cfg" +"./BTS_Tests.default" + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] +BTS_Tests_OML.mp_oml_port := 3002 +BTS_Tests_OML.mp_pcu_socket := "/tmp/pcu_sock" +PCUIF_Types.mp_pcuif_version := 12 + +[MAIN_CONTROLLER] + +[EXECUTE] +BTS_Tests_OML.control diff --git a/bts/osmo-bsc-fh.confmerge b/bts/osmo-bsc-fh.confmerge new file mode 100644 index 0000000..91a4710 --- /dev/null +++ b/bts/osmo-bsc-fh.confmerge @@ -0,0 +1,231 @@ +network + bts 0 + trx 0 + timeslot 0 + ! Shall not be hopping + timeslot 1 + ! Intentionally non-hopping + timeslot 2 + ! (c) HSN=2, MAIO=0,1 + hopping enabled 1 + hopping sequence-number 2 + hopping maio 0 + hopping arfcn add 871 + hopping arfcn add 873 + timeslot 3 + ! (e) HSN=3, MAIO=3,2,1,0 + hopping enabled 1 + hopping sequence-number 3 + hopping maio 3 + hopping arfcn add 871 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 4 + ! Intentionally non-hopping + timeslot 5 + ! (f) HSN=5, MAIO=0,1,2,3 + hopping enabled 1 + hopping sequence-number 5 + hopping maio 0 + hopping arfcn add 871 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 6 + ! (g) HSN=6, MAIO=1,0 + hopping enabled 1 + hopping sequence-number 6 + hopping maio 1 + hopping arfcn add 871 + hopping arfcn add 877 + timeslot 7 + ! (i) HSN=0, MAIO=1,3 + hopping enabled 1 + hopping sequence-number 0 + hopping maio 1 + hopping arfcn add 871 + hopping arfcn add 875 + trx 1 + timeslot 0 + ! (a) HSN=0, MAIO=0,1,2 + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 1 + ! Intentionally non-hopping + timeslot 2 + phys_chan_config TCH/H + ! (c) HSN=2, MAIO=0,1 + hopping enabled 1 + hopping sequence-number 2 + hopping maio 1 + hopping arfcn add 871 + hopping arfcn add 873 + timeslot 3 + phys_chan_config TCH/F_PDCH + ! (e) HSN=3, MAIO=3,2,1,0 + hopping enabled 1 + hopping sequence-number 3 + hopping maio 2 + hopping arfcn add 871 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 4 + phys_chan_config TCH/F_TCH/H_PDCH + ! Intentionally non-hopping + timeslot 5 + phys_chan_config TCH/H + ! (f) HSN=5, MAIO=0,1,2,3 + hopping enabled 1 + hopping sequence-number 5 + hopping maio 1 + hopping arfcn add 871 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 6 + ! (h) HSN=6, MAIO=1,0 + hopping enabled 1 + hopping sequence-number 6 + hopping maio 1 + hopping arfcn add 873 + hopping arfcn add 875 + timeslot 7 + ! (j) HSN=0, MAIO=0,2 + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 873 + hopping arfcn add 877 + trx 2 + timeslot 0 + phys_chan_config TCH/F + ! (a) HSN=0, MAIO=0,1,2 + hopping enabled 1 + hopping sequence-number 0 + hopping maio 1 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 1 + phys_chan_config SDCCH8 + ! (b) HSN=1, MAIO=3,5 + hopping enabled 1 + hopping sequence-number 1 + hopping maio 3 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 2 + phys_chan_config TCH/F + ! (d) HSN=2, MAIO=2,3 + hopping enabled 1 + hopping sequence-number 2 + hopping maio 2 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 3 + phys_chan_config TCH/F_PDCH + ! (e) HSN=3, MAIO=3,2,1,0 + hopping enabled 1 + hopping sequence-number 3 + hopping maio 1 + hopping arfcn add 871 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 4 + phys_chan_config TCH/F_TCH/H_PDCH + ! Intentionally non-hopping + timeslot 5 + phys_chan_config TCH/H + ! (f) HSN=5, MAIO=0,1,2,3 + hopping enabled 1 + hopping sequence-number 5 + hopping maio 2 + hopping arfcn add 871 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 6 + ! (h) HSN=6, MAIO=1,0 + hopping enabled 1 + hopping sequence-number 6 + hopping maio 0 + hopping arfcn add 873 + hopping arfcn add 875 + timeslot 7 + ! (i) HSN=0, MAIO=1,3 + hopping enabled 1 + hopping sequence-number 0 + hopping maio 3 + hopping arfcn add 871 + hopping arfcn add 875 + trx 3 + timeslot 0 + phys_chan_config TCH/F + ! (a) HSN=0, MAIO=0,1,2 + hopping enabled 1 + hopping sequence-number 0 + hopping maio 2 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 1 + phys_chan_config SDCCH8 + ! (b) HSN=1, MAIO=3,5 + hopping enabled 1 + hopping sequence-number 1 + hopping maio 5 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 2 + ! (d) HSN=2, MAIO=2,3 + hopping enabled 1 + hopping sequence-number 2 + hopping maio 3 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 3 + phys_chan_config TCH/F_PDCH + ! (e) HSN=3, MAIO=3,2,1,0 + hopping enabled 1 + hopping sequence-number 3 + hopping maio 0 + hopping arfcn add 871 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 4 + phys_chan_config TCH/F_TCH/H_PDCH + ! Intentionally non-hopping + timeslot 5 + phys_chan_config TCH/H + ! (f) HSN=5, MAIO=0,1,2,3 + hopping enabled 1 + hopping sequence-number 5 + hopping maio 3 + hopping arfcn add 871 + hopping arfcn add 873 + hopping arfcn add 875 + hopping arfcn add 877 + timeslot 6 + phys_chan_config SDCCH8 + ! (g) HSN=6, MAIO=1,0 + hopping enabled 1 + hopping sequence-number 6 + hopping maio 0 + hopping arfcn add 871 + hopping arfcn add 877 + timeslot 7 + phys_chan_config PDCH + ! (j) HSN=0, MAIO=0,2 + hopping enabled 1 + hopping sequence-number 0 + hopping maio 2 + hopping arfcn add 873 + hopping arfcn add 877 diff --git a/bts/osmo-bts-oml.confmerge b/bts/osmo-bts-oml.confmerge new file mode 100644 index 0000000..0138bf7 --- /dev/null +++ b/bts/osmo-bts-oml.confmerge @@ -0,0 +1,10 @@ +bts 0 + oml remote-ip 127.0.0.1 + trx 0 + power-ramp step-size 2000 mdB + trx 1 + power-ramp step-size 2000 mdB + trx 2 + power-ramp step-size 2000 mdB + trx 3 + power-ramp step-size 2000 mdB diff --git a/bts/run_fake_trx.sh b/bts/run_fake_trx.sh index 6243ce2..860dec7 100755 --- a/bts/run_fake_trx.sh +++ b/bts/run_fake_trx.sh @@ -1,7 +1,15 @@ #!/bin/bash - # Most BTS_Tests require to have fake_trx running. # fake trx is part of osmo-trx + +if [ "$TESTENV_BINARY_REPO" = 1 ]; then + # testenv with --binary-repo -> osmocom-bb cloned separately + FAKE_TRX_DIR="$TESTENV_GIT_DIR"/osmocom-bb/src/target/trx_toolkit +elif [ -n "$TESTENV_SRC_DIR" ]; then + # testenv without --binary-repo -> osmocom-bb cloned via osmo-dev + FAKE_TRX_DIR="$TESTENV_SRC_DIR"/osmocom-bb/src/target/trx_toolkit +fi + FAKE_TRX_DIR="${FAKE_TRX_DIR:-../../osmo-trx/osmocom-bb/src/target/trx_toolkit}"
cd "$FAKE_TRX_DIR" diff --git a/bts/testenv_generic.cfg b/bts/testenv_generic.cfg new file mode 100644 index 0000000..f33e616 --- /dev/null +++ b/bts/testenv_generic.cfg @@ -0,0 +1,24 @@ +[testsuite] +program=BTS_Tests +config=BTS_Tests.cfg + +[bsc] +program=osmo-bsc +make=osmo-bsc +package=osmo-bsc +copy=osmo-bsc.cfg + +[fake-trx] +program=run_fake_trx.sh +make=.make.osmocom-bb.clone + +[trxcon] +program=trxcon +make=trxcon + +[bts] +program=respawn.sh osmo-bts-trx +make=osmo-bts +package=osmo-bts +copy=osmo-bts.cfg +vty_port=4241 diff --git a/bts/testenv_hopping.cfg b/bts/testenv_hopping.cfg new file mode 100644 index 0000000..5adf485 --- /dev/null +++ b/bts/testenv_hopping.cfg @@ -0,0 +1,27 @@ +[testsuite] +program=BTS_Tests +config=BTS_Tests_FH.cfg +copy=BTS_Tests.cfg +clean=rename_junit_xml_classname.sh ":hopping" + +[bsc] +prepare=osmo-config-merge osmo-bsc.cfg osmo-bsc-fh.confmerge > osmo-bsc-fh.cfg +program=osmo-bsc -c osmo-bsc-fh.cfg +make=osmo-bsc +package=osmo-bsc libosmocore-utils +copy=osmo-bsc.cfg osmo-bsc-fh.confmerge + +[fake-trx] +program=run_fake_trx.sh +make=.make.osmocom-bb.clone + +[trxcon] +program=trxcon +make=trxcon + +[bts] +program=respawn.sh osmo-bts-trx +make=osmo-bts +package=osmo-bts +copy=osmo-bts.cfg +vty_port=4241 diff --git a/bts/testenv_oml.cfg b/bts/testenv_oml.cfg new file mode 100644 index 0000000..77a6fda --- /dev/null +++ b/bts/testenv_oml.cfg @@ -0,0 +1,19 @@ +[testsuite] +program=BTS_Tests +config=BTS_Tests_OML.cfg + +[fake-trx] +program=run_fake_trx.sh +make=.make.osmocom-bb.clone + +[trxcon] +program=trxcon +make=trxcon + +[bts] +prepare=osmo-config-merge osmo-bts.cfg osmo-bts-oml.confmerge > osmo-bts-oml.cfg +program=osmo-bts-trx -c osmo-bts-oml.cfg +make=osmo-bts +package=osmo-bts-trx libosmocore-utils +copy=osmo-bts.cfg osmo-bts-oml.confmerge +vty_port=4241