osmo-ttcn3-hacks/bsc-nat
Daniel Willmann d93047434b Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
This function can now be called from anywhere to try and safely shutdown
a testcase. It is not optimal as we can't call "all component.stop" from
outside the mtc, but without any proper and orderly shutdown handling of
all our emulation components I believe this is the best we can do.

To use it:

import from Misc_Helpers all;

in your module and then call

Misc_Helpers.f_shutdown(__BFILE__, __LINE__);

You can also pass the function a verdict and a message and it will take care
of calling setverdict, but beware of the following:

While setverdict would accept any number of arguments as log message
and convert them to a log string f_shutdown expects one charstring.
It's possible to use the log2str function to use the log arguments in
setverdict for f_shutdown, for example

setverdict(fail, "Template didn't match: ", tmpl_foo);
would become
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Template didn't match: ", tmpl_foo));

Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
2018-10-24 15:10:13 +02:00
..
BSC_MS_ConnectionHandler.ttcn MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_TYPE 2018-01-24 23:05:32 +01:00
BSC_MS_Simulation.ttcn BSSMAP_Emulation: use BSSAP_CodecPort 2017-12-17 11:04:32 +01:00
IPA_Test.cfg Add "SourceInfoFormat := Single;" to all test configs 2018-01-17 11:11:29 +00:00
IPA_Test.ttcn rename 'ipa' directory to 'bsc-nat' 2017-11-25 02:32:50 +01:00
MGCP_Adapter.ttcn Print more self-explanatory error message on bind/connect failures 2018-05-23 20:27:02 +02:00
MSC_ConnectionHandler.ttcn don't use setverdict(inconc) anymore. Use 'fail' at all times 2018-03-21 11:27:48 +01:00
MSC_Simulation.ttcn BSSMAP_Emulation: use BSSAP_CodecPort 2017-12-17 11:04:32 +01:00
gen_links.sh Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
regen_makefile.sh Remove M3UA/MTP3/SCCP code from this repo, use upstream repos 2018-03-18 12:52:20 +01:00