neels has uploaded this change for review.

View Change

add CTRL transcript tests for cnpool rate ctrs

Related: SYS#6412
Change-Id: I5a9a23c10e3ac85dabbb1d367351bb7c5dfe2526
---
M tests/Makefile.am
A tests/test_nodes.ctrl
2 files changed, 34 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/35/33135/1
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f34d9a0..63ce3fe 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,6 +26,7 @@
$(TESTSUITE) \
osmo-hnbgw-vty-test.cfg \
$(srcdir)/*.vty \
+ $(srcdir)/*.ctrl \
$(srcdir)/config/*.cfg \
$(srcdir)/config/*.vty \
$(srcdir)/config/run_tests.sh \
@@ -68,6 +69,18 @@
config-tests:
$(srcdir)/config/run_tests.sh "$(top_builddir)/src/osmo-hnbgw/osmo-hnbgw" "$(srcdir)/config/" $U

+# Run a specific test with: 'make ctrl-test CTRL_TEST=osmo-hnbgw.ctrl'
+CTRL_TEST ?= *.ctrl
+
+# To update the CTRL script from current application behavior,
+# pass -u to ctrl_script_runner.py by doing:
+# make ctrl-test U=-u
+ctrl-test: $(top_builddir)/src/osmo-hnbgw/osmo-hnbgw
+ osmo_verify_transcript_ctrl.py -v \
+ -p 4262 \
+ -r "$(top_builddir)/src/osmo-hnbgw/osmo-hnbgw -c $(top_srcdir)/doc/examples/osmo-hnbgw/osmo-hnbgw.cfg" \
+ $(U) $(srcdir)/$(CTRL_TEST)
+
check-local: atconfig $(TESTSUITE)
$(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
$(MAKE) $(AM_MAKEFLAGS) python-tests
diff --git a/tests/test_nodes.ctrl b/tests/test_nodes.ctrl
new file mode 100644
index 0000000..2ce5428
--- /dev/null
+++ b/tests/test_nodes.ctrl
@@ -0,0 +1,11 @@
+GET 1 rate_ctr.abs.iucs.0.cnpool:subscr:no_cnlink
+GET_REPLY 1 rate_ctr.abs.iucs.0.cnpool:subscr:no_cnlink 0
+
+GET 2 rate_ctr.abs.iups.0.cnpool:emerg:lost
+GET_REPLY 2 rate_ctr.abs.iups.0.cnpool:emerg:lost 0
+
+GET 3 rate_ctr.abs.msc.0.cnpool:subscr:new
+GET_REPLY 3 rate_ctr.abs.msc.0.cnpool:subscr:new 0
+
+GET 4 rate_ctr.abs.sgsn.0.cnpool:emerg:forwarded
+GET_REPLY 4 rate_ctr.abs.sgsn.0.cnpool:emerg:forwarded 0

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

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I5a9a23c10e3ac85dabbb1d367351bb7c5dfe2526
Gerrit-Change-Number: 33135
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
Gerrit-MessageType: newchange