remsim: add the guard timeout to all test cases

As can be seen [1], it happens quite often that a test case gets
stuck and runs forever.  Most of the existing test suites have
the guard timeout to prevent this.  Let's make use of it here too.

[1] https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-remsim-test-latest/190/
	Build has been executing for 1 day 23 hr!

Change-Id: I3897efd2a97c3e0d487057aa7bdc2967f3424dd8
diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn
index 499fd3e..d7d6bc7 100644
--- a/remsim/RemsimClient_Tests.ttcn
+++ b/remsim/RemsimClient_Tests.ttcn
@@ -15,6 +15,7 @@
 import from Native_Functions all;
 import from Osmocom_Types all;
 import from IPA_Emulation all;
+import from Misc_Helpers all;
 
 /* the PIPEasp port allows us to interact with osmo-remsim-client-shell via stdin/stdout */
 import from PIPEasp_PortType all;
@@ -33,12 +34,24 @@
 type component client_test_CT extends rspro_server_CT {
 	port PIPEasp_PT PIPE;
 	var ComponentIdentity g_srv_comp_id, g_bankd_comp_id;
+	timer g_T_guard := 60.0;
 };
 
+private altstep as_Tguard() runs on client_test_CT {
+	[] g_T_guard.timeout {
+		setverdict(fail, "Timeout of T_guard");
+		Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+		}
+}
+
 private function f_init() runs on client_test_CT {
 	g_srv_comp_id := valueof(ts_CompId(remsimServer, "ttcn-server"));
 	g_bankd_comp_id := valueof(ts_CompId(remsimBankd, "ttcn-bankd"));
 
+	/* Start the guard timer */
+	g_T_guard.start;
+	activate(as_Tguard());
+
 	f_rspro_srv_init(0, mp_server_ip, mp_server_port, g_srv_comp_id);
 	f_rspro_srv_init(1, mp_bankd_ip, mp_bankd_port, g_bankd_comp_id, exp_connect := false);
 }