This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/7018 hlr: Integrate VTY and CTRL support Change-Id: I3fbc26a98d31df6d4753848bba655a517801d686 --- A hlr/HLR_Tests.cfg A hlr/HLR_Tests.default M hlr/HLR_Tests.ttcn M hlr/gen_links.sh M hlr/regen_makefile.sh 5 files changed, 64 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/18/7018/1 diff --git a/hlr/HLR_Tests.cfg b/hlr/HLR_Tests.cfg new file mode 100644 index 0000000..98b9e27 --- /dev/null +++ b/hlr/HLR_Tests.cfg @@ -0,0 +1,18 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./HLR_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] diff --git a/hlr/HLR_Tests.default b/hlr/HLR_Tests.default new file mode 100644 index 0000000..d29f2dd --- /dev/null +++ b/hlr/HLR_Tests.default @@ -0,0 +1,18 @@ +[LOGGING] +mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING; // | DEBUG_ENCDEC; + +[TESTPORT_PARAMETERS] +*.VTY.CTRL_MODE := "client" +*.VTY.CTRL_HOSTNAME := "127.0.0.1" +*.VTY.CTRL_PORTNUM := "4241" +*.VTY.CTRL_LOGIN_SKIPPED := "yes" +*.VTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes" +*.VTY.CTRL_READMODE := "buffered" +*.VTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" +*.VTY.PROMPT1 := "OsmoHLR> " + +[MODULE_PARAMETERS] +Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoHLR"; + +[EXECUTE] +HLR_Tests.control diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index 60268b7..c48592e 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -3,10 +3,17 @@ import from GSUP_Types all; import from IPA_Emulation all; -type component test_CT { +import from Osmocom_CTRL_Adapter all; + +import from Osmocom_VTY_Functions all; +import from TELNETasp_PortType all; + +type component test_CT extends CTRL_Adapter_CT { var IPA_Emulation_CT vc_IPA; var IPA_CCM_Parameters ccm_pars; port IPA_GSUP_PT GSUP; + + port TELNETasp_PT VTY; }; modulepar { @@ -14,6 +21,12 @@ integer mp_hlr_gsup_port := 4222; integer mp_hlr_ctrl_port := 4259; }; + +function f_init_vty() runs on test_CT { + map(self:VTY, system:VTY); + f_vty_set_prompts(VTY); + f_vty_transceive(VTY, "enable"); +} function f_init() runs on test_CT { ccm_pars := c_IPA_default_ccm_pars; @@ -23,6 +36,10 @@ map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT); connect(vc_IPA:IPA_GSUP_PORT, self:GSUP); vc_IPA.start(IPA_Emulation.main_client(mp_hlr_ip, mp_hlr_gsup_port, "", -1, ccm_pars)); + + f_init_vty(); + + f_ipa_ctrl_start(mp_hlr_ip, mp_hlr_ctrl_port); } testcase TC_gsup_sai_err_invalid_imsi() runs on test_CT { diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh index 8e07974..f63f07b 100755 --- a/hlr/gen_links.sh +++ b/hlr/gen_links.sh @@ -24,7 +24,13 @@ FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" gen_links $DIR $FILES +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES + DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn -IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp Osmocom_CTRL_Types.ttcn GSUP_Types.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp GSUP_Types.ttcn " +FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " +FILES+="Osmocom_VTY_Functions.ttcn " + gen_links $DIR $FILES diff --git a/hlr/regen_makefile.sh b/hlr/regen_makefile.sh index 26faca7..56f6671 100755 --- a/hlr/regen_makefile.sh +++ b/hlr/regen_makefile.sh @@ -2,8 +2,8 @@ MAIN="HLR_Tests.ttcn" -FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc" +FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc" -export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP" +export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP -DIPA_EMULATION_CTRL" ../regen-makefile.sh $MAIN $FILES -- To view, visit https://gerrit.osmocom.org/7018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3fbc26a98d31df6d4753848bba655a517801d686 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org>