summaryrefslogtreecommitdiffstats
path: root/bts/BTS_Tests.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-10 17:21:03 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-12 16:04:37 +0100
commit84271629d715e008ab108ce2eca88ad50846d4b9 (patch)
tree72598f3795209b34ba0a5b967e153d3dba65e866 /bts/BTS_Tests.ttcn
parent0fd1fb08ef190addb070e9a29920549a99c3ff62 (diff)
bts: Make PCU and TRXC sockets optional
If we want to test with a real (remote) BTS, we can neither access the PCU socket nor is there any fake_trx control socket for fake toa/rssi Change-Id: Ibb02cf289b0d2e77170f146463822c164efc21cd
Diffstat (limited to 'bts/BTS_Tests.ttcn')
-rw-r--r--bts/BTS_Tests.ttcn17
1 files changed, 13 insertions, 4 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 2cf17ae..931c9ab 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -236,6 +236,10 @@ private function f_init_pcu(charstring id) runs on test_CT {
timer T := 2.0;
var PCUIF_send_data sd;
map(self:PCU, system:PCU);
+ if (mp_pcu_socket == "") {
+ g_pcu_conn_id := -1;
+ return;
+ }
g_pcu_conn_id := f_pcuif_connect(PCU, mp_pcu_socket);
T.start;
@@ -265,9 +269,12 @@ function f_init(charstring id := "BTS-Test") runs on test_CT {
f_init_pcu(id);
- /* start with a default moderate timing offset equalling TA=2 */
- f_main_trxc_connect();
- f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(2*256)));
+ if (mp_bb_trxc_port != -1) {
+ var TrxcMessage ret;
+ /* start with a default moderate timing offset equalling TA=2 */
+ f_main_trxc_connect();
+ ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(2*256)));
+ }
}
/* Attach L1CTL to master test_CT (classic tests, non-handler mode) */
@@ -342,7 +349,9 @@ runs on ConnHdlr {
map(self:L1CTL, system:L1CTL);
f_connect_reset(L1CTL);
- f_trxc_connect();
+ if (mp_bb_trxc_port != -1) {
+ f_trxc_connect();
+ }
g_Tguard.start(pars.t_guard);
activate(as_Tguard());