Commit Graph

23 Commits

Author SHA1 Message Date
Pau Espin 6a846bca2c library: Add template helpers for AoIP Transport Layer Address
This way one can simply pass an IP addr in string format and return the
IE no matter the IP version.

Change-Id: I743dbb7c89e504762498b7f278c12e130352e5f0
2020-09-07 08:05:28 +00:00
Vadim Yanitskiy 9b4e356886 library/IPA_Emulation: assume TRX#0 in ASP_RSL_Unitdata templates
Change-Id: I93297680a2644516870222c2bb8eee03c6b575a9
2020-05-25 22:14:04 +07:00
Vadim Yanitskiy 61564be045 library/IPA: split t_ASP_IPA_EVT_UD into send / receive templates
Change-Id: Ib5494bff3f9aa0ac396b729c326e7b4a64c5a5dd
2020-05-18 20:47:14 +07:00
Pau Espin e8d7d16f13 Split templates in RLCMAC_{CSN1_}Types into their own _Templates file
RLCMAC blocks have a lot of fields and we will potentially require lots
of different templates, as well as functions to handle related structs.

Change-Id: I9c6597178168aa3848b21930f33be698dd2ce545
2020-04-29 19:07:38 +02:00
Pau Espin acc5119bac lib/IPA_Emulation: Build IPA_CTRL conditionally based on define
Change-Id: I4d1eca6b0008a395b7f7449e6ea3f9b6d41133c7
2019-06-13 16:33:49 +02:00
Pau Espin fe0c6083bd Depend on our own fork of titan.ProtocolModules.BSSMAP
Since we use some BSSMAP extensions to signal Osmux, we need to maintain
our own fork of BSSMAP_Types in order to supports those IEs in BSSMAP
RESET and BSSMAP Assin Req/Compl. Hence, switch all build componenets to
fetch and use our fork.

Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af
Change-Id: Ic8debe5f3ffe8e1d4258fa6b4632a3871b99af40
2019-05-21 10:28:53 +00:00
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
Daniel Willmann afce86630c Stop tests after failures
Call mtc.stop after setverdict(fail), add reasons to most failures and
fail with verdict error for internal errors.

Change-Id: I9b618235939fa41160b9be6677b121963d3ec857
2018-07-24 14:19:42 +02:00
Harald Welte 9220f6336e Print more self-explanatory error message on bind/connect failures
When sockets cannot be bound or connected, the existing TTCN-3 code prints
the following rather cryptic error messages:

"IPA-CTRL-IPA(47)@f70ff1fd5cfd: Dynamic test case error: Using the value of an optional field containing omit. (Transport endpoint is not connected)"

The "Transport endpoint is not connected" sort-of gives it away, but
let's make it more explicit by introducing explicit checks for the
res.connId and manual setverdict(fail) statements with proper error
message.

Change-Id: Id22a1b5189d81c4fca03d5e7aff60ffdd1ad56bf
2018-05-23 20:27:02 +02:00
Harald Welte 30010711f5 selftest: Remove unneeded broken symlink
Change-Id: I41f062e7658665e13d7ccbfecd6c5788d9b37a75
2018-03-18 12:52:23 +01:00
Harald Welte c87abfcb60 Remove M3UA/MTP3/SCCP code from this repo, use upstream repos
Originally, this code was not yet in an official upstream git repo.
However, it has been for many months, so let's remove our local copy
and use upstream git repositories like for all the other modules.

Change-Id: I2c616fb865df32cfec323d42e5d0d06de40c497b
2018-03-18 12:52:20 +01:00
Neels Hofmeyr cd11223c0f ignore results of .ttcnpp files
Add another macro ignore_pp_results to gen_links.sh.inc and call from all
gen_links.sh files, to add results of *.ttcnpp files, i.e. generated *.ttcn
files, to .gitignore.

Change-Id: Ic7fb176226771212d7700dafaf27ac71f12a4a61
2018-03-16 18:25:58 +01:00
Neels Hofmeyr 53fb0cf22b gen_links.sh: auto-generate .gitignore files to ignore symlinks
In each subdir that is a target for symlinks, automatically ignore the results
of gen_links():

- At the top of gen_links.sh.inc, clear the .gitignore.
- In the loop, add each link name to the local .gitignore.
- In selected gen_links.sh, there is also a "manual" link creationg. So that
  this also ends up in the local .gitignore, have the link creation as separate
  gen_link() macro which at the same time adds to ./.gitignore.
- in the root .gitignore, ignore all the subdirs' generated */.gitignore files.

Change-Id: I73c11fe8362358bf7e1bdf0e1be53399b5d3351b
2018-03-16 00:08:08 +01:00
Neels Hofmeyr 1a4c4601d7 fix gen_links.sh: don't include source dir as link target
First of all, use one common place to define the gen_links() macro, in
gen_links.sh.inc.

In this new file, add a 'shift' to exclude the $DIR arg from also appearing in
$FILES.

This prevents the following wrong symlinks in the source dirs:

  M3UA_CNL113537/src/src
  MTP3asp_CNL113337/src/src
  SCCP_CNL113341/src/src

Change-Id: Ia8493e77df1ba8723f2c5d2a49816247b0fb55f7
2018-03-16 00:08:02 +01:00
Harald Welte df277258f1 IPA_Emulation: Make dependencies to RSL/MGCP/SCCP/GSUP conditional
Let's use the preprocessor to avoid IPA_Emulation pulling *all*
dependencies into each and any of our projects.  The code readability
suffers a bit from the many #ifdefs, but compilation speed increases
if we don't have to pull in all those (recursive) dependencies.

After all, a BTS test case will never need SCCP, GSUP or MGCP.

Change-Id: Ic0231adbd2171214de133d26b3fbf36130ee8aa0
2018-02-20 16:17:17 +01:00
Max 6367d7b807 Don't symlink non-existent file
Change-Id: I10309f07fb207c027703f0b43a478c152a029b6d
2018-02-05 16:58:27 +01:00
Harald Welte 818b6e4225 Add "SourceInfoFormat := Single;" to all test configs
This will make sure that all log files will contain information about
the .ttcn source file name and line number that has caused the log,
which is extremely useful during debugging.

Change-Id: Id6785757f20279ba84b34747f878baf67d065b20
2018-01-17 11:11:29 +00:00
Harald Welte df32723446 GSUP Support and first test against OsmoHLR
Change-Id: Idd7a6aca1ab193da39294f49a3adc4c1cd7cecff
2017-12-28 23:17:24 +01:00
Harald Welte 20a58c6d6f generalize shared code from regen_makefile.sh into shared helper script
Change-Id: I86a738420851a7d9e3bdb2671f6862c3d505a4ba
2017-12-13 01:04:42 +01:00
Harald Welte 2a83b0ffcb selftest: Fix Makefile generation on TITAN 6.1.0
Change-Id: I7720972573281a1df0be99f769217f9aa3bea7d6
2017-12-13 00:50:11 +01:00
Harald Welte 06e05a4a6c selftest: Fix typo in gen_links.sh 2017-12-12 16:47:31 +01:00
Harald Welte 6807982106 Makefile: clone dependencies into 'deps' folder
We used to rely on out-of-tree git clones to be prepared by the user.

This commit changes the system to make sure we clone all git repos
we depend upon into the 'deps' folder, and then setup the symlinks
to that folder.  As a result, we should be able to support
self-contained builds using the makefiles in this repo.
2017-12-12 16:30:53 +01:00
Harald Welte f6bd980fdd Selftest: Add first baby-steps for self-testing our TTCN-3 library code 2017-12-12 14:56:02 +01:00