pespin has uploaded this change for review.

View Change

stp: STP_Tests_IPA: Support configuring less than 8 AS(P)s

This is a preparation patch towards splitting testsuite into smaller
configurations.

Change-Id: I820d295cd22fe824abf0f60bf6f1f0f3fd069d85
---
M stp/STP_Tests_IPA.ttcn
1 file changed, 7 insertions(+), 7 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/22/40322/1
diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn
index b7da439..3e484cb 100644
--- a/stp/STP_Tests_IPA.ttcn
+++ b/stp/STP_Tests_IPA.ttcn
@@ -34,7 +34,7 @@

import from STP_Tests_Common all;

-private const integer NR_IPA := 8;
+private const integer MAX_NR_IPA := 8;

type record of charstring AspNameArray;

@@ -57,10 +57,10 @@
type component IPA_CT extends Test_CT {
/* for IPA we use the IPA_Emulation and not directly IPA_CodecPort to avoid
* having to re-invent IPA CCM handling here */
- port MTP3asp_PT IPA[NR_IPA];
- port IPA_SP_PT IPA_CTRL[NR_IPA];
- var IPA_Emulation_CT vc_IPA[NR_IPA];
- var IPA_CCM_Parameters g_ccm_pars[NR_IPA];
+ port MTP3asp_PT IPA[MAX_NR_IPA];
+ port IPA_SP_PT IPA_CTRL[MAX_NR_IPA];
+ var IPA_Emulation_CT vc_IPA[MAX_NR_IPA];
+ var IPA_CCM_Parameters g_ccm_pars[MAX_NR_IPA];
}

friend function f_IPA_send(integer idx, octetstring data) runs on IPA_CT {
@@ -102,7 +102,7 @@

f_init_common();

- for (i := 0; i < NR_IPA; i:=i+1) {
+ for (i := 0; i < lengthof(mp_ipa_as_names); i:=i+1) {
vc_IPA[i] := IPA_Emulation_CT.create("IPA" & int2str(i));
map(vc_IPA[i]:IPA_PORT, system:IPA_CODEC_PT);
connect(self:IPA[i], vc_IPA[i]:MTP3_SP_PORT);
@@ -116,7 +116,7 @@
var integer port_offset := 0;
if (use_unknown_asp_port) {
/* Add 100 to the port since we know that port is not configured in any
- ASP only up to NR_IPA are configured. */
+ ASP only up to MAX_NR_IPA are configured. */
port_offset := 100;
}
vc_IPA[idx].start(IPA_Emulation.main_client(mp_stp_ipa_ip, mp_stp_ipa_port, mp_local_ipa_ip,

To view, visit change 40322. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I820d295cd22fe824abf0f60bf6f1f0f3fd069d85
Gerrit-Change-Number: 40322
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>