aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2021-12-14 17:25:48 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-01-23 00:12:17 +0100
commit8bdafe5be6af99ce4dc51bb771fc274937b2386c (patch)
tree1feca5676b74a407f386dfe8b3bf56d21a6b7cd4
parent589972fead1c31d98da80492e635dfcb40bbb386 (diff)
bsc: make perform_clear() work when VTY is not initialized
To be able to invoke perform_clear() also in tests where the VTY isn't used, in f_logp() only access the VTY when it is actually ready. Otherwise this causes an error and a failed test, for no good reason. Related: OS#5337 Change-Id: I8116075f32937bd06ba14b426010bf6fec2ef402
-rw-r--r--bsc/BSC_Tests.ttcn4
1 files changed, 3 insertions, 1 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 0dd44400..891d3402 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1077,7 +1077,9 @@ friend function f_logp(TELNETasp_PT pt, charstring log_msg)
// log on TTCN3 log output
log(log_msg);
// log in stderr log
- f_vty_transceive(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg);
+ if (pt.checkstate("Mapped")) {
+ f_vty_transceive(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg);
+ }
}
private function f_sysinfo_seen(integer rsl_idx, RSL_Message rsl) runs on test_CT