Makefile convenience: add VTY_TEST var to run only one test
VTY transcript tests run all *.vty test scripts, and it is not so
trivial to figure out the test-db creation and cmdline to run only one
of them when debugging. Add VTY_TEST var, useful to pick one test on the
cmdline:
cd tests
make vty-test VTY_TEST=test_nodes.vty
Not all VTY tests leave files behind that match hlr_vty_test.db-*, so
make sure that make does not fail it they can't be deleted (rm -f).
Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 357fbac..62001f6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -52,6 +52,7 @@
endif
VTY_TEST_DB = hlr_vty_test.db
+VTY_TEST ?= *.vty
# To update the VTY script from current application behavior,
# pass -u to vty_script_runner.py by doing:
@@ -63,9 +64,8 @@
osmo_verify_transcript_vty.py -v \
-n OsmoHLR -p 4258 \
-r "$(top_builddir)/src/osmo-hlr -c $(top_srcdir)/doc/examples/osmo-hlr.cfg -l $(VTY_TEST_DB)" \
- $(U) $(srcdir)/*.vty
- -rm -f $(VTY_TEST_DB)
- -rm $(VTY_TEST_DB)-*
+ $(U) $(srcdir)/$(VTY_TEST)
+ -rm -f $(VTY_TEST_DB) $(VTY_TEST_DB)-*
CTRL_TEST_DB = hlr_ctrl_test.db