Osmocom test suites in TTCN-3 (Eclipse Titan) https://osmocom.org/projects/core-testing-infra
Go to file
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
COMMON initial chekin of code received by Ericsson on 20170410 2017-04-12 12:13:44 +02:00
ROHC_CNL113426_LATEST import Ericsson NS, ISUP, ROHC and SNDCP modules for TITAN 2017-07-25 08:23:52 +02:00
SCCP_Test Change addressing configuration to match libosmo-sigtran m3ua_test 2017-04-12 12:18:28 +02:00
bin Remove M3UA/MTP3/SCCP code from this repo, use upstream repos 2018-03-18 12:52:20 +01:00
bsc Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
bsc-nat Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
bts bts: Disable testing FACCH/H with real HW 2018-10-23 10:35:15 +00:00
deps use tag for test dependency commit 2018-10-12 16:34:46 +02:00
doc add ttcn3 test suites slides from OsmoDevCon 2018 2018-09-16 12:39:51 +02:00
ggsn_tests Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
hlr Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
lapdm Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
library Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
mgw Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
msc Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
pcu Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
sccp Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
selftest Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
sgsn Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
sip Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
sysinfo Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
.gitignore add compare-results.sh, call from start-testsuite.sh 2018-04-06 01:07:15 +02:00
.gitreview Add git-review config 2017-12-13 11:15:48 +01:00
Common.cfg Make Console Loggign a bit more verbose: add all USER "log()" 2018-03-18 14:16:37 +01:00
Makefile introduce a TTCN3 test suite for SCCP 2018-07-24 19:05:10 +00:00
compare-results.sh compare_results.sh: less drastic wording 2018-09-06 14:35:07 +02:00
gen_links.sh.inc ignore results of .ttcnpp files 2018-03-16 18:25:58 +01:00
log_merge.sh log_merge.sh: Fix removal of log files 2018-03-20 22:21:57 +01:00
mask_expected_results.sh add mask_expected_results.sh 2018-04-11 19:32:01 +02:00
regen-makefile.sh support ccache to speed up ttcn3 test compilation 2018-04-06 16:58:46 +00:00
rmlinks.sh Remove M3UA/MTP3/SCCP code from this repo, use upstream repos 2018-03-18 12:52:20 +01:00
start-testsuite.sh fix build: don't clean out expected-results.log: rename to *.xml 2018-04-11 19:29:18 +02:00
ttcn3-tcpdump-start.sh ttcn3-tcpdump-start.sh: reduce snaplen of tcpdump 2018-05-15 20:54:54 +00:00
ttcn3-tcpdump-stop.sh ttcn3-tcpdump-stop.sh: print colored verdict 2018-06-23 11:43:00 +00:00
update_expected_results_from_jenkins.sh add update_expected_results_from_jenkins.sh 2018-04-11 19:49:36 +02:00