aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-08-07 04:23:14 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-06-08 00:13:16 +0200
commit7fb373416a534ebab05e81b109329e6e2037572b (patch)
tree5c48356736d6f56b511e83301350acf885cd6421
parent082a82eb0ed7a216c799437c84a54596a221c68e (diff)
bsc: add BSC_Tests_2.ttcn
In this patch I propose to open a new file for BSC tests, simply BSC_Tests_2.ttcn. The reason is that modifying BSC_Tests.ttcn in tiny ways causes many other files that import BSC_Tests to be recompiled again and again for every dev cycle: for example the LCLS and CBSP test suites. By placing my new test in a separate file, I reduced the waiting time for titan compilation while developing the new tests. I will definitely do so again for future test development, so I thought why not see whether you guys also like this idea. (I previously argued that there is no problem with huge ttcn files, but I see now that pespin was right to favor reducing the file size. The most benefit probably comes from removed dependency builds.) Change-Id: I3eadaebcb3ff1fa5c5b72e297a474e2c2c25d45d
-rw-r--r--bsc/BSC_Tests.cfg1
-rw-r--r--bsc/BSC_Tests.ttcn37
-rw-r--r--bsc/BSC_Tests_2.ttcn62
3 files changed, 82 insertions, 18 deletions
diff --git a/bsc/BSC_Tests.cfg b/bsc/BSC_Tests.cfg
index 57658467..a95e7e4e 100644
--- a/bsc/BSC_Tests.cfg
+++ b/bsc/BSC_Tests.cfg
@@ -17,6 +17,7 @@
[EXECUTE]
BSC_Tests.control
BSC_Tests_LCLS.control
+BSC_Tests_2.control
BSC_Tests_CBSP.control
#BSC_Tests.TC_chan_act_noreply
#BSC_Tests.TC_chan_act_ack_noest
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 54bdd48e..c432c43a 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -21,6 +21,7 @@ module BSC_Tests {
*/
friend module BSC_Tests_VAMOS;
+friend module BSC_Tests_2;
import from Misc_Helpers all;
import from General_Types all;
@@ -787,7 +788,7 @@ private function f_ctrs_msc_expect(integer msc_nr, charstring countername, integ
/* Convenience functions for rate counters using g_ctr_bts, always also including g_ctr_bsc. */
-private function f_ctrs_bts_init(integer bts_count := NUM_BTS, CounterNameVals counternames := counternames_bsc_bts_handover) runs on test_CT {
+function f_ctrs_bts_init(integer bts_count := NUM_BTS, CounterNameVals counternames := counternames_bsc_bts_handover) runs on test_CT {
g_ctr_bts := f_counter_name_vals_get_n(IPA_CTRL, "bts", bts_count, counternames);
log("initial bts rate counters: ", g_ctr_bts);
}
@@ -797,17 +798,17 @@ function f_ctrs_bsc_and_bts_init(integer bts_count := NUM_BTS, CounterNameVals c
f_ctrs_bsc_init(counternames);
}
-private function f_ctrs_bsc_and_bts_handover_init(integer bts_count := NUM_BTS) runs on test_CT {
+function f_ctrs_bsc_and_bts_handover_init(integer bts_count := NUM_BTS) runs on test_CT {
var CounterNameVals bts_names := counternames_bsc_bts_handover & counternames_bts_handover;
f_ctrs_bts_init(bts_count, bts_names);
f_ctrs_bsc_init(counternames_bsc_bts_handover);
}
-private function f_ctrs_bts_add(integer bts_nr, charstring countername, integer val := 1) runs on test_CT {
+function f_ctrs_bts_add(integer bts_nr, charstring countername, integer val := 1) runs on test_CT {
f_counter_name_vals_list_add(g_ctr_bts, bts_nr, countername, val);
}
-private function f_ctrs_bsc_and_bts_add(integer bts_nr, charstring countername, integer val := 1) runs on test_CT {
+function f_ctrs_bsc_and_bts_add(integer bts_nr, charstring countername, integer val := 1) runs on test_CT {
f_ctrs_bts_add(bts_nr, countername, val);
f_ctrs_bsc_add(countername, val);
}
@@ -824,7 +825,7 @@ function f_ctrs_bts_verify() runs on test_CT {
* f_ctrs_bsc_and_bts_add(1, "other");
* f_ctrs_bsc_and_bts_verify();
*/
-private function f_ctrs_bsc_and_bts_verify() runs on test_CT {
+function f_ctrs_bsc_and_bts_verify() runs on test_CT {
f_ctrs_bts_verify();
f_ctrs_bsc_verify();
}
@@ -836,7 +837,7 @@ private function f_ctrs_bsc_and_bts_verify() runs on test_CT {
* f_do_thing(on_bts := 0);
* f_ctrs_bsc_and_bts_expect(0, "thing", 3);
*/
-private function f_ctrs_bsc_and_bts_expect(integer bts_nr, charstring countername, integer val := 1) runs on test_CT {
+function f_ctrs_bsc_and_bts_expect(integer bts_nr, charstring countername, integer val := 1) runs on test_CT {
f_ctrs_bsc_and_bts_add(bts_nr, countername, val);
f_ctrs_bsc_and_bts_verify();
}
@@ -844,12 +845,12 @@ private function f_ctrs_bsc_and_bts_expect(integer bts_nr, charstring counternam
/* Convenience functions for rate counters using g_ctr_bsc. */
-private function f_ctrs_bsc_init(CounterNameVals counternames := counternames_bsc_bts_handover) runs on test_CT {
+function f_ctrs_bsc_init(CounterNameVals counternames := counternames_bsc_bts_handover) runs on test_CT {
g_ctr_bsc := f_counter_name_vals_get_n(IPA_CTRL, "bsc", 1, counternames);
log("initial bsc rate counters: ", g_ctr_bsc);
}
-private function f_ctrs_bsc_add(charstring countername, integer val := 1) runs on test_CT {
+function f_ctrs_bsc_add(charstring countername, integer val := 1) runs on test_CT {
f_counter_name_vals_list_add(g_ctr_bsc, 0, countername, val);
}
@@ -861,7 +862,7 @@ private function f_ctrs_bsc_add(charstring countername, integer val := 1) runs o
* f_ctrs_bsc_add("other");
* f_ctrs_bsc_verify();
*/
-private function f_ctrs_bsc_verify() runs on test_CT {
+function f_ctrs_bsc_verify() runs on test_CT {
f_counter_name_vals_expect_n(IPA_CTRL, "bsc", g_ctr_bsc);
}
@@ -870,7 +871,7 @@ private function f_ctrs_bsc_verify() runs on test_CT {
* f_do_thing();
* f_ctrs_bsc_expect("thing", 1);
*/
-private function f_ctrs_bsc_expect(charstring countername, integer val := 1) runs on test_CT {
+function f_ctrs_bsc_expect(charstring countername, integer val := 1) runs on test_CT {
f_ctrs_bsc_add(countername, val);
f_ctrs_bsc_verify();
}
@@ -1817,7 +1818,7 @@ type record DchanTuple {
type record of DchanTuple DchanTuples;
/* Send CHAN RQD and wait for allocation; acknowledge it */
-private function f_chreq_act_ack(OCT1 ra := '23'O,
+function f_chreq_act_ack(OCT1 ra := '23'O,
GsmFrameNumber fn := 23,
BtsTrxIdx idx := {0, 0})
runs on test_CT return RslChannelNr {
@@ -4831,19 +4832,19 @@ testcase TC_assignment_codec_amr_h_start_mode_4() runs on test_CT {
f_shutdown_helper();
}
-private function f_disable_all_tch_f() runs on test_CT {
+function f_disable_all_tch_f() runs on test_CT {
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 1 sub-slot 0 borken");
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 2 sub-slot 0 borken");
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 3 sub-slot 0 borken");
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 4 sub-slot 0 borken");
}
-private function f_disable_all_tch_h() runs on test_CT {
+function f_disable_all_tch_h() runs on test_CT {
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 5 sub-slot 0 borken");
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 5 sub-slot 1 borken");
}
-private function f_enable_all_tch() runs on test_CT {
+function f_enable_all_tch() runs on test_CT {
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 1 sub-slot 0 unused");
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 2 sub-slot 0 unused");
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 3 sub-slot 0 unused");
@@ -4852,17 +4853,17 @@ private function f_enable_all_tch() runs on test_CT {
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 5 sub-slot 1 unused");
}
-private function f_disable_all_sdcch() runs on test_CT {
+function f_disable_all_sdcch() runs on test_CT {
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 0 sub-slot 0 borken");
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 0 sub-slot 1 borken");
- f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 0 sub-slot 2 borken");
+ /* sub-slot 2 is in CCCH mode */
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 0 sub-slot 3 borken");
}
-private function f_enable_all_sdcch() runs on test_CT {
+function f_enable_all_sdcch() runs on test_CT {
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 0 sub-slot 0 unused");
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 0 sub-slot 1 unused");
- f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 0 sub-slot 2 unused");
+ /* sub-slot 2 is in CCCH mode */
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 0 sub-slot 3 unused");
}
diff --git a/bsc/BSC_Tests_2.ttcn b/bsc/BSC_Tests_2.ttcn
new file mode 100644
index 00000000..398c8057
--- /dev/null
+++ b/bsc/BSC_Tests_2.ttcn
@@ -0,0 +1,62 @@
+module BSC_Tests_2 {
+
+import from BSC_Tests all;
+
+import from Misc_Helpers all;
+import from General_Types all;
+import from Osmocom_Types all;
+import from GSM_Types all;
+import from IPL4asp_Types all;
+
+import from BSSAP_Types all;
+import from RAN_Adapter all;
+import from RAN_Emulation all;
+import from BSSAP_LE_Adapter all;
+import from BSSAP_LE_CodecPort all;
+import from BSSAP_LE_Types all;
+import from BSSLAP_Types all;
+import from BSSAP_CodecPort all;
+import from BSSMAP_Templates all;
+import from IPA_Emulation all;
+import from IPA_CodecPort all;
+import from IPA_Types all;
+import from IPA_Testing all;
+import from RSL_Types all;
+import from RSL_Emulation all;
+import from MGCP_Emulation all;
+import from MGCP_Templates all;
+import from MGCP_Types all;
+import from MGCP_CodecPort all;
+
+import from Osmocom_CTRL_Functions all;
+import from Osmocom_CTRL_Types all;
+import from Osmocom_CTRL_Adapter all;
+
+import from StatsD_Types all;
+import from StatsD_CodecPort all;
+import from StatsD_CodecPort_CtrlFunct all;
+import from StatsD_Checker all;
+
+import from Osmocom_VTY_Functions all;
+import from TELNETasp_PortType all;
+
+import from MobileL3_CommonIE_Types all;
+import from MobileL3_Types all;
+import from MobileL3_RRM_Types all;
+import from L3_Templates all;
+import from GSM_RR_Types all;
+
+import from SCCP_Templates all;
+import from BSSMAP_Templates all;
+import from BSSMAP_LE_Templates all;
+
+import from SCCPasp_Types all;
+
+import from GSM_SystemInformation all;
+import from GSM_RestOctets all;
+import from TCCConversion_Functions all;
+import from MSC_ConnectionHandler all;
+
+control {
+}
+}