Commit Graph

57 Commits

Author SHA1 Message Date
Oliver Smith f8fe1329e2 regen_makefile.sh: set executable name explicitly
Set the executable name in each regen_makefile.sh explicitly with -e,
instead of having it set indirectly from the first .ttcn file. Make it
consistent by placing the name on top of each of these files.

Fix for warning:
ttcn3_makefilegen: warning: File `BSC_Tests.ttcn' was given more than once for the Makefile.

Related: OS#5252
Change-Id: I5ed03f8f3ed905483620dc7bae33b617bbb8507f
2021-10-13 11:12:22 +02:00
Oliver Smith 2e0e624060 regen_makefile.sh: files/flags in separate lines
Make all regen_makefile.sh more readable and diff friendly by moving
each entry in FILES and CPPFLAGS_TTCN3 into separate lines. Order
entries alphabetically.

Related: OS#5252
Change-Id: I6b6866eb9f6ec6232e4ae434517457a4c8c1c050
2021-10-12 16:35:01 +02:00
Vadim Yanitskiy 27b3801bed library/GSM_RR_Types: add minimalistic AssignmentCommand
Unfortunately, the existing implementation [1] is somewhat
incomplete and unfriendly to build templates on:

  - some fields holding integer numbers defined as BITx,
    so we would have to do bit2int() / int2bit();

  - some bit-map fields defined as octetstrings;

  - some fields are not decoded at all (raw octetstrings).

Let's work this around by defining a minimalistic implementation
of (RR) Assignment Command with all mandatory and some optional
fields.  Reuse some IEs directly from MobileL3_RRM_Types.

[1] titan.ProtocolModules.MobileL3_v13.4.0
    MobileL3_RRM_Types.PDU_RRM_AssignmentCommand_NW_MS

Change-Id: If1a5244a688abed6e6de2bf3f6e19e0e28129ea5
Related: SYS#4868, OS#4545
2020-09-01 14:43:33 +07:00
Neels Hofmeyr a5f0ed2ba4 GSM_SystemInformation: use GSM_RestOctets for SI3 and SI4 rest_octets
Change-Id: I3f00dd0b4863582fc5edf08149103150b8b5e97b
2020-07-06 16:49:52 +00: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 86904080a3 RLCMAC_CSN1_Types.ttcn: Support encoding of MS Radio Access Capability 2
Change-Id: Iac7d7b694bc44887443418f755e51d636abe8575
2019-12-31 16:35:29 +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
Neels Hofmeyr fc0384a046 mask timestamps and source file nrs in expected-results.xml files
Prepare for upcoming updates with concise diffs.

Change-Id: Ic9f006aa8db1b477598605e0525faeb229b03641
2018-04-11 19:32:01 +02:00
Neels Hofmeyr 1fd6679d9d fix build: don't clean out expected-results.log: rename to *.xml
'make clean' as generated by ttcn3_makefilegen removes all *.log files, which
of course cleans out expected-results.log, which should not happen. Since this
is a junit XML file, rename the suffix to .xml.

Change-Id: Ic334f6b758eef865e3a497aa430691a3ae696d25
2018-04-11 19:29:18 +02:00
Neels Hofmeyr 3cf797d7a5 add compare-results.sh, call from start-testsuite.sh
Compare current test results to the expected results, and exit in error on
discrepancies.

Add compare-result.sh: (trivially) grep junit xml output to determine which
tests passed and which didn't, and compare against an expected-result.log,
another junit file from a previous run. Summarize and determine success.

Include an "xfail" feature: tests that are expected to fail are marked as
"xfail", unexpected failures as "FAIL".

In various subdirs, copy the current jenkins jobs' junit xml outputs as
expected-results.log, so that we will start getting useful output in both
jenkins runs and manual local runs.

In start-testsuite.sh, after running the tests, invoke the results comparison.

Due to the single-line parsing nature, the script so far does not distinguish
between error and failure. I doubt that we actually need to do that though.

Related: OS#3136
Change-Id: I87d62a8be73d73a5eeff61a842e7c27a0066079d
2018-04-06 01:07:15 +02: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 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 82ccef7c18 Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation
Let's have one SI3 definition rather than multiple...

Change-Id: I3c4754c9a69cb2fa51d88ef6358d5399dbb29860
2018-02-25 16:17:33 +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 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 9fbe93f532 regen_makefile.sh: Fix TITAN 6.1.0 support
When introducing the rewriting for 6.3.0 we broke the 6.1.0 support.
Now the result should build on Debian with both 6.1.0 and 6.3.0

Change-Id: I263a6abd2d9eb15ce5778ef8dbfcdac2a228b77d
2017-12-13 00:50:11 +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 140714d89d regen_makefile.sh: Add Regex's for TITAN 6.3.0
The TITAN 6.3.0 makefile generator needs some new regular expressions
for patching the generated makefile to work on Debian
2017-12-08 14:03:28 +01:00
Harald Welte 244cd8acf7 sysinfo: Fix the TC_telnet test case VTY command order 2017-08-26 09:25:20 +02:00
Harald Welte 5fe11cd6b0 sysinfo: Use ttcn3-parallel (to unify with other test suiets) 2017-08-20 23:08:57 +02:00
Harald Welte 0b7545dff1 sysinfo: build dynamic to enable use of junit-xml logfile plugin
also remove libnetfilter-conntrack linkage, whcih was a copy+paste
error.
2017-08-20 22:59:13 +02:00
Harald Welte f97649269a sysinfo: Fix compilation 2017-08-20 22:47:44 +02:00
Harald Welte 8542cefb8e Move VTY utility functions to new Osmocom_VTY_Functions module
... so it can be reused from other Testsuites/modules
2017-07-19 20:06:26 +02:00
Harald Welte 3b8bdd6358 Introduce 'library' directory for modules shared by multiple test cases 2017-07-19 19:57:26 +02:00
Harald Welte cb5d1fb2ee fix ts_RslLinkID_SACCH template 2017-07-17 21:00:15 +02:00
Harald Welte c3286ccd8c GSM_Types: Add function to compute request reference from RA + FN 2017-07-16 21:04:34 +02:00
Harald Welte b33e7272b5 GSM_TypeS: Add RSL Link Identifier 2017-07-16 21:04:12 +02:00
Harald Welte 57a3150778 GSM_TypeS: Add Mobile Identity type 'NONE' 2017-07-16 21:03:47 +02:00
Harald Welte ad091b6b10 ChannelDescription sometimes used as V, sometimes as LV field 2017-07-16 21:03:17 +02:00
Harald Welte 0c8d5c07ee GSM_Types: Add RSL channel number IE encoder/decoder 2017-07-16 18:53:58 +02:00
Harald Welte 0b1e5b84a3 Export encoding/decoding functions of RR Message 2017-07-16 18:53:17 +02:00
Harald Welte f654332701 first steps towards a L1CTL / LAPD test
The idea here is to implement the L1CTL protocol in TTCN-3 so we can
speak it over a unix domain socket (test port) for simple tasks such as
activating dedicated mode.

This can then subsequently be used for LAPDm testing
2017-07-16 14:25:31 +02:00
Harald Welte d2e342fb7d GSM_Types: More 44.018 + 24.008 definitions for RR 2017-07-16 07:34:13 +02:00
Harald Welte f0a4997efc sysinfo: Add SI contents validation
Next to verifying the SI scheduling, we now also verify the contents of
SI messages depending on the VTY configuration
2017-07-16 04:04:10 +02:00
Harald Welte d7bd30f33b sysinfo: Hugely reduce warnings about unused return values 2017-07-16 03:54:54 +02:00
Harald Welte 75f761f35b use testcase.stop() in case of errors of the test system 2017-07-16 03:05:31 +02:00
Harald Welte 162b160678 add SI3 matching template 2017-07-16 03:05:02 +02:00
Harald Welte d1f74c63ed Match "Unknown command" even if preceded by other strings 2017-07-16 03:04:37 +02:00
Harald Welte fd512cb889 sysinfo: Fail in case VTY returns "Unknown command" 2017-07-16 01:34:40 +02:00
Harald Welte fe1052d321 sysinfo: Further simplification of code 2017-07-16 01:24:01 +02:00
Harald Welte 3927677343 sysinfo: Enforce "1 out of 4" kind of scheduling requirements 2017-07-16 01:08:00 +02:00
Harald Welte c17c88ecbf sysinfo: make timeouts a bit shorter for faster test exscution 2017-07-16 00:39:59 +02:00
Harald Welte bdc5dbd701 Add more SI scheduling testing code, towards a real test suite 2017-07-16 00:38:27 +02:00
Harald Welte 8c5b325483 GSM_SystemInformation: Add support for "OTHER" SIs
This way we can process SIs for which we don't have a more detailed
parser code and simply store their L3 as octetstring.
2017-07-15 23:59:49 +02:00
Harald Welte 9afea36bc2 GSM_SystemInformation: Fix SI2ter description
There's no RachControlParams IE in SI2ter
2017-07-15 23:58:56 +02:00
Harald Welte af54941d98 sysinfo/Test: Add function to validate SI scheduling constraints 2017-07-15 21:38:40 +02:00
Harald Welte a418918e50 GSM_SystemInformation: Share header (for generic matching of type) 2017-07-15 21:38:36 +02:00
Harald Welte a082a696cf Add enumerated for RR Message Type 2017-07-15 15:58:13 +02:00