Change in libosmocore[master]: tests/tdef: rename the binaries to end with '_test'

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Tue Nov 16 23:13:13 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/26305 )


Change subject: tests/tdef: rename the binaries to end with '_test'
......................................................................

tests/tdef: rename the binaries to end with '_test'

It's the usual naming for unit test binaries.  Without the '_test' endig,
the tdef_vty_test_{config_root,config_subnode,dynamic} binaries do not
match the 'tests/*/*_test' pattern and appear as untracked files in git.

Change-Id: I828fa45132e11a41c527d4b25df850c19871cb75
---
M src/tdef.c
M src/vty/tdef_vty.c
M tests/Makefile.am
R tests/tdef/tdef_vty_config_root_test.c
R tests/tdef/tdef_vty_config_root_test.vty
R tests/tdef/tdef_vty_config_subnode_test.c
R tests/tdef/tdef_vty_config_subnode_test.vty
R tests/tdef/tdef_vty_dynamic_test.c
R tests/tdef/tdef_vty_dynamic_test.vty
9 files changed, 25 insertions(+), 25 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/05/26305/1

diff --git a/src/tdef.c b/src/tdef.c
index 9890f95..75b884a 100644
--- a/src/tdef.c
+++ b/src/tdef.c
@@ -52,18 +52,18 @@
  * By keeping separate osmo_tdef arrays, several groups of timers can be kept
  * separately. The VTY tests in tests/tdef/ showcase different schemes:
  *
- * - \ref tests/vty/tdef_vty_test_config_root.c:
+ * - \ref tests/vty/tdef_vty_config_root_test.c:
  *   Keep several timer definitions in separately named groups: showcase the
  *   osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
  *
- * - \ref tests/vty/tdef_vty_test_config_subnode.c:
+ * - \ref tests/vty/tdef_vty_config_subnode_test.c:
  *   Keep a single list of timers without separate grouping.
  *   Put this list on a specific subnode below the CONFIG_NODE.
  *   There could be several separate subnodes with timers like this, i.e.
  *   continuing from this example, sets of timers could be separated by placing
  *   timers in specific config subnodes instead of using the global group name.
  *
- * - \ref tests/vty/tdef_vty_test_dynamic.c:
+ * - \ref tests/vty/tdef_vty_dynamic_test.c:
  *   Dynamically allocate timer definitions per each new created object.
  *   Thus there can be an arbitrary number of independent timer definitions, one
  *   per allocated object.
diff --git a/src/vty/tdef_vty.c b/src/vty/tdef_vty.c
index 09459f1..bd209ae 100644
--- a/src/vty/tdef_vty.c
+++ b/src/vty/tdef_vty.c
@@ -242,7 +242,7 @@
 
 /*! Write current timer configuration arguments to the vty. Skip all entries that reflect their default value.
  * The passed prefix string must contain both necessary indent and the VTY command the specific implementation is using.
- * See tdef_vty_test_config_subnode.c and tdef_vty_test_dynamic.c for examples.
+ * See tdef_vty_config_subnode_test.c and tdef_vty_dynamic_test.c for examples.
  * \param[in] vty  VTY context.
  * \param[in] tdefs  Array of timers to print, ended with a fully zero-initialized entry.
  * \param[in] prefix_fmt  Arbitrary string to start each line with, with variable printf like arguments.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c44b6f0..a6f6017 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,9 +28,9 @@
 		 oap/oap_client_test gsm29205/gsm29205_test		\
 		 logging/logging_vty_test				\
 		 vty/vty_transcript_test				\
-		 tdef/tdef_test tdef/tdef_vty_test_config_root		\
-		 tdef/tdef_vty_test_config_subnode			\
-		 tdef/tdef_vty_test_dynamic				\
+		 tdef/tdef_test tdef/tdef_vty_config_root_test		\
+		 tdef/tdef_vty_config_subnode_test			\
+		 tdef/tdef_vty_dynamic_test				\
 		 sockaddr_str/sockaddr_str_test				\
 		 use_count/use_count_test				\
 		 context/context_test					\
@@ -286,14 +286,14 @@
 tdef_tdef_test_SOURCES = tdef/tdef_test.c
 tdef_tdef_test_LDADD = $(LDADD)
 
-tdef_tdef_vty_test_config_root_SOURCES = tdef/tdef_vty_test_config_root.c
-tdef_tdef_vty_test_config_root_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la
+tdef_tdef_vty_config_root_test_SOURCES = tdef/tdef_vty_config_root_test.c
+tdef_tdef_vty_config_root_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la
 
-tdef_tdef_vty_test_config_subnode_SOURCES = tdef/tdef_vty_test_config_subnode.c
-tdef_tdef_vty_test_config_subnode_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la
+tdef_tdef_vty_config_subnode_test_SOURCES = tdef/tdef_vty_config_subnode_test.c
+tdef_tdef_vty_config_subnode_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la
 
-tdef_tdef_vty_test_dynamic_SOURCES = tdef/tdef_vty_test_dynamic.c
-tdef_tdef_vty_test_dynamic_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la
+tdef_tdef_vty_dynamic_test_SOURCES = tdef/tdef_vty_dynamic_test.c
+tdef_tdef_vty_dynamic_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la
 
 sockaddr_str_sockaddr_str_test_SOURCES = sockaddr_str/sockaddr_str_test.c
 sockaddr_str_sockaddr_str_test_LDADD = $(LDADD)
@@ -402,9 +402,9 @@
 	     vty/vty_transcript_test.vty				\
 	     tdef/tdef_test.ok \
 	     tdef/tdef_test_range_64bit.ok \
-	     tdef/tdef_vty_test_config_root.vty	\
-	     tdef/tdef_vty_test_config_subnode.vty \
-	     tdef/tdef_vty_test_dynamic.vty \
+	     tdef/tdef_vty_config_root_test.vty	\
+	     tdef/tdef_vty_config_subnode_test.vty \
+	     tdef/tdef_vty_dynamic_test.vty \
 	     sockaddr_str/sockaddr_str_test.ok \
 	     use_count/use_count_test.ok use_count/use_count_test.err \
 	     context/context_test.ok \
@@ -678,16 +678,16 @@
 vty-test-tdef:
 	osmo_verify_transcript_vty.py -v \
 		-p 42042 \
-		-r "$(top_builddir)/tests/tdef/tdef_vty_test_config_root" \
-		$(U) $(srcdir)/tdef/tdef_vty_test_config_root.vty
+		-r "$(top_builddir)/tests/tdef/tdef_vty_config_root_test" \
+		$(U) $(srcdir)/tdef/tdef_vty_config_root_test.vty
 	osmo_verify_transcript_vty.py -v \
 		-p 42042 \
-		-r "$(top_builddir)/tests/tdef/tdef_vty_test_config_subnode" \
-		$(U) $(srcdir)/tdef/tdef_vty_test_config_subnode.vty
+		-r "$(top_builddir)/tests/tdef/tdef_vty_config_subnode_test" \
+		$(U) $(srcdir)/tdef/tdef_vty_config_subnode_test.vty
 	osmo_verify_transcript_vty.py -v \
 		-p 42042 \
-		-r "$(top_builddir)/tests/tdef/tdef_vty_test_dynamic" \
-		$(U) $(srcdir)/tdef/tdef_vty_test_dynamic.vty
+		-r "$(top_builddir)/tests/tdef/tdef_vty_dynamic_test" \
+		$(U) $(srcdir)/tdef/tdef_vty_dynamic_test.vty
 
 vty-test-stats:
 	osmo_verify_transcript_vty.py -v \
diff --git a/tests/tdef/tdef_vty_test_config_root.c b/tests/tdef/tdef_vty_config_root_test.c
similarity index 97%
rename from tests/tdef/tdef_vty_test_config_root.c
rename to tests/tdef/tdef_vty_config_root_test.c
index 92113e8..0472ad5 100644
--- a/tests/tdef/tdef_vty_test_config_root.c
+++ b/tests/tdef/tdef_vty_config_root_test.c
@@ -45,7 +45,7 @@
 /* ------------------- HERE IS THE INTERESTING TDEF RELEVANT PART ------------------- */
 
 /* This example keeps several separate timer groups and offers 'timer' VTY commands at the root of the config node. See
- * the tdef_vty_test_config_root.vty transcript test.
+ * the tdef_vty_config_root_test.vty transcript test.
  */
 
 static struct osmo_tdef tdefs_test[] = {
@@ -102,7 +102,7 @@
 /* This example puts 'timer' configuration commands directly at the root of the CONFIG_NODE.
  * This TIMER_NODE is merely needed as a hook for the vty_write() command, but becomes an empty node in the VTY docs.
  * It is possible to cheat around needing this if you choose to config_write_timer() in another root nodes' write cb.
- * Another example using a 'network' subnode is \ref tdef_vty_test_config_subnode.c */
+ * Another example using a 'network' subnode is \ref tdef_vty_config_subnode_test.c */
 static struct cmd_node timer_node = {
 	TIMER_NODE,
 	"%s(config-timer)# ",
diff --git a/tests/tdef/tdef_vty_test_config_root.vty b/tests/tdef/tdef_vty_config_root_test.vty
similarity index 100%
rename from tests/tdef/tdef_vty_test_config_root.vty
rename to tests/tdef/tdef_vty_config_root_test.vty
diff --git a/tests/tdef/tdef_vty_test_config_subnode.c b/tests/tdef/tdef_vty_config_subnode_test.c
similarity index 98%
rename from tests/tdef/tdef_vty_test_config_subnode.c
rename to tests/tdef/tdef_vty_config_subnode_test.c
index ce851f5..ff19150 100644
--- a/tests/tdef/tdef_vty_test_config_subnode.c
+++ b/tests/tdef/tdef_vty_config_subnode_test.c
@@ -46,7 +46,7 @@
 
 /* This example keeps a single global timer group and offers a custom 'timer' VTY command in a 'network' subnode below
  * the CONFIG_NODE.
- * the tdef_vty_test_config_subnode.vty transcript test.
+ * the tdef_vty_config_subnode_test.vty transcript test.
  */
 
 static struct osmo_tdef global_tdefs[] = {
diff --git a/tests/tdef/tdef_vty_test_config_subnode.vty b/tests/tdef/tdef_vty_config_subnode_test.vty
similarity index 100%
rename from tests/tdef/tdef_vty_test_config_subnode.vty
rename to tests/tdef/tdef_vty_config_subnode_test.vty
diff --git a/tests/tdef/tdef_vty_test_dynamic.c b/tests/tdef/tdef_vty_dynamic_test.c
similarity index 100%
rename from tests/tdef/tdef_vty_test_dynamic.c
rename to tests/tdef/tdef_vty_dynamic_test.c
diff --git a/tests/tdef/tdef_vty_test_dynamic.vty b/tests/tdef/tdef_vty_dynamic_test.vty
similarity index 100%
rename from tests/tdef/tdef_vty_test_dynamic.vty
rename to tests/tdef/tdef_vty_dynamic_test.vty

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26305
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I828fa45132e11a41c527d4b25df850c19871cb75
Gerrit-Change-Number: 26305
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211116/1e8d09b4/attachment.htm>


More information about the gerrit-log mailing list