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
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 @@
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 @@
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 @@
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());