Harald Welte has submitted this change and it was merged.

Change subject: bsc: fix shutdown
......................................................................


bsc: fix shutdown

Change-Id: I23932927bd6bb9b5e447acbeafc2748a77513a0d
---
M bsc/BSC_Tests.ttcn
M library/Osmocom_CTRL_Adapter.ttcn
2 files changed, 19 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 07f2ac7..a2111fd 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -110,6 +110,12 @@
 }
 
 private function f_shutdown_helper() runs on test_CT {
+       for (var integer i := 0; i < NUM_BTS; i := i+1) {
+               if (isbound(bts[i]) and isbound(bts[i].rsl)) {
+                       f_ipa_rsl_stop(bts[i].rsl);
+               }
+       }
+       f_ipa_ctrl_stop();
        all port.stop;
        setverdict(pass);
 }
@@ -195,6 +201,16 @@
        }
 }
 
+function f_ipa_rsl_stop(inout IPA_Client clnt) runs on test_CT {
+       if (not isbound(clnt) or not isbound(clnt.vc_IPA)) {
+               return;
+       }
+       clnt.vc_IPA.stop;
+       if (isbound(clnt.vc_RSL)) {
+               clnt.vc_RSL.stop;
+       }
+}
+
 /* Wait for the OML connection to be brought up by the external 
osmo-bts-omldummy */
 function f_wait_oml(integer bts_nr, charstring status, float secs_max) runs on 
test_CT {
        timer T := secs_max;
diff --git a/library/Osmocom_CTRL_Adapter.ttcn 
b/library/Osmocom_CTRL_Adapter.ttcn
index 4cfe739..9baa6a2 100644
--- a/library/Osmocom_CTRL_Adapter.ttcn
+++ b/library/Osmocom_CTRL_Adapter.ttcn
@@ -42,7 +42,9 @@
        }
 }
 
-
+function f_ipa_ctrl_stop() runs on CTRL_Adapter_CT {
+       vc_CTRL_IPA.stop;
+}
 
 
 /* BSC specific CTRL helper functions */

-- 
To view, visit https://gerrit.osmocom.org/7356
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I23932927bd6bb9b5e447acbeafc2748a77513a0d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to